From a5daacc2d5ccfe1255aeb18a1a5e557551b7449a Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 29 Jan 2024 11:04:10 +0100 Subject: Fixed another crash due to incomplete SDL2 upgrade SDL_GetKeyboardState array needs to be indexed by scan codes. --- src/gui/viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 96a1d79c..3fb11d2c 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -312,7 +312,7 @@ void Viewport::_followMouse() // We create a mouse event and send it to mouseDragged. const Uint8 *keys = SDL_GetKeyboardState(nullptr); gcn::MouseEvent mouseEvent(nullptr, - (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]), + (keys[SDL_SCANCODE_LSHIFT] || keys[SDL_SCANCODE_RSHIFT]), false, false, false, -- cgit v1.2.3-70-g09d2