mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
On Windows, add command-line switch -nopause, disabling the pause key.
Hopefully this fixes the periodic pausing/unpausing that a few people have been experiencing. Also fix build with GCC 3. git-svn-id: https://svn.eduke32.com/eduke32@2108 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
63805a025b
commit
a67af55153
4 changed files with 20 additions and 1 deletions
|
@ -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 \
|
BASECFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
||||||
$(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) \
|
$(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))
|
ifneq (0,$(USE_LIBPNG))
|
||||||
BASECFLAGS+= -DUSE_LIBPNG
|
BASECFLAGS+= -DUSE_LIBPNG
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -10,6 +10,7 @@ extern uint32_t maxrefreshfreq;
|
||||||
|
|
||||||
extern int32_t glusecds;
|
extern int32_t glusecds;
|
||||||
|
|
||||||
|
extern char rawinput_nopause;
|
||||||
extern char di_disabled;
|
extern char di_disabled;
|
||||||
|
|
||||||
int32_t win_gethwnd(void);
|
int32_t win_gethwnd(void);
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "scancodes.h"
|
#include "scancodes.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
|
||||||
|
char rawinput_nopause = 0;
|
||||||
static BOOL rawinput_started = 0;
|
static BOOL rawinput_started = 0;
|
||||||
static uint8_t KeyboardState[256] = {0}; // VKeys
|
static uint8_t KeyboardState[256] = {0}; // VKeys
|
||||||
static int8_t MWheel = 0;
|
static int8_t MWheel = 0;
|
||||||
|
@ -128,6 +129,9 @@ static inline void RI_ProcessKeyboard(const RAWKEYBOARD *rkbd)
|
||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
if (rkbd->Flags & RI_KEY_E0) key = sc_kpad_Enter; break;
|
if (rkbd->Flags & RI_KEY_E0) key = sc_kpad_Enter; break;
|
||||||
case VK_PAUSE:
|
case VK_PAUSE:
|
||||||
|
if (rawinput_nopause)
|
||||||
|
return;
|
||||||
|
|
||||||
KeyboardState[VKey] = 1 - (rkbd->Flags & RI_KEY_BREAK);
|
KeyboardState[VKey] = 1 - (rkbd->Flags & RI_KEY_BREAK);
|
||||||
if (rkbd->Flags & RI_KEY_BREAK) return;
|
if (rkbd->Flags & RI_KEY_BREAK) return;
|
||||||
|
|
||||||
|
|
|
@ -8001,7 +8001,10 @@ static void G_ShowDebugHelp(void)
|
||||||
"-gamegrp \tSelects which file to use as main grp\n"
|
"-gamegrp \tSelects which file to use as main grp\n"
|
||||||
"-name [name]\tPlayer name in multiplay\n"
|
"-name [name]\tPlayer name in multiplay\n"
|
||||||
"-noautoload\tDisable loading content from autoload dir\n"
|
"-noautoload\tDisable loading content from autoload dir\n"
|
||||||
|
#ifdef _WIN32
|
||||||
"-nodinput\t\tDisable DirectInput (joystick) support\n"
|
"-nodinput\t\tDisable DirectInput (joystick) support\n"
|
||||||
|
"-nopause\t\tDisable the pause key\n"
|
||||||
|
#endif
|
||||||
"-nologo\t\tSkip the logo anim\n"
|
"-nologo\t\tSkip the logo anim\n"
|
||||||
"-ns/-nm\t\tDisable sound or music\n"
|
"-ns/-nm\t\tDisable sound or music\n"
|
||||||
"-q#\t\tFake multiplayer with # (2-8) players\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++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!Bstrcasecmp(c+1,"nopause"))
|
||||||
|
{
|
||||||
|
initprintf("Pause key disabled\n");
|
||||||
|
rawinput_nopause = 1;
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!Bstrcasecmp(c+1,"noautoload"))
|
if (!Bstrcasecmp(c+1,"noautoload"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue