diff --git a/source/Menus/menu_main.cpp b/source/Menus/menu_main.cpp index 5a3a62e..b37ea9c 100644 --- a/source/Menus/menu_main.cpp +++ b/source/Menus/menu_main.cpp @@ -737,29 +737,51 @@ int MenuMain() if(next_page || rightBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS) && Options.navigation)) { rightBtn.ResetState(); - Settings.current_page++; - if(Settings.current_page > Settings.total_page) + //Settings.current_page++; + if(Settings.current_page < Settings.total_page) + { + Settings.current_page++; + // Settings.current_page = 1; + Settings.Apps_from = EFFECT_SLIDE_RIGHT; + Settings.Apps_to = EFFECT_SLIDE_LEFT; + + next_page = false; + change = true; + } + else if (Settings.total_page != 1) + { Settings.current_page = 1; - - Settings.Apps_from = EFFECT_SLIDE_RIGHT; - Settings.Apps_to = EFFECT_SLIDE_LEFT; - - next_page = false; - change = true; + Settings.Apps_from = EFFECT_SLIDE_LEFT; + Settings.Apps_to = EFFECT_SLIDE_RIGHT; + next_page = false; + change = true; + } + else { change = false; } } if(previous_page || leftBtn.GetState() == STATE_CLICKED || (WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) && Options.navigation)) { leftBtn.ResetState(); - Settings.current_page--; - if(Settings.current_page == 0) + if(Settings.current_page <= Settings.total_page && Settings.current_page > 1) + { // Settings.current_page = Settings.total_page; + + Settings.current_page--; + Settings.Apps_from = EFFECT_SLIDE_LEFT; + Settings.Apps_to = EFFECT_SLIDE_RIGHT; + + previous_page = false; + change = true; + } + else if (Settings.total_page != 1) + { Settings.current_page = Settings.total_page; - - Settings.Apps_from = EFFECT_SLIDE_LEFT; - Settings.Apps_to = EFFECT_SLIDE_RIGHT; - - previous_page = false; - change = true; + Settings.Apps_from = EFFECT_SLIDE_RIGHT; + Settings.Apps_to = EFFECT_SLIDE_LEFT; + + previous_page = false; + change = true; + } + else { change = false; } } if(change) diff --git a/updates b/updates index e114916..3a2f630 100644 --- a/updates +++ b/updates @@ -9,6 +9,7 @@ usb:/apps/NANDEmu-Boot/boot.dol) - Basic (= non-working) support for Homebew on DVD - No longer show the HBC if it's installed +- changing pages in an empty category no longer crashes - compiled with devkitppc 25-1 and libogc 1.8.10 //rev36: