mirror of
https://github.com/wiiu-env/wudd.git
synced 2024-11-22 01:49:15 +01:00
Remove the exit button when running on the HBL
This commit is contained in:
parent
21cb6adaa6
commit
90b6a36add
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/common.h"
|
||||
#include "input/Input.h"
|
||||
#include "utils/ScreenUtils.h"
|
||||
#include "utils/WiiUScreen.h"
|
||||
@ -37,8 +38,9 @@ public:
|
||||
} else if (input->data.buttons_d & Input::BUTTON_RIGHT) {
|
||||
this->selectedOptionX++;
|
||||
}
|
||||
|
||||
if (this->selectedOptionX < 0) {
|
||||
this->selectedOptionX = maxOptionValue;
|
||||
this->selectedOptionX = maxOptionValue - 1;
|
||||
} else if (this->selectedOptionX >= maxOptionValue) {
|
||||
this->selectedOptionX = 0;
|
||||
}
|
||||
@ -55,6 +57,10 @@ public:
|
||||
}
|
||||
|
||||
virtual void printFooter() {
|
||||
if (gRunFromHBL) {
|
||||
ScreenUtils::printTextOnScreen(CONSOLE_SCREEN_TV, 0, 25, "Press HOME to exit to HBL");
|
||||
ScreenUtils::printTextOnScreen(CONSOLE_SCREEN_DRC, 0, 15, "Press HOME to exit to HBL");
|
||||
}
|
||||
ScreenUtils::printTextOnScreen(CONSOLE_SCREEN_TV, 0, 27, "Created by Maschell, inspired by wudump from FIX94");
|
||||
ScreenUtils::printTextOnScreen(CONSOLE_SCREEN_DRC, 0, 17, "Created by Maschell, inspired by wudump from FIX94");
|
||||
}
|
||||
|
@ -52,8 +52,10 @@ void MainApplicationState::render() {
|
||||
WiiUScreen::drawLinef(" [%s] SD ??? NTFS (USB) (not connected)", dumpTarget == TARGET_SD ? "*" : " ");
|
||||
}
|
||||
WiiUScreen::drawLine();
|
||||
if (!gRunFromHBL) {
|
||||
WiiUScreen::drawLinef("%s Exit", this->selectedOptionY == 4 ? ">" : " ");
|
||||
}
|
||||
}
|
||||
|
||||
printFooter();
|
||||
WiiUScreen::flipBuffers();
|
||||
@ -61,7 +63,8 @@ void MainApplicationState::render() {
|
||||
|
||||
ApplicationState::eSubState MainApplicationState::update(Input *input) {
|
||||
if (this->state == STATE_WELCOME_SCREEN) {
|
||||
proccessMenuNavigationY(input, 5);
|
||||
int optionCount = gRunFromHBL ? 4 : 5;
|
||||
proccessMenuNavigationY(input, optionCount);
|
||||
if (selectedOptionY == 3) {
|
||||
if (ntfs_mount_count > 0) {
|
||||
proccessMenuNavigationX(input, 2);
|
||||
@ -85,8 +88,10 @@ ApplicationState::eSubState MainApplicationState::update(Input *input) {
|
||||
} else if (this->selectedOptionY == 3) {
|
||||
//
|
||||
} else {
|
||||
if (gRunFromHBL) {
|
||||
SYSLaunchMenu();
|
||||
}
|
||||
}
|
||||
this->selectedOptionY = 0;
|
||||
}
|
||||
} else if (this->state == STATE_DO_SUBSTATE) {
|
||||
|
@ -4,3 +4,4 @@ int32_t gFSAfd = -1;
|
||||
|
||||
ntfs_md *ntfs_mounts = nullptr;
|
||||
int ntfs_mount_count = 0;
|
||||
BOOL gRunFromHBL = false;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <ntfs.h>
|
||||
#include <wut.h>
|
||||
|
||||
extern int32_t gFSAfd;
|
||||
|
||||
@ -11,6 +11,8 @@ extern int32_t gFSAfd;
|
||||
extern ntfs_md *ntfs_mounts;
|
||||
extern int ntfs_mount_count;
|
||||
|
||||
extern BOOL gRunFromHBL;
|
||||
|
||||
enum eDumpTarget {
|
||||
TARGET_SD,
|
||||
TARGET_NTFS
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <coreinit/debug.h>
|
||||
#include <coreinit/energysaver.h>
|
||||
#include <coreinit/title.h>
|
||||
#include <input/CombinedInput.h>
|
||||
#include <input/WPADInput.h>
|
||||
#include <iosuhax.h>
|
||||
@ -34,6 +35,16 @@ int main(int argc, char **argv) {
|
||||
|
||||
initIOSUHax();
|
||||
|
||||
uint64_t titleID = OSGetTitleID();
|
||||
if (titleID == 0x0005000013374842 ||
|
||||
titleID == 0x000500101004A000 ||
|
||||
titleID == 0x000500101004A100 ||
|
||||
titleID == 0x000500101004A200) {
|
||||
gRunFromHBL = true;
|
||||
} else {
|
||||
gRunFromHBL = false;
|
||||
}
|
||||
|
||||
uint32_t isAPDEnabled;
|
||||
IMIsAPDEnabled(&isAPDEnabled);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user