projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20131209-1-src
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index a7ad871bdd019d4735d66077a01e15b24fbebabd..c2344a507175af8ce42059a4d563ca8c35cada54 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-5313,6
+5313,7
@@
void Execute_Command(char *command)
#if DEBUG
#if defined(TARGET_SDL)
#if DEBUG
#if defined(TARGET_SDL)
+#if !defined(TARGET_SDL2)
else if (strEqual(command, "SDL_ListModes"))
{
SDL_Rect **modes;
else if (strEqual(command, "SDL_ListModes"))
{
SDL_Rect **modes;
@@
-5347,6
+5348,7
@@
void Execute_Command(char *command)
exit(0);
}
#endif
exit(0);
}
#endif
+#endif
#endif
else
#endif
else
@@
-6276,6
+6278,10
@@
void KeyboardAutoRepeatOffUnlessAutoplay()
void DisplayExitMessage(char *format, va_list ap)
{
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;
int font_1 = FC_RED;
int font_2 = FC_YELLOW;
int font_3 = FC_BLUE;
@@
-6389,7
+6395,7
@@
void OpenAll()
InitVideoDisplay();
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
InitVideoDisplay();
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
- InitEventFilter(Filter
MouseMotion
Events);
+ InitEventFilter(FilterEvents);
print_timestamp_time("[init video stuff]");
print_timestamp_time("[init video stuff]");
@@
-6485,8
+6491,14
@@
void CloseAllAndExit(int exit_value)
FreeAllImages();
#if defined(TARGET_SDL)
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);
if (network_server) /* terminate network server */
SDL_KillThread(server_thread);
+#endif
#endif
CloseVideoDisplay();
#endif
CloseVideoDisplay();