[SDL] no keyboard attached -> error

johannes raggam raggam at adm.at
Thu Sep 22 10:45:20 PDT 2005


now i found the relevant bits:

in
SDL-1.2.9/src/video/svga/SDL_svgavideo.c
at around line 260 i commented out the keyboard initialization.
thank you for your tip, tyler!

sure, #ifdefs and so on would be nicer, but for the first run it's ok so....

AND: i discovered the SDL-1.2.9/src/video/dummy files. what's the use of 
these files? is it possible to use a dummy keyboard with them?


here the relevant code:
// SDL-1.2.9/src/video/svga/SDL_svgavideo.c
// line 260

// ADM NO KEYBOARD WORKAROUND
keyboard = 1;
/*
	keyboard = keyboard_init_return_fd();
	if ( keyboard < 0 ) {
		SDL_SetError("Unable to initialize keyboard");
		return(-1);
	}
	if ( SVGA_initkeymaps(keyboard) < 0 ) {
		return(-1);
	}

*/
// END ADM NO KEYBOARD WORKAROUND


Tyler Montbriand wrote:
>>an sdl based application won't start without a keyboard attached. there
>>must be an error in the sdl-library.
> Video drivers and keyboard events -- in fact, all events -- are indeed closely 
> linked in SDL.  For svgalib check out src/video/svga/SDL_svgaevents.c.  
> Maybye you can disable keyboard handling with #ifdefs, or better, checking an 
> environment variable with getenv?
> 
-- 
--------------------------------------------------------------
johannes raggam | raggam at adm.at

adm | o. kipcak & partner ges.m.b.h.
atelier graz | mariahilferstr. 1/1
a-8020 | graz | austria | tel:(+)316-47-47-50 | office at adm.at




More information about the SDL mailing list