This commit is contained in:
Lior Halphon 2022-07-02 22:40:37 +03:00
parent 7071032288
commit e466c3c5b1

View File

@ -401,10 +401,12 @@ const char *current_model_string(unsigned index)
static void cycle_cgb_revision(unsigned index) static void cycle_cgb_revision(unsigned index)
{ {
configuration.cgb_revision++;
if (configuration.cgb_revision == GB_MODEL_CGB_E - GB_MODEL_CGB_0) { if (configuration.cgb_revision == GB_MODEL_CGB_E - GB_MODEL_CGB_0) {
configuration.cgb_revision = 0; configuration.cgb_revision = 0;
} }
else {
configuration.cgb_revision++;
}
pending_command = GB_SDL_RESET_COMMAND; pending_command = GB_SDL_RESET_COMMAND;
} }
@ -413,7 +415,9 @@ static void cycle_cgb_revision_backwards(unsigned index)
if (configuration.cgb_revision == 0) { if (configuration.cgb_revision == 0) {
configuration.cgb_revision = GB_MODEL_CGB_E - GB_MODEL_CGB_0; configuration.cgb_revision = GB_MODEL_CGB_E - GB_MODEL_CGB_0;
} }
else {
configuration.cgb_revision--; configuration.cgb_revision--;
}
pending_command = GB_SDL_RESET_COMMAND; pending_command = GB_SDL_RESET_COMMAND;
} }