Controller Remapping GUI v2 (#3144)

* Remapping GUI V2 - initial commit

* Unmap button with escape key

* Allow combination inputs

* Use separate class for SDL event signals so that i can work with the SDL window event loop

* Automatically pause game when GUI open to better manage event queue

* Move sd;_gamepad_added event from remap object to GUI object to avoid conflicts with sdl window

* Use signals on button/trigger to release to make GUI more responsive

* pause game while KBM window is open for consistency

* don't check gamepad when game is running to avoid conflicts

* Block all other sdl events instead of pausing game, automatic parse inputs after saving

* Don't block window restored or window exposed cases

* Properly exit event loop thread on exit
This commit is contained in:
rainmakerv2
2025-06-27 21:55:52 +08:00
committed by GitHub
parent 09b584b23f
commit fa32537f40
11 changed files with 1194 additions and 601 deletions

View File

@@ -20,6 +20,10 @@
#include "sdl_window.h"
#include "video_core/renderdoc.h"
#ifdef ENABLE_QT_GUI
#include "qt_gui/sdl_event_wrapper.h"
#endif
#ifdef __APPLE__
#include "SDL3/SDL_metal.h"
#endif
@@ -340,6 +344,13 @@ void WindowSDL::WaitEvent() {
return;
}
#ifdef ENABLE_QT_GUI
if (SdlEventWrapper::Wrapper::wrapperActive) {
if (SdlEventWrapper::Wrapper::GetInstance()->ProcessEvent(&event))
return;
}
#endif
if (ImGui::Core::ProcessEvent(&event)) {
return;
}