Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Nov 14, 2024
1 parent ad41fa4 commit 6e11797
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions romsel_dsimenutheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,7 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
fadeSpeed = true; // Fast fade speed
bool gameTapped = false;
bool apChecked = false;
int apCheckTimer = 0;
bool hasAP = false;

while (1) {
Expand Down Expand Up @@ -3147,15 +3148,13 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
}
updateBoxArt();
if (!apChecked && (bnrRomType[CURPOS] == 0) && !isDSiWare[CURPOS]) {
static int timer = 0;
if (timer == 30) {
if (apCheckTimer == 30) {
if (checkIfShowAPMsg(dirContents[scrn].at(CURPOS + PAGENUM * 40).name)) {
hasAP = checkRomAP(dirContents[scrn].at(CURPOS + PAGENUM * 40).name.c_str(), CURPOS);
}
apChecked = true;
timer = 0;
}
timer++;
apCheckTimer++;
}
if (ms().theme < 4) {
while (dboxInFrame) {
Expand Down Expand Up @@ -3210,9 +3209,11 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
if ((held & KEY_LEFT) || ((held & KEY_TOUCH) && touch.py > 171 && touch.px < 19 && ms().theme == TWLSettings::EThemeDSi)) { // Left or button arrow (DSi theme)
moveCursor(false, dirContents[scrn]);
apChecked = false;
apCheckTimer = 0;
} else if ((held & KEY_RIGHT) || ((held & KEY_TOUCH) && touch.py > 171 && touch.px > 236 && ms().theme == TWLSettings::EThemeDSi)) { // Right or button arrow (DSi theme)
moveCursor(true, dirContents[scrn]);
apChecked = false;
apCheckTimer = 0;
} else if ((pressed & KEY_UP) && (PAGENUM > 0 || CURPOS > 0 || !backFound) && (ms().theme != TWLSettings::EThemeSaturn && ms().theme != TWLSettings::EThemeHBL) && !dirInfoIniFound && (ms().sortMethod == 4) && (CURPOS + PAGENUM * 40 < ((int)dirContents[scrn].size()))) { // Move apps (DSi & 3DS themes)
bannerTextShown = false; // Redraw the title when done
showSTARTborder = false;
Expand Down

0 comments on commit 6e11797

Please sign in to comment.