#if DEBUG
#if defined(TARGET_SDL)
+#if !defined(TARGET_SDL2)
else if (strEqual(command, "SDL_ListModes"))
{
SDL_Rect **modes;
exit(0);
}
#endif
+#endif
#endif
else
void DisplayExitMessage(char *format, va_list ap)
{
+ // check if draw buffer and fonts for exit message are already available
+ if (drawto == NULL || font_initial[NUM_INITIAL_FONTS - 1].bitmap == NULL)
+ return;
+
int font_1 = FC_RED;
int font_2 = FC_YELLOW;
int font_3 = FC_BLUE;
InitVideoDisplay();
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
- InitEventFilter(FilterMouseMotionEvents);
+ InitEventFilter(FilterEvents);
print_timestamp_time("[init video stuff]");
FreeAllImages();
#if defined(TARGET_SDL)
+#if defined(TARGET_SDL2)
+ // !!! TODO !!!
+ // set a flag to tell the network server thread to quit and wait for it
+ // using SDL_WaitThread()
+#else
if (network_server) /* terminate network server */
SDL_KillThread(server_thread);
+#endif
#endif
CloseVideoDisplay();