mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-11-22 09:59:17 +01:00
Add default icon when a .rpx is loaded or the .wuhb contains no icon
This commit is contained in:
parent
9b04ae206b
commit
85fb2c141e
1
Makefile
1
Makefile
@ -22,6 +22,7 @@ WUT_ROOT := $(DEVKITPRO)/wut
|
|||||||
TARGET := RPXLoadingModule
|
TARGET := RPXLoadingModule
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := src \
|
SOURCES := src \
|
||||||
|
src/data \
|
||||||
src/utils
|
src/utils
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := src
|
INCLUDES := src
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "RPXLoading.h"
|
#include "RPXLoading.h"
|
||||||
|
#include "data/defaultIcon.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "utils/FileReader.h"
|
#include "utils/FileReader.h"
|
||||||
#include "utils/StringTools.h"
|
#include "utils/StringTools.h"
|
||||||
@ -172,6 +173,7 @@ RPXLoaderStatus RL_PrepareLaunchFromSD(const char *bundle_path) {
|
|||||||
memcpy(gReplacementInfo.rpxReplacementInfo.iconCache, buffer, cpySize);
|
memcpy(gReplacementInfo.rpxReplacementInfo.iconCache, buffer, cpySize);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
} else {
|
} else {
|
||||||
|
memcpy(gReplacementInfo.rpxReplacementInfo.iconCache, defaultIconTexTGA, ICON_SIZE);
|
||||||
DEBUG_FUNCTION_LINE_ERR("Failed to read iconTex.tga");
|
DEBUG_FUNCTION_LINE_ERR("Failed to read iconTex.tga");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +184,7 @@ RPXLoaderStatus RL_PrepareLaunchFromSD(const char *bundle_path) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) {
|
if (!gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) {
|
||||||
memset(gReplacementInfo.rpxReplacementInfo.iconCache, 0, sizeof(gReplacementInfo.rpxReplacementInfo.iconCache));
|
memcpy(gReplacementInfo.rpxReplacementInfo.iconCache, defaultIconTexTGA, ICON_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5468
src/data/defaultIcon.c
Normal file
5468
src/data/defaultIcon.c
Normal file
File diff suppressed because it is too large
Load Diff
3
src/data/defaultIcon.h
Normal file
3
src/data/defaultIcon.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern uint8_t defaultIconTexTGA[];
|
Loading…
Reference in New Issue
Block a user