From f2fc1a6f15dfc0550ab4db3bde4cb44a8ef557b0 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 29 Nov 2014 03:43:11 +0000 Subject: [PATCH] Make sure the mouse is captured when the main menu transitions into MODE_GAME. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4776 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/sdlayer12.c | 2 +- polymer/eduke32/source/premap.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/sdlayer12.c b/polymer/eduke32/build/src/sdlayer12.c index 53822df19..1e7957fc6 100644 --- a/polymer/eduke32/build/src/sdlayer12.c +++ b/polymer/eduke32/build/src/sdlayer12.c @@ -178,7 +178,7 @@ const char *getjoyname(int32_t what, int32_t num) static inline char grabmouse_low(char a) { -#if (!defined DEBUGGINGAIDS || defined __APPLE__) +#if (!defined DEBUGGINGAIDS || defined _WIN32 || defined __APPLE__) SDL_ShowCursor(a ? SDL_DISABLE : SDL_ENABLE); return (SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF) != (a ? SDL_GRAB_ON : SDL_GRAB_OFF)); #else diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index b79ea7883..4f3ad6d05 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1906,7 +1906,10 @@ int32_t G_EnterLevel(int32_t g) if (g & (MODE_GAME|MODE_EOL)) { for (TRAVERSE_CONNECT(i)) + { g_player[i].ps->gm = MODE_GAME; + M_CloseMenu(i); + } } else if (g & MODE_RESTART) {