mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 13:26:30 -05:00
ui_settings: Add option to cache game list
This commit is contained in:
parent
90c9d703ba
commit
180f22f17e
2 changed files with 3 additions and 0 deletions
|
@ -645,6 +645,7 @@ void Config::ReadUIGamelistValues() {
|
||||||
UISettings::values.icon_size = ReadSetting(QStringLiteral("icon_size"), 64).toUInt();
|
UISettings::values.icon_size = ReadSetting(QStringLiteral("icon_size"), 64).toUInt();
|
||||||
UISettings::values.row_1_text_id = ReadSetting(QStringLiteral("row_1_text_id"), 3).toUInt();
|
UISettings::values.row_1_text_id = ReadSetting(QStringLiteral("row_1_text_id"), 3).toUInt();
|
||||||
UISettings::values.row_2_text_id = ReadSetting(QStringLiteral("row_2_text_id"), 2).toUInt();
|
UISettings::values.row_2_text_id = ReadSetting(QStringLiteral("row_2_text_id"), 2).toUInt();
|
||||||
|
UISettings::values.cache_game_list = ReadSetting(QStringLiteral("cache_game_list"), true).toBool();
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
@ -1009,6 +1010,7 @@ void Config::SaveUIGamelistValues() {
|
||||||
WriteSetting(QStringLiteral("icon_size"), UISettings::values.icon_size, 64);
|
WriteSetting(QStringLiteral("icon_size"), UISettings::values.icon_size, 64);
|
||||||
WriteSetting(QStringLiteral("row_1_text_id"), UISettings::values.row_1_text_id, 3);
|
WriteSetting(QStringLiteral("row_1_text_id"), UISettings::values.row_1_text_id, 3);
|
||||||
WriteSetting(QStringLiteral("row_2_text_id"), UISettings::values.row_2_text_id, 2);
|
WriteSetting(QStringLiteral("row_2_text_id"), UISettings::values.row_2_text_id, 2);
|
||||||
|
WriteSetting(QStringLiteral("cache_game_list"), UISettings::values.cache_game_list, true);
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ struct Values {
|
||||||
uint8_t row_1_text_id;
|
uint8_t row_1_text_id;
|
||||||
uint8_t row_2_text_id;
|
uint8_t row_2_text_id;
|
||||||
std::atomic_bool is_game_list_reload_pending{false};
|
std::atomic_bool is_game_list_reload_pending{false};
|
||||||
|
bool cache_game_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Values values;
|
extern Values values;
|
||||||
|
|
Loading…
Reference in a new issue