mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Initialise UiContext input fields
This was causing undefined data to appear in _keysPressed which caused shortcuts to be invoked on startup.
This commit is contained in:
@@ -75,12 +75,12 @@ private:
|
||||
|
||||
// Input
|
||||
TextComposition _textComposition;
|
||||
CursorState _cursorState;
|
||||
uint32 _lastKeyPressed;
|
||||
const uint8 * _keysState;
|
||||
uint8 _keysPressed[256];
|
||||
uint32 _lastGestureTimestamp;
|
||||
float _gestureRadius;
|
||||
CursorState _cursorState = { 0 };
|
||||
uint32 _lastKeyPressed = 0;
|
||||
const uint8 * _keysState = nullptr;
|
||||
uint8 _keysPressed[256] = { 0 };
|
||||
uint32 _lastGestureTimestamp = 0;
|
||||
float _gestureRadius = 0;
|
||||
|
||||
public:
|
||||
UiContext()
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
{
|
||||
SDL_SetWindowGrab(_window, value ? SDL_TRUE : SDL_FALSE);
|
||||
}
|
||||
|
||||
|
||||
void SetKeysPressed(uint32 keysym, uint8 scancode) override
|
||||
{
|
||||
_lastKeyPressed = keysym;
|
||||
|
||||
Reference in New Issue
Block a user