mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-11-13 22:35:13 +01:00
Override __init_wut_socket and __fini_wut_socket
This commit is contained in:
parent
57bebfc265
commit
2bff8c2653
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@ debug/
|
|||||||
*.jekyll-metadata
|
*.jekyll-metadata
|
||||||
*.cbp
|
*.cbp
|
||||||
lib/
|
lib/
|
||||||
|
cmake-build-debug/
|
||||||
|
@ -4,3 +4,26 @@ extern "C" void __wups_start(){
|
|||||||
OSFatal("This file needs to be run with the Wii U Plugin System.");
|
OSFatal("This file needs to be run with the Wii U Plugin System.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern __attribute__((weak)) void __wut_socket_init_devoptab();
|
||||||
|
extern __attribute__((weak)) void __wut_socket_fini_devoptab();
|
||||||
|
|
||||||
|
static int __wut_socket_devoptab_added = 0;
|
||||||
|
|
||||||
|
extern void socket_lib_init();
|
||||||
|
|
||||||
|
void __attribute__((weak)) __init_wut_socket() {
|
||||||
|
if(!&__wut_socket_init_devoptab) return;
|
||||||
|
if (!__wut_socket_devoptab_added) {
|
||||||
|
socket_lib_init();
|
||||||
|
__wut_socket_init_devoptab();
|
||||||
|
__wut_socket_devoptab_added = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void __attribute__((weak)) __fini_wut_socket() {
|
||||||
|
if(!&__wut_socket_init_devoptab || !&__wut_socket_fini_devoptab) return;
|
||||||
|
if (__wut_socket_devoptab_added) {
|
||||||
|
__wut_socket_fini_devoptab();
|
||||||
|
__wut_socket_devoptab_added = 0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user