mirror of
https://github.com/wiiu-env/NotificationModule.git
synced 2024-11-14 16:05:09 +01:00
Add missing OSFatals and make existing OSFatals more verbose
This commit is contained in:
parent
b07a46bee6
commit
fc41c6a6a7
@ -114,7 +114,7 @@ DECL_FUNCTION(void, GX2Init, uint32_t attributes) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Init Overlay");
|
||||
gOverlayFrame = new (std::nothrow) OverlayFrame(1280.0f, 720.0f);
|
||||
if (!gOverlayFrame) {
|
||||
OSFatal("Failed to alloc gOverlayFrame");
|
||||
OSFatal("NotificationModule: Failed to alloc gOverlayFrame");
|
||||
}
|
||||
|
||||
// Add notification that had been called before the overlay was ready
|
||||
@ -124,12 +124,16 @@ DECL_FUNCTION(void, GX2Init, uint32_t attributes) {
|
||||
gOverlayQueueDuringStartup.clear();
|
||||
|
||||
// Allocate shader.
|
||||
ColorShader::instance();
|
||||
Texture2DShader::instance();
|
||||
if (ColorShader::instance() == nullptr) {
|
||||
OSFatal("NotificationModule: Failed to alloc ColorShader");
|
||||
}
|
||||
if (Texture2DShader::instance() == nullptr) {
|
||||
OSFatal("NotificationModule: Failed to alloc Texture2DShader");
|
||||
}
|
||||
|
||||
// has been allocated in WUMS INIT
|
||||
if (!gContextState) {
|
||||
OSFatal("Failed to alloc gContextState");
|
||||
OSFatal("NotificationModule: Failed to alloc gContextState");
|
||||
}
|
||||
real_GX2SetupContextStateEx(gContextState, GX2_TRUE);
|
||||
DCInvalidateRange(gContextState, sizeof(GX2ContextState)); // Important!
|
||||
|
@ -20,7 +20,7 @@ WUMS_INITIALIZE() {
|
||||
initLogging();
|
||||
|
||||
if (FunctionPatcher_InitLibrary() != FUNCTION_PATCHER_RESULT_SUCCESS) {
|
||||
OSFatal("homebrew_notifications: FunctionPatcher_InitLibrary failed");
|
||||
OSFatal("NotificationModule: FunctionPatcher_InitLibrary failed");
|
||||
}
|
||||
DEBUG_FUNCTION_LINE("Patch NotificationModule functions");
|
||||
for (uint32_t i = 0; i < function_replacements_size; i++) {
|
||||
@ -38,7 +38,7 @@ WUMS_INITIALIZE() {
|
||||
sizeof(GX2ContextState),
|
||||
GX2_CONTEXT_STATE_ALIGNMENT);
|
||||
if (gContextState == nullptr) {
|
||||
OSFatal("Failed to allocate gContextState");
|
||||
OSFatal("NotificationModule: Failed to allocate gContextState");
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("Allocated %d bytes for gCont extState", sizeof(GX2ContextState));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user