Fix displaying the name/icon of an application

This commit is contained in:
Maschell 2021-04-13 20:14:50 +02:00
parent 26be607bfd
commit d28b4b3068
3 changed files with 9 additions and 3 deletions

View File

@ -198,11 +198,11 @@ bool RL_LoadFromSDOnNextLaunch(const char *bundle_path) {
DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo)); DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo));
if (!success) { if (!success) {
gReplacementInfo.rpxReplacementInfo.isRPXReplaced = false; gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced = false;
DEBUG_FUNCTION_LINE("Failed to load %s on next restart", request.path); DEBUG_FUNCTION_LINE("Failed to load %s on next restart", request.path);
return false; return false;
} else { } else {
gReplacementInfo.rpxReplacementInfo.isRPXReplaced = true; gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced = true;
} }
DEBUG_FUNCTION_LINE("Launch %s on next restart [size: %08X offset: %08X]", request.path, request.filesize, request.fileoffset); DEBUG_FUNCTION_LINE("Launch %s on next restart [size: %08X offset: %08X]", request.path, request.filesize, request.fileoffset);
@ -216,7 +216,7 @@ bool RL_LoadFromSDOnNextLaunch(const char *bundle_path) {
gReplacementInfo.contentReplacementInfo.mode = CONTENTREDIRECT_FROM_WUHB_BUNDLE; gReplacementInfo.contentReplacementInfo.mode = CONTENTREDIRECT_FROM_WUHB_BUNDLE;
} else { } else {
DEBUG_FUNCTION_LINE("Loaded file is no bundle"); DEBUG_FUNCTION_LINE("Loaded file is no bundle");
gReplacementInfo.rpxReplacementInfo.isRPXReplaced = true; gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced = true;
if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE &&
gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) { gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) {

View File

@ -14,6 +14,7 @@ typedef struct BundleMountInformation_t {
} BundleMountInformation; } BundleMountInformation;
typedef struct RPXReplacementInfo_t { typedef struct RPXReplacementInfo_t {
bool willRPXBeReplaced;
bool isRPXReplaced; bool isRPXReplaced;
MetaInformation metaInformation; MetaInformation metaInformation;
char iconCache[65580]; char iconCache[65580];

View File

@ -43,6 +43,7 @@ WUMS_APPLICATION_ENDS() {
DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo)); DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo));
} }
} }
gReplacementInfo.rpxReplacementInfo.isRPXReplaced = false;
} }
WUMS_APPLICATION_STARTS() { WUMS_APPLICATION_STARTS() {
@ -50,6 +51,10 @@ WUMS_APPLICATION_STARTS() {
if (upid != 2 && upid != 15) { if (upid != 2 && upid != 15) {
return; return;
} }
if (gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced) {
gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced = false;
gReplacementInfo.rpxReplacementInfo.isRPXReplaced = true;
}
WHBLogUdpInit(); WHBLogUdpInit();
if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) { if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) {
return; return;