Allow wm_msgbox() to use SDL_ShowSimpleMessageBox() under SDL2.

Unfortunately, SDL2 does not (yet?) provide a Yes/No box for wm_ynbox().

git-svn-id: https://svn.eduke32.com/eduke32@4085 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2013-10-07 10:05:24 +00:00
parent db69800fd0
commit 333e0f26e2
4 changed files with 9 additions and 7 deletions

View file

@ -4,3 +4,8 @@
#else
# include "sdlayer.h"
#endif
#undef STARTUP_SETUP_WINDOW
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2 || SDL_MAJOR_VERSION==2))
# define STARTUP_SETUP_WINDOW
#endif

View file

@ -494,11 +494,6 @@ void M32_DrawRoomsAndMasks(void)
}
}
#undef STARTUP_SETUP_WINDOW
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2))
# define STARTUP_SETUP_WINDOW
#endif
int32_t app_main(int32_t argc, const char **argv)
{
#ifdef STARTUP_SETUP_WINDOW

View file

@ -169,6 +169,8 @@ int32_t wm_msgbox(char *name, char *fmt, ...)
return osx_msgbox(name, buf);
#elif defined HAVE_GTK2
if (gtkbuild_msgbox(name, buf) >= 0) return 1;
#elif SDL_MAJOR_VERSION==2
return SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, name, buf, NULL);
#endif
puts(buf);
puts(" (press Return or Enter to continue)");

View file

@ -9036,7 +9036,7 @@ static void G_ShowParameterHelp(void)
// "\n-?/--help\tDisplay this help message and exit\n"
"\nSee eduke32 -debughelp for debug parameters"
;
#if defined RENDERTYPEWIN
#if defined STARTUP_SETUP_WINDOW
Bsnprintf(tempbuf, sizeof(tempbuf), HEAD2 " %s", s_buildRev);
wm_msgbox(tempbuf,"%s",s);
#else
@ -9069,7 +9069,7 @@ static void G_ShowDebugHelp(void)
" diag, nojit, traces, dump, strict\n"
#endif
;
#if defined RENDERTYPEWIN
#if defined STARTUP_SETUP_WINDOW
Bsnprintf(tempbuf, sizeof(tempbuf), HEAD2 " %s", s_buildRev);
wm_msgbox(tempbuf,"%s",s);
#else