mirror of https://github.com/mgba-emu/mgba.git
mGUI: Fix cycling through config setting states with accept button
This commit is contained in:
parent
cece343806
commit
002c59d79c
1
CHANGES
1
CHANGES
|
@ -28,6 +28,7 @@ Other fixes:
|
|||
- Qt: Fix stride changing when toggling SGB borders (fixes mgba.io/i/1898)
|
||||
- Qt: Fix aliasing on background logo (fixes mgba.io/i/1886)
|
||||
- mGUI: Fix closing down a game if an exit is signalled
|
||||
- mGUI: Fix cycling through config setting states with accept button
|
||||
- mVL: Fix injecting accidentally draining non-injection buffer
|
||||
- VFS: Fix directory node listing on some filesystems
|
||||
Misc:
|
||||
|
|
|
@ -332,8 +332,14 @@ void mGUIShowConfig(struct mGUIRunner* runner, struct GUIMenuItem* extra, size_t
|
|||
}
|
||||
#endif
|
||||
if (item->validStates) {
|
||||
++item->state;
|
||||
if (item->state >= item->nStates) {
|
||||
if (item->state < item->nStates - 1) {
|
||||
do {
|
||||
++item->state;
|
||||
} while (!item->validStates[item->state] && item->state < item->nStates - 1);
|
||||
if (!item->validStates[item->state]) {
|
||||
item->state = 0;
|
||||
}
|
||||
} else {
|
||||
item->state = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue