mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2026-09-24 18:23:30 -05:00
[Example Plugin] Updated the example plugin to override the OSFatal function.
The new OSFatal function logs the old message, and the calls the "real" OSFatal with a new String. [General] - Added the .sdata section to the wups.ld - Added all library_types to the enum - Updated the wups_loader_entry_t struct to store the needed data - Simplified the WUPS_MUST_REPLACE macro - Removed unneeded stuff
This commit is contained in:
@@ -11,21 +11,18 @@ WUPS_MODULE_VERSION("v1.0");
|
||||
WUPS_MODULE_AUTHOR("Maschell");
|
||||
WUPS_MODULE_LICENSE("BSD");
|
||||
|
||||
int func(void);
|
||||
|
||||
|
||||
static int my_func2(void)
|
||||
{
|
||||
DECL_FUNCTION(void,OSFatal,char * msg){
|
||||
InitOSFunctionPointers();
|
||||
InitSocketFunctionPointers();
|
||||
|
||||
log_init();
|
||||
|
||||
//log_printf is not working.
|
||||
log_print("Logging from custom function.\n");
|
||||
|
||||
return 43;
|
||||
log_print(msg);
|
||||
log_print("\n^--- Someone called OSFatal with this string. Lets modify it. Bye bye =(\n");
|
||||
real_OSFatal("Does the replacement work?");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WUPS_MUST_REPLACE(func,WUPS_LOADER_LIBRARY_GX2, my_func2);
|
||||
WUPS_MUST_REPLACE(OSFatal,WUPS_LOADER_LIBRARY_COREINIT, OSFatal);
|
||||
|
||||
Reference in New Issue
Block a user