mirror of
https://github.com/wiiu-env/AromaUpdater.git
synced 2024-12-25 12:31:55 +01:00
Fix exiting in Tiramisu
This commit is contained in:
parent
ce617aeb67
commit
c3b06522b0
@ -64,6 +64,11 @@ ApplicationState::eSubState MainApplicationState::update(Input *input) {
|
||||
}
|
||||
this->selectedOptionY = 0;
|
||||
}
|
||||
if (input->data.buttons_d & Input::BUTTON_HOME) {
|
||||
if (RunningFromMiiMaker()) {
|
||||
return SUBSTATE_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (this->state == STATE_DO_SUBSTATE) {
|
||||
auto retSubState = this->subState->update(input);
|
||||
|
@ -23,8 +23,9 @@ ApplicationState::eSubState UpdaterState::UpdateCheckEnvironmentDirectory(Input
|
||||
}
|
||||
|
||||
if (this->mCurEnvironmentPath == DEFAULT_TIRAMISU_ENVIRONMENT_SD_PATH) {
|
||||
mCurEnvironmentPath = DEFAULT_AROMA_ENVIRONMENT_SD_PATH;
|
||||
this->mState = STATE_CHECK_VERSIONS;
|
||||
gDeleteDefaultEnvironmentOnSuccess = true;
|
||||
mCurEnvironmentPath = DEFAULT_AROMA_ENVIRONMENT_SD_PATH;
|
||||
this->mState = STATE_CHECK_VERSIONS;
|
||||
return SUBSTATE_RUNNING;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <coreinit/title.h>
|
||||
|
||||
#define BACKGROUND_COLOR COLOR_BLACK
|
||||
|
||||
#define AROMA_DOWNLOAD_URL "https://aroma.foryour.cafe/"
|
||||
@ -14,3 +16,9 @@
|
||||
|
||||
#define UPDATER_VERSION "v0.2.3"
|
||||
#define UPDATER_VERSION_FULL UPDATER_VERSION UPDATER_VERSION_EXTRA
|
||||
|
||||
inline bool RunningFromMiiMaker() {
|
||||
return (OSGetTitleID() & 0xFFFFFFFFFFFFF0FFull) == 0x000500101004A000ull;
|
||||
}
|
||||
|
||||
extern bool gDeleteDefaultEnvironmentOnSuccess;
|
@ -10,6 +10,7 @@
|
||||
#include <mocha/mocha.h>
|
||||
#include <rpxloader/rpxloader.h>
|
||||
#include <sndcore2/core.h>
|
||||
#include <sysapp/launch.h>
|
||||
#include <whb/proc.h>
|
||||
|
||||
void main_loop() {
|
||||
@ -34,12 +35,23 @@ void main_loop() {
|
||||
baseInput.combine(wpadInput);
|
||||
}
|
||||
}
|
||||
|
||||
baseInput.process();
|
||||
state->update(&baseInput);
|
||||
if (state->update(&baseInput) == ApplicationState::SUBSTATE_RETURN) {
|
||||
if (RunningFromMiiMaker()) {
|
||||
// legacy way, just quit
|
||||
break;
|
||||
} else {
|
||||
// launch menu otherwise
|
||||
SYSLaunchMenu();
|
||||
}
|
||||
}
|
||||
state->render();
|
||||
}
|
||||
}
|
||||
|
||||
bool gDeleteDefaultEnvironmentOnSuccess = false;
|
||||
|
||||
int main() {
|
||||
initLogging();
|
||||
|
||||
@ -78,6 +90,9 @@ int main() {
|
||||
IMDisableAPD();
|
||||
}
|
||||
|
||||
if (RunningFromMiiMaker()) {
|
||||
OSEnableHomeButtonMenu(false);
|
||||
}
|
||||
main_loop();
|
||||
|
||||
if (isAPDEnabled) {
|
||||
@ -96,6 +111,9 @@ int main() {
|
||||
DrawUtils::DeInit();
|
||||
|
||||
AXQuit();
|
||||
|
||||
WHBProcShutdown();
|
||||
|
||||
deinitLogging();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user