diff --git a/pcsx2/Frontend/SDLInputSource.cpp b/pcsx2/Frontend/SDLInputSource.cpp index 5d9e9ec6ff..0f687df728 100644 --- a/pcsx2/Frontend/SDLInputSource.cpp +++ b/pcsx2/Frontend/SDLInputSource.cpp @@ -158,6 +158,7 @@ void SDLInputSource::Shutdown() void SDLInputSource::LoadSettings(SettingsInterface& si) { m_controller_enhanced_mode = si.GetBoolValue("InputSources", "SDLControllerEnhancedMode", false); + m_sdl_hints = si.GetKeyValueList("SDLHints"); } void SDLInputSource::SetHints() @@ -173,6 +174,9 @@ void SDLInputSource::SetHints() // New as of SDL 2.26, so use string SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS3", "1"); #endif + + for (const std::pair& hint : m_sdl_hints) + SDL_SetHint(hint.first.c_str(), hint.second.c_str()); } bool SDLInputSource::InitializeSubsystem() diff --git a/pcsx2/Frontend/SDLInputSource.h b/pcsx2/Frontend/SDLInputSource.h index a4b4a9378c..02ef309292 100644 --- a/pcsx2/Frontend/SDLInputSource.h +++ b/pcsx2/Frontend/SDLInputSource.h @@ -92,4 +92,5 @@ private: bool m_sdl_subsystem_initialized = false; bool m_controller_enhanced_mode = false; + std::vector> m_sdl_hints; };