From fa27886b1c94ee20055d7c3636aa131f9b8579f3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 28 Sep 2003 23:20:22 +0000 Subject: [PATCH] Use SDLK_PRINT instead of SDLK_SYSREQ. --- stepmania/src/StepMania.cpp | 2 +- .../src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 2 +- stepmania/src/arch/InputHandler/InputHandler_SDL.cpp | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 5b8d4a90f4..0740cc938b 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -754,7 +754,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam * Alt+PrntScrn. Windows will do this whether or not we save a screenshot * ourself by dumping the frame buffer. */ // "if pressing PrintScreen and not pressing Alt" - if( DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_SYSREQ) && + if( DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_PRINT) && !INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) && !INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) #else diff --git a/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index b83a8c5aa1..e98fca8dfe 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -281,7 +281,7 @@ static int ConvertScancodeToKey( int scancode ) case DIK_NUMPADENTER: return SDLK_KP_ENTER; case DIK_RCONTROL: return SDLK_RCTRL; case DIK_DIVIDE: return SDLK_KP_DIVIDE; - case DIK_SYSRQ: return SDLK_SYSREQ; + case DIK_SYSRQ: return SDLK_PRINT; case DIK_RMENU: return SDLK_RALT; case DIK_PAUSE: return SDLK_PAUSE; case DIK_HOME: return SDLK_HOME; diff --git a/stepmania/src/arch/InputHandler/InputHandler_SDL.cpp b/stepmania/src/arch/InputHandler/InputHandler_SDL.cpp index f4b42d8f33..fde13e68a3 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_SDL.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_SDL.cpp @@ -89,6 +89,11 @@ void InputHandler_SDL::Update(float fDeltaTime) case SDL_KEYUP: { DeviceInput di(DEVICE_KEYBOARD, event.key.keysym.sym); + + /* SDL is inconsistent about this key: */ + if( di.button == SDLK_SYSREQ ) + di.button = SDLK_PRINT; + ButtonPressed(di, event.key.state == SDL_PRESSED); } continue;