From 68e5805f1b539634f9c7144db28a88202860dec0 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 20 Dec 2021 03:40:48 +0100 Subject: [PATCH] [touch] Adjust controller position after changing resolution Fixes #3791 --- Source/utils/display.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/utils/display.cpp b/Source/utils/display.cpp index 9c92287b1..336540f1f 100644 --- a/Source/utils/display.cpp +++ b/Source/utils/display.cpp @@ -17,6 +17,7 @@ #include "controls/devices/joystick.h" #include "controls/devices/kbcontroller.h" #include "controls/game_controls.h" +#include "controls/touch/gamepad.h" #include "dx.h" #include "options.h" #include "utils/log.hpp" @@ -408,6 +409,10 @@ void ResizeWindow() CreateBackBuffer(); force_redraw = 255; + +#ifdef VIRTUAL_GAMEPAD + InitializeVirtualGamepad(); +#endif } SDL_Surface *GetOutputSurface()