Skip to content

Commit

Permalink
DS Classic Menu: Keep cursor visible when launching a title
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Aug 17, 2024
1 parent 5e8a78b commit 67e460e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions quickmenu/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ float cursorTLPrev = 0.0f, cursorTRPrev = 0.0f, cursorBLPrev = 0.0f, cursorBRPre

extern int spawnedtitleboxes;

extern bool showCursor;
// extern bool showCursor;
extern bool startMenu;
extern MenuEntry cursorPosition;

Expand Down Expand Up @@ -612,7 +612,7 @@ void vBlankHandler()
static bool whiteScreenPrev = whiteScreen;
static bool showProgressBarPrev = showProgressBar;
static int progressBarLengthPrev = progressBarLength;
static bool showCursorPrev = showCursor;
// static bool showCursorPrev = showCursor;
static bool startMenuPrev = startMenu;

if (whiteScreenPrev != whiteScreen) {
Expand All @@ -630,10 +630,10 @@ void vBlankHandler()
updateFrame = true;
}

if (showCursorPrev != showCursor) {
/* if (showCursorPrev != showCursor) {
showCursorPrev = showCursor;
updateFrame = true;
}
} */

if (startMenuPrev != startMenu) {
startMenuPrev = startMenu;
Expand Down Expand Up @@ -730,7 +730,7 @@ void vBlankHandler()
glSprite(235, iconYpos[6], GL_FLIP_NONE, getMenuEntryTexture(MenuEntry::MANUAL));

// Draw cursor
if (showCursor) {
// if (showCursor) {
auto drawCursorRect = [](int x1, int y1, int x2, int y2) {
glSprite(x1, y1, GL_FLIP_NONE, &cursor.images[0]);
glSprite(x2, y1, GL_FLIP_NONE, &cursor.images[1]);
Expand All @@ -741,7 +741,7 @@ void vBlankHandler()
updateCursorTargetPos();

drawCursorRect(std::roundf(cursorTL), std::roundf(cursorBL), std::roundf(cursorTR), std::roundf(cursorBR));
}
// }


if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
Expand Down
24 changes: 12 additions & 12 deletions quickmenu/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int mpusize = 0;

bool applaunch = false;
bool dsModeForced = false;
bool showCursor = true;
// bool showCursor = true;
bool startMenu = false;
MenuEntry cursorPosition = MenuEntry::CART;

Expand Down Expand Up @@ -1838,7 +1838,7 @@ int dsClassicMenu(void) {
if (flashcardFound() && (io_dldi_data->ioInterface.features & FEATURE_SLOT_NDS)) {
// Launch last-run ROM (Secondary)
if (ms().launchType[1] == 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[0] = true;
Expand All @@ -1847,7 +1847,7 @@ int dsClassicMenu(void) {
}
loadROMselect();
} else if (ms().launchType[1] > 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[0] = true;
Expand All @@ -1863,7 +1863,7 @@ int dsClassicMenu(void) {
ms().secondaryDevice = true;
} else if ((!flashcardFound() && REG_SCFG_MC != 0x11) || (io_dldi_data->ioInterface.features & FEATURE_SLOT_GBA)) {
// Launch Slot-1
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[0] = true;
Expand All @@ -1888,7 +1888,7 @@ int dsClassicMenu(void) {
break;
case MenuEntry::PICTOCHAT:
if (pictochatFound) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[1] = true;
Expand Down Expand Up @@ -1982,7 +1982,7 @@ int dsClassicMenu(void) {
break;
case MenuEntry::DOWNLOADPLAY:
if (dlplayFound) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[2] = true;
Expand Down Expand Up @@ -2078,7 +2078,7 @@ int dsClassicMenu(void) {
if (io_dldi_data->ioInterface.features & FEATURE_SLOT_GBA) {
// Launch last-run ROM (Secondary)
if (ms().launchType[1] == 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[3] = true;
Expand All @@ -2087,7 +2087,7 @@ int dsClassicMenu(void) {
}
loadROMselect();
} else if (ms().launchType[1] > 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[3] = true;
Expand All @@ -2104,7 +2104,7 @@ int dsClassicMenu(void) {
} else if (sdFound()) {
// Launch last-run ROM (SD)
if (ms().launchType[0] == 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[3] = true;
Expand All @@ -2113,7 +2113,7 @@ int dsClassicMenu(void) {
}
loadROMselect();
} else if (ms().launchType[0] > 0) {
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[3] = true;
Expand All @@ -2129,7 +2129,7 @@ int dsClassicMenu(void) {
ms().secondaryDevice = false;
} else if (/* sys().isRegularDS() && */ ms().gbaBooter == TWLSettings::EGbaNativeGbar2 && ((u8*)GBAROM)[0xB2] == 0x96) {
// Switch to GBA mode
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[3] = true;
Expand All @@ -2151,7 +2151,7 @@ int dsClassicMenu(void) {
case MenuEntry::SETTINGS:
case MenuEntry::MANUAL:
// Launch settings
showCursor = false;
// showCursor = false;
fadeType = false; // Fade to white
mmEffectEx(&snd_launch);
moveIconUp[(selectedPosition == MenuEntry::SETTINGS) ? 5 : 6] = true;
Expand Down

0 comments on commit 67e460e

Please sign in to comment.