Skip to content

Commit

Permalink
cclcc-librarymenu: fix Option, Help and Library menu exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Enorovan committed Sep 15, 2024
2 parents 3d31d58 + 01cd3d6 commit 27d7461
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/vm/inst_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ VmInstruction(InstOption) {
ResetInstruction;
BlockThread;
} else {
SetFlag(SF_RETURNTITLE, true);
SetFlag(SF_SUBMENUEXIT, true);
Interface::PADinputButtonWentDown |= Interface::PAD1A;
}
ImpLogSlow(LL_Warning, LC_VMStub,
Expand Down Expand Up @@ -250,6 +250,14 @@ VmInstruction(InstHelp) {
ImpLogSlow(LL_Warning, LC_VMStub, "STUB instruction Help(type: Init)\n");
break;
case 1: // Main
if (!((Interface::PADinputButtonWentDown & Interface::PAD1B) ||
(Interface::PADinputMouseWentDown & Interface::PAD1B))) {
ResetInstruction;
BlockThread;
} else {
SetFlag(SF_SUBMENUEXIT, true);
Interface::PADinputButtonWentDown |= Interface::PAD1A;
}
ImpLogSlow(LL_Warning, LC_VMStub, "STUB instruction Help(type: Main)\n");
break;
}
Expand Down Expand Up @@ -308,7 +316,7 @@ VmInstruction(InstAlbum) {
ResetInstruction;
BlockThread;
} else {
SetFlag(SF_RETURNTITLE, true);
SetFlag(SF_ALBUMEND, true);
Interface::PADinputButtonWentDown |= Interface::PAD1A;
}
ImpLogSlow(LL_Warning, LC_VMStub,
Expand Down

0 comments on commit 27d7461

Please sign in to comment.