mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix #549
This commit is contained in:
parent
2e463c6b84
commit
cf7fa9e401
@ -1955,11 +1955,11 @@ u32 ShowGameFileTitleInfoF(const char* path, u16* screen, bool clear) {
|
|||||||
if (GetTmdContentPath(path_content, path) != 0) return 1;
|
if (GetTmdContentPath(path_content, path) != 0) return 1;
|
||||||
path = path_content;
|
path = path_content;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* buffer = (void*) malloc(max(sizeof(Smdh), sizeof(TwlIconData)));
|
void* buffer = (void*) malloc(max(sizeof(Smdh), sizeof(TwlIconData)));
|
||||||
Smdh* smdh = (Smdh*) buffer;
|
Smdh* smdh = (Smdh*) buffer;
|
||||||
TwlIconData* twl_icon = (TwlIconData*) buffer;
|
TwlIconData* twl_icon = (TwlIconData*) buffer;
|
||||||
|
|
||||||
// try loading SMDH, then try NDS / GBA
|
// try loading SMDH, then try NDS / GBA
|
||||||
u32 ret = 1;
|
u32 ret = 1;
|
||||||
if (LoadSmdhFromGameFile(path, smdh) == 0)
|
if (LoadSmdhFromGameFile(path, smdh) == 0)
|
||||||
@ -1968,8 +1968,8 @@ u32 ShowGameFileTitleInfoF(const char* path, u16* screen, bool clear) {
|
|||||||
((itype & GAME_TAD) && (fvx_qread(path, twl_icon, TAD_BANNER_OFFSET, sizeof(TwlIconData), NULL) == FR_OK)))
|
((itype & GAME_TAD) && (fvx_qread(path, twl_icon, TAD_BANNER_OFFSET, sizeof(TwlIconData), NULL) == FR_OK)))
|
||||||
ret = ShowTwlIconTitleInfo(twl_icon, screen);
|
ret = ShowTwlIconTitleInfo(twl_icon, screen);
|
||||||
else ret = ShowGbaFileTitleInfo(path, screen);
|
else ret = ShowGbaFileTitleInfo(path, screen);
|
||||||
|
|
||||||
if (clear) {
|
if (!ret && clear) {
|
||||||
while(!(InputWait(0) & (BUTTON_A | BUTTON_B)));
|
while(!(InputWait(0) & (BUTTON_A | BUTTON_B)));
|
||||||
ClearScreen(screen, COLOR_STD_BG);
|
ClearScreen(screen, COLOR_STD_BG);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user