diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 2704278a8..938819246 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -115,7 +115,11 @@ W_NO_UNUSED_RESULT := $(findstring -Wno-unused-result,$(W_NO_UNUSED_RESULT)) BASECFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \ $(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) \ - -Wextra -Wstrict-overflow=1 #-Wwrite-strings -Waddress -Wlogical-op + -Wextra #-Wwrite-strings -Waddress -Wlogical-op +ifneq (3,$(GCC_MAJOR)) + BASECFLAGS+= -Wstrict-overflow=1 +endif + ifneq (0,$(USE_LIBPNG)) BASECFLAGS+= -DUSE_LIBPNG endif diff --git a/polymer/eduke32/build/include/winlayer.h b/polymer/eduke32/build/include/winlayer.h index ce0937db8..064735e7c 100644 --- a/polymer/eduke32/build/include/winlayer.h +++ b/polymer/eduke32/build/include/winlayer.h @@ -10,6 +10,7 @@ extern uint32_t maxrefreshfreq; extern int32_t glusecds; +extern char rawinput_nopause; extern char di_disabled; int32_t win_gethwnd(void); diff --git a/polymer/eduke32/build/src/rawinput.c b/polymer/eduke32/build/src/rawinput.c index c90125f3d..f7cd82395 100644 --- a/polymer/eduke32/build/src/rawinput.c +++ b/polymer/eduke32/build/src/rawinput.c @@ -6,6 +6,7 @@ #include "scancodes.h" #include "build.h" +char rawinput_nopause = 0; static BOOL rawinput_started = 0; static uint8_t KeyboardState[256] = {0}; // VKeys static int8_t MWheel = 0; @@ -128,6 +129,9 @@ static inline void RI_ProcessKeyboard(const RAWKEYBOARD *rkbd) case VK_RETURN: if (rkbd->Flags & RI_KEY_E0) key = sc_kpad_Enter; break; case VK_PAUSE: + if (rawinput_nopause) + return; + KeyboardState[VKey] = 1 - (rkbd->Flags & RI_KEY_BREAK); if (rkbd->Flags & RI_KEY_BREAK) return; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index e47428b72..ed4e81512 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8001,7 +8001,10 @@ static void G_ShowDebugHelp(void) "-gamegrp \tSelects which file to use as main grp\n" "-name [name]\tPlayer name in multiplay\n" "-noautoload\tDisable loading content from autoload dir\n" +#ifdef _WIN32 "-nodinput\t\tDisable DirectInput (joystick) support\n" + "-nopause\t\tDisable the pause key\n" +#endif "-nologo\t\tSkip the logo anim\n" "-ns/-nm\t\tDisable sound or music\n" "-q#\t\tFake multiplayer with # (2-8) players\n" @@ -8554,6 +8557,13 @@ static void G_CheckCommandLine(int32_t argc, const char **argv) i++; continue; } + if (!Bstrcasecmp(c+1,"nopause")) + { + initprintf("Pause key disabled\n"); + rawinput_nopause = 1; + i++; + continue; + } #endif if (!Bstrcasecmp(c+1,"noautoload")) {