mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Disable double scrilling when recording a demo
With the recorder, it's not possible to use these movements because only the first key is recorded.
This commit is contained in:
parent
6f028085ac
commit
b0a3e7875d
@ -5025,13 +5025,17 @@ bool CEvent::TreatEventBase (const SDL_Event &event)
|
|||||||
case SDLK_DOWN:
|
case SDLK_DOWN:
|
||||||
{
|
{
|
||||||
const Uint8 *state = SDL_GetKeyboardState (nullptr);
|
const Uint8 *state = SDL_GetKeyboardState (nullptr);
|
||||||
if (event.key.keysym.sym == SDLK_LEFT || state[SDL_SCANCODE_LEFT])
|
if ( event.key.keysym.sym == SDLK_LEFT
|
||||||
|
|| (!m_bDemoRec && state[SDL_SCANCODE_LEFT]))
|
||||||
DecorShift (-2, 2);
|
DecorShift (-2, 2);
|
||||||
if (event.key.keysym.sym == SDLK_RIGHT || state[SDL_SCANCODE_RIGHT])
|
if ( event.key.keysym.sym == SDLK_RIGHT
|
||||||
|
|| (!m_bDemoRec && state[SDL_SCANCODE_RIGHT]))
|
||||||
DecorShift (2, -2);
|
DecorShift (2, -2);
|
||||||
if (event.key.keysym.sym == SDLK_UP || state[SDL_SCANCODE_UP])
|
if ( event.key.keysym.sym == SDLK_UP
|
||||||
|
|| (!m_bDemoRec && state[SDL_SCANCODE_UP]))
|
||||||
DecorShift (-3, -3);
|
DecorShift (-3, -3);
|
||||||
if (event.key.keysym.sym == SDLK_DOWN || state[SDL_SCANCODE_DOWN])
|
if ( event.key.keysym.sym == SDLK_DOWN
|
||||||
|
|| (!m_bDemoRec && state[SDL_SCANCODE_DOWN]))
|
||||||
DecorShift (3, 3);
|
DecorShift (3, 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user