mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2025-02-16 18:19:18 +01:00
Abort launch if loading a homebrew fails
This commit is contained in:
parent
6189288b5a
commit
b406c05c7b
@ -82,10 +82,10 @@ void TcpReceiver::executeThread() {
|
|||||||
//serverReceiveFinished(this, ipAddress, result);
|
//serverReceiveFinished(this, ipAddress, result);
|
||||||
close(clientSocket);
|
close(clientSocket);
|
||||||
|
|
||||||
if (result > 0)
|
|
||||||
if (result >= 0) {
|
if (result >= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG_FUNCTION_LINE_ERR("Server socket accept failed socket: %i errno: %d", clientSocket, errno);
|
DEBUG_FUNCTION_LINE_ERR("Server socket accept failed socket: %i errno: %d", clientSocket, errno);
|
||||||
OSSleepTicks(OSMicrosecondsToTicks(100000));
|
OSSleepTicks(OSMicrosecondsToTicks(100000));
|
||||||
@ -299,11 +299,16 @@ int32_t TcpReceiver::loadToMemory(int32_t clientSocket, uint32_t ipAddress) {
|
|||||||
free(loadAddress);
|
free(loadAddress);
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
DEBUG_FUNCTION_LINE_ERR("Failed to launch save a executable to the sd card");
|
||||||
return NOT_ENOUGH_MEMORY;
|
return NOT_ENOUGH_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadedRPX) {
|
if (loadedRPX) {
|
||||||
RPXLoader_LaunchHomebrew(file_path)
|
RPXLoaderStatus launchRes;
|
||||||
|
if ((launchRes = RPXLoader_LaunchHomebrew(file_path)) != RPX_LOADER_RESULT_SUCCESS) {
|
||||||
|
DEBUG_FUNCTION_LINE_ERR("Failed to start %s %s", file_path, RPXLoader_GetStatusStr(launchRes));
|
||||||
|
return NOT_ENOUGH_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
return fileSize;
|
return fileSize;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user