Fixed bug 1582 - Allow disabling SDL_VIDEO_DRIVER_WINDOWS
Marcus von Appen Trying to build SDL 2.x (HG) on Win32 platforms with either VS.NET or MinGW requires one to have the video subsystem and SDL_VIDEO_DRIVER_WINDOWS flag enabled due to the helper window creation routines. The attached patch changes the helper window creation behaviour, so that one can build SDL2 without the video subsystem or Windows video drivers on Win32 platforms.
This commit is contained in:
parent
b72f0b741e
commit
8a91a76148
1 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,7 @@ extern void SDL_StartTicks(void);
|
|||
extern int SDL_TimerInit(void);
|
||||
extern void SDL_TimerQuit(void);
|
||||
#endif
|
||||
#if defined(__WIN32__)
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
extern int SDL_HelperWindowCreate(void);
|
||||
extern int SDL_HelperWindowDestroy(void);
|
||||
#endif
|
||||
|
@ -200,7 +200,7 @@ SDL_Init(Uint32 flags)
|
|||
/* Clear the error message */
|
||||
SDL_ClearError();
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ SDL_Quit(void)
|
|||
SDL_bInMainQuit = SDL_TRUE;
|
||||
|
||||
/* Quit all subsystems */
|
||||
#if defined(__WIN32__)
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
SDL_HelperWindowDestroy();
|
||||
#endif
|
||||
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue