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() {
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.setFooter("By Maschell");

View File

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

View File

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