mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 18:21:08 +00:00
Add SDL2 support to framework/Common.cpp
This commit is contained in:
parent
918e06cf00
commit
227e8ee5c9
1 changed files with 4 additions and 0 deletions
|
@ -2726,8 +2726,12 @@ void idCommonLocal::Init( int argc, char **argv ) {
|
|||
// we want to use the SDL event queue for dedicated servers. That
|
||||
// requires video to be initialized, so we just use the dummy
|
||||
// driver for headless boxen
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
SDL_setenv("SDL_VIDEODRIVER", "dummy", 1);
|
||||
#else
|
||||
char dummy[] = "SDL_VIDEODRIVER=dummy\0";
|
||||
SDL_putenv(dummy);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO))
|
||||
|
|
Loading…
Reference in a new issue