mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-12-27 10:01:48 +01:00
bugfix: changing crashes in an empty page no longer crashes
This commit is contained in:
parent
40cb2e9207
commit
6f81bce911
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user