update graphics api button indicator (#6625)

* update graphics api button indicator

This tiny pull request
* update the graphics button indicator when launching or closing a game (graphics button doesn't update with per game configuration)

* Disable graphics button indicator click while in game

* fix crash

* It fixed crash when opening configure dialog in game if the graphics api for the game is different of the global graphics api
This commit is contained in:
luc-git
2023-06-20 14:27:36 +02:00
committed by GitHub
parent d735f5c458
commit 08970e7ba0
2 changed files with 6 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ void SetPerGameSetting(QComboBox* combobox,
/// account per-game status
template <typename Type, bool ranged>
Type GetComboboxSetting(int index, const Settings::SwitchableSetting<Type, ranged>* setting) {
if (Settings::IsConfiguringGlobal() && setting->UsingGlobal()) {
if (Settings::IsConfiguringGlobal() || setting->UsingGlobal()) {
return static_cast<Type>(index);
} else if (!Settings::IsConfiguringGlobal()) {
if (index == 0) {