mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-20 18:33:24 +02:00
Change the coding style of GameListIconSize bounds check to use the enum instead of magic numbers
This commit is contained in:
parent
24ec11f928
commit
ccf6d380af
@ -300,11 +300,13 @@ void Config::ReadValues() {
|
|||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
qt_config->beginGroup("GameList");
|
qt_config->beginGroup("GameList");
|
||||||
int icon_size = ReadSetting("iconSize", 2).toInt();
|
UISettings::GameListIconSize icon_size = UISettings::GameListIconSize{
|
||||||
if (icon_size < 0 || icon_size > 2) {
|
ReadSetting("iconSize", static_cast<int>(UISettings::GameListIconSize::LargeIcon)).toInt()};
|
||||||
icon_size = 2;
|
if (icon_size < UISettings::GameListIconSize::NoIcon ||
|
||||||
|
icon_size > UISettings::GameListIconSize::LargeIcon) {
|
||||||
|
icon_size = UISettings::GameListIconSize::LargeIcon;
|
||||||
}
|
}
|
||||||
UISettings::values.game_list_icon_size = UISettings::GameListIconSize{icon_size};
|
UISettings::values.game_list_icon_size = icon_size;
|
||||||
|
|
||||||
int row_1 = ReadSetting("row1", 2).toInt();
|
int row_1 = ReadSetting("row1", 2).toInt();
|
||||||
if (row_1 < 0 || row_1 > 3) {
|
if (row_1 < 0 || row_1 > 3) {
|
||||||
|
Loading…
Reference in New Issue
Block a user