mirror of https://github.com/PCSX2/pcsx2.git
SDLInputSource: Custom hint support
This commit is contained in:
parent
e2c3a8b1e1
commit
8cf430ef7e
|
@ -158,6 +158,7 @@ void SDLInputSource::Shutdown()
|
||||||
void SDLInputSource::LoadSettings(SettingsInterface& si)
|
void SDLInputSource::LoadSettings(SettingsInterface& si)
|
||||||
{
|
{
|
||||||
m_controller_enhanced_mode = si.GetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
|
m_controller_enhanced_mode = si.GetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
|
||||||
|
m_sdl_hints = si.GetKeyValueList("SDLHints");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDLInputSource::SetHints()
|
void SDLInputSource::SetHints()
|
||||||
|
@ -173,6 +174,9 @@ void SDLInputSource::SetHints()
|
||||||
// New as of SDL 2.26, so use string
|
// New as of SDL 2.26, so use string
|
||||||
SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS3", "1");
|
SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS3", "1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (const std::pair<std::string, std::string>& hint : m_sdl_hints)
|
||||||
|
SDL_SetHint(hint.first.c_str(), hint.second.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SDLInputSource::InitializeSubsystem()
|
bool SDLInputSource::InitializeSubsystem()
|
||||||
|
|
|
@ -92,4 +92,5 @@ private:
|
||||||
|
|
||||||
bool m_sdl_subsystem_initialized = false;
|
bool m_sdl_subsystem_initialized = false;
|
||||||
bool m_controller_enhanced_mode = false;
|
bool m_controller_enhanced_mode = false;
|
||||||
|
std::vector<std::pair<std::string, std::string>> m_sdl_hints;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue