From a6a9fff50f67208a01110dc00aa195aa60524b6a Mon Sep 17 00:00:00 2001 From: Aloshi Date: Thu, 5 Mar 2015 17:33:19 -0600 Subject: [PATCH] Fixed non-ASCII characters never setting an initial selected value for "jump to letter." --- es-app/src/guis/GuiGamelistOptions.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index 635f97e19..e019cd7e6 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -10,12 +10,13 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : Gui addChild(&mMenu); // jump to letter - char curChar = getGamelist()->getCursor()->getName()[0]; + char curChar = toupper(getGamelist()->getCursor()->getName()[0]); + if(curChar < 'A' || curChar > 'Z') + curChar = 'A'; + mJumpToLetterList = std::make_shared(mWindow, "JUMP TO LETTER", false); for(char c = 'A'; c <= 'Z'; c++) - { mJumpToLetterList->add(std::string(1, c), c, c == curChar); - } ComponentListRow row; row.addElement(std::make_shared(mWindow, "JUMP TO LETTER", Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);