Replace std::bind by lambda, init variables, minor tweaks and formatting.

This commit is contained in:
Maschell 2020-12-05 20:53:20 +01:00
parent a283400d60
commit 300f8130a4
3 changed files with 8 additions and 10 deletions

View File

@ -289,7 +289,7 @@ void ApplicationState::update(Input *input) {
} }
ApplicationState::ApplicationState() { ApplicationState::ApplicationState() {
menu.setOptionsCallback(std::bind(&ApplicationState::changeState, this, std::placeholders::_1)); menu.setOptionsCallback([this](auto &&newState) { changeState(std::forward<decltype(newState)>(newState)); });
menu.setHeader("Aroma Installer"); menu.setHeader("Aroma Installer");
menu.setFooter("By Maschell"); menu.setFooter("By Maschell");

View File

@ -72,7 +72,6 @@ public:
std::string ErrorDescription(); std::string ErrorDescription();
bool installColdboot = false;
InstallerService::eResults installerError = InstallerService::eResults::SUCCESS; InstallerService::eResults installerError = InstallerService::eResults::SUCCESS;
private: private:
@ -91,13 +90,13 @@ private:
bool systemXMLAlreadyPatched = false; bool systemXMLAlreadyPatched = false;
bool systemXMLRestorePossible = false; bool systemXMLRestorePossible = false;
eGameState state; eGameState state = STATE_WELCOME_SCREEN;
eErrorState error = ERROR_NONE; eErrorState error = ERROR_NONE;
uint64_t coldbootTitleId; uint64_t coldbootTitleId = 0;
_gList_t *coldbootTitle; _gList_t *coldbootTitle = nullptr;
std::optional<uint64_t> systemMenuTitleId; std::optional<uint64_t> systemMenuTitleId;
bool fstAlreadyPatched; bool fstAlreadyPatched = false;
bool rpxAlreadyPatched; bool rpxAlreadyPatched = false;
bool cosAlreadyPatched; bool cosAlreadyPatched = false;
bool tmdValid; bool tmdValid = false;
}; };

View File

@ -12,7 +12,6 @@ bool WiiUScreen::sConsoleHasForeground = true;
uint32_t WiiUScreen::consoleColor = 0x041F60FF; uint32_t WiiUScreen::consoleColor = 0x041F60FF;
uint32_t WiiUScreen::consoleCursorY = 0; uint32_t WiiUScreen::consoleCursorY = 0;
uint32_t WiiUScreen::ProcCallbackAcquired(void *context) { uint32_t WiiUScreen::ProcCallbackAcquired(void *context) {
MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1); MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1);
if (sBufferSizeTV) { if (sBufferSizeTV) {