| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
- index 5e58809..81830b6 100644
- --- a/src/video/fbcon/SDL_fbvideo.c
- +++ b/src/video/fbcon/SDL_fbvideo.c
- @@ -793,9 +793,11 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
- }
-
- /* Enable mouse and keyboard support */
- - if ( FB_OpenKeyboard(this) < 0 ) {
- - FB_VideoQuit(this);
- - return(-1);
- + if (!SDL_getenv("SDL_NOKBD")){
- + if ( FB_OpenKeyboard(this) < 0 ) {
- + FB_VideoQuit(this);
- + return(-1);
- + }
- }
- if ( FB_OpenMouse(this) < 0 ) {
- const char *sdl_nomouse;
- @@ -944,7 +946,7 @@ static SDL_Surface *FB_SetVGA16Mode(_THIS, SDL_Surface *current,
-
- /* Set the terminal into graphics mode */
- if ( FB_EnterGraphicsMode(this) < 0 ) {
- - return(NULL);
- + if (!SDL_getenv("SDL_NOKBD")) return(NULL);
- }
-
- /* Restore the original palette */
- @@ -1009,7 +1011,7 @@ static SDL_Surface *FB_SetVideoMode(_THIS, SDL_Surface *current,
-
- /* Set the terminal into graphics mode */
- if ( FB_EnterGraphicsMode(this) < 0 ) {
- - return(NULL);
- + if (!SDL_getenv("SDL_NOKBD")) return(NULL);
- }
-
- /* Restore the original palette */
- @@ -1919,7 +1921,7 @@ static void FB_VideoQuit(_THIS)
- SDL_memcpy(flip_address[0], flip_address[1], this->screen->pitch * this->screen->h);
- }
-
- - if ( !dontClearPixels && this->screen->pixels && FB_InGraphicsMode(this) ) {
- + if ( (!dontClearPixels && 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;
- @@ -1968,7 +1970,7 @@ static void FB_VideoQuit(_THIS)
- }
-
- /* 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);
- }
|