mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2024-11-22 02:29:15 +01:00
Make sure the wiiload thread is cleaned up
This commit is contained in:
parent
a0ad379b95
commit
03b9a7a928
17
src/main.cpp
17
src/main.cpp
@ -24,13 +24,6 @@ INITIALIZE_PLUGIN() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Entry point */
|
||||
ON_APPLICATION_START() {
|
||||
initLogging();
|
||||
DEBUG_FUNCTION_LINE("Start wiiload thread");
|
||||
thread = new TcpReceiver(4299);
|
||||
}
|
||||
|
||||
void stopThread() {
|
||||
if (thread != nullptr) {
|
||||
delete thread;
|
||||
@ -38,6 +31,16 @@ void stopThread() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Entry point */
|
||||
ON_APPLICATION_START() {
|
||||
initLogging();
|
||||
stopThread();
|
||||
DEBUG_FUNCTION_LINE("Start wiiload thread");
|
||||
thread = new TcpReceiver(4299);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ON_APPLICATION_REQUESTS_EXIT() {
|
||||
DEBUG_FUNCTION_LINE("Stop wiiload thread");
|
||||
stopThread();
|
||||
|
Loading…
Reference in New Issue
Block a user