From ff3504d6918a9d3c70bd16f5a965925fae8cc26b Mon Sep 17 00:00:00 2001 From: fledge68 Date: Mon, 28 Oct 2013 12:02:47 +0000 Subject: [PATCH] -fix for source menu cat_page to be remembered when returning to wiiflow after playing a game. --- source/menu/menu_main.cpp | 8 +++++++- source/menu/menu_source.cpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index 4f402ded..a73cf6ea 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -306,7 +306,13 @@ int CMenu::main(void) m_cfg.save(); if(m_current_view == COVERFLOW_MAX) m_combined_view = true; - + else + { + s8 lastSrc = m_cfg.getInt("GENERAL", "last_source_btn", -1); + if(lastSrc >= 0 ) + m_catStartPage = m_source.getInt(fmt("BUTTON_%i", lastSrc), "cat_page", 1); + } + m_cfg.setInt("GENERAL", "last_source_btn", -1); if(m_cfg.getBool("GENERAL", "update_cache", false)) UpdateCache(); LoadView(); diff --git a/source/menu/menu_source.cpp b/source/menu/menu_source.cpp index 37d87c6d..c4c94f06 100644 --- a/source/menu/menu_source.cpp +++ b/source/menu/menu_source.cpp @@ -598,6 +598,7 @@ bool CMenu::_Source() string source = m_source.getString(btn_selected, "source", ""); if(BTN_A_PRESSED) { + m_cfg.setInt("GENERAL", "last_source_btn", i + j); _clearSources(); exitSource = true; m_catStartPage = 1;