mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2024-11-22 10:39:16 +01:00
40 lines
707 B
C++
40 lines
707 B
C++
#include <wups.h>
|
|
#include "utils/TcpReceiver.h"
|
|
#include <whb/libmanager.h>
|
|
|
|
WUPS_PLUGIN_NAME("Wiiload");
|
|
WUPS_PLUGIN_DESCRIPTION("Wiiload Server");
|
|
WUPS_PLUGIN_VERSION("0.1");
|
|
WUPS_PLUGIN_AUTHOR("Maschell");
|
|
WUPS_PLUGIN_LICENSE("GPL");
|
|
|
|
WUPS_USE_WUT_CRT()
|
|
|
|
TcpReceiver * thread = NULL;
|
|
|
|
|
|
/* Entry point */
|
|
ON_APPLICATION_START(args) {
|
|
WHBInitializeSocketLibrary();
|
|
|
|
log_init();
|
|
DEBUG_FUNCTION_LINE("Started wiiload thread\n");
|
|
thread = new TcpReceiver(4299);
|
|
}
|
|
|
|
void stopThread(){
|
|
if(thread != NULL){
|
|
delete thread;
|
|
thread = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
ON_APPLICATION_END(){
|
|
DEBUG_FUNCTION_LINE("Kill thread\n");
|
|
stopThread();
|
|
|
|
DEBUG_FUNCTION_LINE("Unmount SD\n");
|
|
}
|
|
|