System: Warn if compatibility settings are disabled

This commit is contained in:
Stenzek 2024-03-02 21:03:33 +10:00
parent 04b837a418
commit 96f29d9b99
No known key found for this signature in database

View file

@ -937,11 +937,21 @@ void System::LoadSettings(bool display_osd_messages)
InputManager::ReloadBindings(si, *Host::GetSettingsInterfaceForBindings()); InputManager::ReloadBindings(si, *Host::GetSettingsInterfaceForBindings());
// apply compatibility settings // apply compatibility settings
if (g_settings.apply_compatibility_settings && !s_running_game_serial.empty()) if (g_settings.apply_compatibility_settings)
{ {
const GameDatabase::Entry* entry = GameDatabase::GetEntryForSerial(s_running_game_serial); if (!s_running_game_serial.empty())
if (entry) {
entry->ApplySettings(g_settings, display_osd_messages); const GameDatabase::Entry* entry = GameDatabase::GetEntryForSerial(s_running_game_serial);
if (entry)
entry->ApplySettings(g_settings, display_osd_messages);
}
}
else
{
Host::AddIconOSDMessage(
"compatibility_settings_disabled", ICON_FA_GAMEPAD,
TRANSLATE_STR("System", "Compatibility settings are not enabled. Some games may not function correctly."),
Host::OSD_WARNING_DURATION);
} }
g_settings.FixIncompatibleSettings(display_osd_messages); g_settings.FixIncompatibleSettings(display_osd_messages);