2020-04-29 17:53:53 +02:00
|
|
|
extern "C" void OSFatal(const char *msg);
|
|
|
|
|
2021-09-24 19:57:15 +02:00
|
|
|
extern "C" void __wups_start() {
|
2020-04-29 17:53:53 +02:00
|
|
|
OSFatal("This file needs to be run with the Wii U Plugin System.");
|
|
|
|
}
|
2021-09-17 16:28:37 +02:00
|
|
|
|
|
|
|
extern __attribute__((weak)) void __wut_socket_init_devoptab();
|
2021-09-24 19:57:15 +02:00
|
|
|
|
2021-09-17 16:28:37 +02:00
|
|
|
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() {
|
2021-09-24 19:57:15 +02:00
|
|
|
if (!&__wut_socket_init_devoptab) return;
|
2021-09-17 16:28:37 +02:00
|
|
|
if (!__wut_socket_devoptab_added) {
|
|
|
|
socket_lib_init();
|
|
|
|
__wut_socket_init_devoptab();
|
|
|
|
__wut_socket_devoptab_added = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void __attribute__((weak)) __fini_wut_socket() {
|
2021-09-24 19:57:15 +02:00
|
|
|
if (!&__wut_socket_init_devoptab || !&__wut_socket_fini_devoptab) return;
|
2021-09-17 16:28:37 +02:00
|
|
|
if (__wut_socket_devoptab_added) {
|
|
|
|
__wut_socket_fini_devoptab();
|
|
|
|
__wut_socket_devoptab_added = 0;
|
|
|
|
}
|
|
|
|
}
|