mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2026-09-25 02:25:55 -05:00
[Example Plugin] Updated the example plugin
- It's now linking with libc/libutils/libdynamiclibs - moved the main.c into the a "src" folder [Loader]- Added DCFlushRange and DCInvalidateRange - Improved logging. Finally we can load the plugin from the sdcard and call it's function!
This commit is contained in:
31
example_plugin/src/main.c
Normal file
31
example_plugin/src/main.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <wups.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "dynamic_libs/os_functions.h"
|
||||
#include "dynamic_libs/socket_functions.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
|
||||
WUPS_MODULE_NAME("test module");
|
||||
WUPS_MODULE_VERSION("v1.0");
|
||||
WUPS_MODULE_AUTHOR("Maschell");
|
||||
WUPS_MODULE_LICENSE("BSD");
|
||||
|
||||
int func(void);
|
||||
|
||||
|
||||
static int my_func2(void)
|
||||
{
|
||||
InitOSFunctionPointers();
|
||||
InitSocketFunctionPointers();
|
||||
|
||||
log_init();
|
||||
|
||||
//log_printf is not working.
|
||||
log_print("Logging from custom function.\n");
|
||||
|
||||
return 43;
|
||||
}
|
||||
|
||||
|
||||
WUPS_MUST_REPLACE(func,WUPS_LOADER_LIBRARY_GX2, my_func2);
|
||||
Reference in New Issue
Block a user