Revision 1de9756b ui/sdl.c
b/ui/sdl.c | ||
---|---|---|
831 | 831 |
if (!full_screen) { |
832 | 832 |
setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0); |
833 | 833 |
} |
834 |
#ifdef __linux__ |
|
835 |
/* on Linux, SDL may use fbcon|directfb|svgalib when run without |
|
836 |
* accessible $DISPLAY to open X11 window. This is often the case |
|
837 |
* when qemu is run using sudo. But in this case, and when actually |
|
838 |
* run in X11 environment, SDL fights with X11 for the video card, |
|
839 |
* making current display unavailable, often until reboot. |
|
840 |
* So make x11 the default SDL video driver if this variable is unset. |
|
841 |
* This is a bit hackish but saves us from bigger problem. |
|
842 |
* Maybe it's a good idea to fix this in SDL instead. |
|
843 |
*/ |
|
844 |
setenv("SDL_VIDEODRIVER", "x11", 0); |
|
845 |
#endif |
|
834 | 846 |
|
835 | 847 |
/* Enable normal up/down events for Caps-Lock and Num-Lock keys. |
836 | 848 |
* This requires SDL >= 1.2.14. */ |
Also available in: Unified diff