Skip to content

Commit

Permalink
L/R no longer saves on Wii U
Browse files Browse the repository at this point in the history
SDL2 counts the "Close Software" button as pressing L for... some reason. This would cause the song index to decrement then save when closing the game, so I disabled saving here to "fix" it
  • Loading branch information
Mode8fx committed Oct 15, 2024
1 parent 682a236 commit a847d63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SuDokuLVS2019/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,17 +553,21 @@ int main(int argv, char** args) {
if (--soundSettings.musicIndex < 1)
soundSettings.musicIndex = 8;
playMusicAtIndex(soundSettings.musicIndex);
#if !defined(WII_U) // SDL2 counts the "Close Software" button as pressing L for... some reason
if (programState != 20) { // If you save in the Video settings menu, possible undesired video settings would also be saved (this could be fixed, but it's just not worth the trouble for such a small issue)
saveCurrentSettings();
}
#endif
}
if (keyPressed(INPUT_NEXT_TRACK) && wentPastTitleScreen) {
if (++soundSettings.musicIndex > 8)
soundSettings.musicIndex = 1;
playMusicAtIndex(soundSettings.musicIndex);
#if !defined(WII_U) // SDL2 counts the "Close Software" button as pressing L for... some reason
if (programState != 20) {
saveCurrentSettings();
}
#endif
}

if (windowSizeChanged) {
Expand Down

0 comments on commit a847d63

Please sign in to comment.