Compare commits

...

4 Commits

Author SHA1 Message Date
Maschell 9be5f01ca6 Reset default environment when launching from Tiramisu 2024-05-06 15:04:56 +02:00
Maschell c3b06522b0 Fix exiting in Tiramisu 2024-05-06 15:04:56 +02:00
Maschell ce617aeb67 Avoid screen flickering when launching from Tiramisu 2024-05-06 15:04:56 +02:00
Maschell 88aaba9854 Update Dockerfile 2024-05-06 10:29:41 +02:00
6 changed files with 41 additions and 5 deletions

View File

@ -1,4 +1,4 @@
FROM ghcr.io/wiiu-env/devkitppc:20240423
FROM ghcr.io/wiiu-env/devkitppc:20240505
COPY --from=ghcr.io/wiiu-env/libmocha:20231127 /artifacts $DEVKITPRO
COPY --from=ghcr.io/wiiu-env/librpxloader:20240425 /artifacts $DEVKITPRO

View File

@ -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);

View File

@ -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;
}
@ -61,7 +62,7 @@ ApplicationState::eSubState UpdaterState::UpdateCheckEnvironmentDirectory(Input
}
void UpdaterState::RenderCheckEnvironmentDirectory() {
if (!this->mCurEnvironmentPath.empty() && this->mCurEnvironmentPath != DEFAULT_AROMA_ENVIRONMENT_SD_PATH) {
if (!this->mCurEnvironmentPath.empty() && this->mCurEnvironmentPath != DEFAULT_AROMA_ENVIRONMENT_SD_PATH && (this->mCurEnvironmentPath != DEFAULT_TIRAMISU_ENVIRONMENT_SD_PATH)) {
DrawUtils::setFontColor(COLOR_RED);
DrawUtils::setFontSize(30);
DrawUtils::print(16, 90, "Warning");

View File

@ -156,6 +156,10 @@ ApplicationState::eSubState UpdaterState::update(Input *input) {
}
case STATE_UPDATE_SUCCESS: {
if (buttonPressed(input, Input::BUTTON_A)) {
if (gDeleteDefaultEnvironmentOnSuccess) {
// Delete default environment when installing from Tiramisu
remove("fs:/vol/external01/wiiu/environments/default.cfg");
}
OSLaunchTitlel(0xffffffff, 0xfffffffe, 0, nullptr);
return SUBSTATE_RESTART;
}

View File

@ -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;

View File

@ -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();