mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2024-11-25 12:06:52 +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() {
|
void stopThread() {
|
||||||
if (thread != nullptr) {
|
if (thread != nullptr) {
|
||||||
delete thread;
|
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() {
|
ON_APPLICATION_REQUESTS_EXIT() {
|
||||||
DEBUG_FUNCTION_LINE("Stop wiiload thread");
|
DEBUG_FUNCTION_LINE("Stop wiiload thread");
|
||||||
stopThread();
|
stopThread();
|
||||||
|
Loading…
Reference in New Issue
Block a user