1.2.13-4+nmu2: Closes: #438915 --- src/video/fbcon/SDL_fbvideo.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) Index: SDL-1.2.14/src/video/fbcon/SDL_fbvideo.c =================================================================== --- SDL-1.2.14.orig/src/video/fbcon/SDL_fbvideo.c 2009-10-12 19:07:15.000000000 -0400 +++ SDL-1.2.14/src/video/fbcon/SDL_fbvideo.c 2009-11-28 09:20:05.000000000 -0500 @@ -792,14 +792,19 @@ } } - /* Enable mouse and keyboard support */ - if ( FB_OpenKeyboard(this) < 0 ) { - FB_VideoQuit(this); - return(-1); - } + if (!SDL_getenv("SDL_NOKBD")) + { + fprintf(stderr, "init kbd.\n"); + /* Enable mouse and keyboard support */ + if ( FB_OpenKeyboard(this) < 0 ) { + FB_VideoQuit(this); + return(-1); + } + } if ( FB_OpenMouse(this) < 0 ) { const char *sdl_nomouse; + fprintf(stderr, "init mouse failed.\n"); sdl_nomouse = SDL_getenv("SDL_NOMOUSE"); if ( ! sdl_nomouse ) { SDL_SetError("Unable to open mouse"); @@ -1009,7 +1014,6 @@ /* Set the terminal into graphics mode */ if ( FB_EnterGraphicsMode(this) < 0 ) { - return(NULL); } /* Restore the original palette */ @@ -1910,7 +1914,7 @@ if ( this->screen ) { /* Clear screen and tell SDL not to free the pixels */ - if ( this->screen->pixels && FB_InGraphicsMode(this) ) { + if ( this->screen->pixels && (FB_InGraphicsMode(this) || SDL_getenv("SDL_NOKBD")) ) { #if defined(__powerpc__) || defined(__ia64__) /* SIGBUS when using SDL_memset() ?? */ Uint8 *rowp = (Uint8 *)this->screen->pixels; int left = this->screen->pitch*this->screen->h; @@ -1959,7 +1963,7 @@ } /* Restore the original video mode and palette */ - if ( FB_InGraphicsMode(this) ) { + if ( FB_InGraphicsMode(this) || SDL_getenv("SDL_NOKBD") ) { FB_RestorePalette(this); ioctl(console_fd, FBIOPUT_VSCREENINFO, &saved_vinfo); }