From c866a8e42870f7e6d5952f39d3b33b62c52d08b3 Mon Sep 17 00:00:00 2001 From: vitor-k Date: Thu, 5 Sep 2019 14:28:40 -0300 Subject: [PATCH] Change GameListText order to improve configuration compatibility --- src/citra_qt/configuration/config.cpp | 4 ++-- src/citra_qt/configuration/configure_ui.ui | 8 ++++---- src/citra_qt/uisettings.h | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index ddcb71e3d2..6b214216e6 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -307,13 +307,13 @@ void Config::ReadValues() { UISettings::values.game_list_icon_size = UISettings::GameListIconSize{icon_size}; int row_1 = ReadSetting("row1", 2).toInt(); - if (row_1 < 0 || row_1 > 3) { + if (row_1 < 0 || row_1 >= UISettings::GAME_LIST_TEXT_LENGTH) { row_1 = 2; } UISettings::values.game_list_row_1 = UISettings::GameListText{row_1}; int row_2 = ReadSetting("row2", 0).toInt(); - if (row_2 < -1 || row_2 > 3) { + if (row_2 < -1 || row_2 >= UISettings::GAME_LIST_TEXT_LENGTH) { row_2 = 0; } UISettings::values.game_list_row_2 = UISettings::GameListText{row_2}; diff --git a/src/citra_qt/configuration/configure_ui.ui b/src/citra_qt/configuration/configure_ui.ui index 82a5a4283e..c9a0a659ec 100644 --- a/src/citra_qt/configuration/configure_ui.ui +++ b/src/citra_qt/configuration/configure_ui.ui @@ -131,12 +131,12 @@ - Title Name (long) + Title ID - Title ID + Title Name (long) @@ -176,12 +176,12 @@ - Title Name (long) + Title ID - Title ID + Title Name (long) diff --git a/src/citra_qt/uisettings.h b/src/citra_qt/uisettings.h index eaef36f3e8..e94b94d207 100644 --- a/src/citra_qt/uisettings.h +++ b/src/citra_qt/uisettings.h @@ -50,9 +50,11 @@ enum class GameListText { FileName, ///< Display the file name of the entry FullPath, ///< Display the full path of the entry TitleName, ///< Display the name of the title - LongTitleName, ///< Display the long name of the title TitleID, ///< Display the title ID + LongTitleName, ///< Display the long name of the title }; +// The length of the GameListText, excluding NoText +constexpr int GAME_LIST_TEXT_LENGTH = 5; struct Values { QByteArray geometry;