Skip to content

Commit

Permalink
DSi theme: Fix drop down animation playing 5 frames behind a white sc…
Browse files Browse the repository at this point in the history
…reen
  • Loading branch information
RocketRobz committed Sep 26, 2024
1 parent 18aa216 commit 8b5394c
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions romsel_dsimenutheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,6 @@ void getDirectoryContents(std::vector<DirEntry> &dirContents, const std::vector<
}
}

void waitForFadeOut(void) {
if (!dropDown && ms().theme == TWLSettings::EThemeDSi) {
dropDown = true;
while (!screenFadedIn()) { bgOperations(true); }
}
}

bool nowLoadingDisplaying = false;

void displayNowLoading(void) {
Expand Down Expand Up @@ -3074,9 +3067,12 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
if (!musicplaying && ms().theme == TWLSettings::EThemeDSi) {
fadeSpeed = false; // Slow fade speed
fadeType = true; // Fade in from white
for (int i = 0; i < 15; i++) {
for (int i = 0; i < 20; i++) {
bgOperations(true);
}
if (!dropDown) {
dropDown = true;
}
} else {
fadeType = true; // Fade in from white
for (int i = 0; i < 5; i++) {
Expand All @@ -3100,13 +3096,10 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
}

controlTopBright = true;
if (ms().theme != TWLSettings::EThemeDSi) {
while (!screenFadedIn()) { swiWaitForVBlank(); }
}
while (!screenFadedIn()) { swiWaitForVBlank(); }
musicplaying = true;
}

waitForFadeOut();
controlTopBright = false;
fadeSpeed = true; // Fast fade speed
bool gameTapped = false;
Expand Down

0 comments on commit 8b5394c

Please sign in to comment.