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