Skip to content

Commit

Permalink
Disable "Show Mii applet" option in applet mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Genwald committed Jun 16, 2021
1 parent 14dca8e commit d31152e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/mii_qr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ std::unique_ptr<u32[]> generateQrRGBA(u8 *data, size_t data_size, u32 scale, int
}
}
}
}
}
}
return out_data;
}
Expand Down
14 changes: 10 additions & 4 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "miiport.hpp"


const AppletType APPLET_TYPE = appletGetAppletType();

Result init() {
Result res;
res = setsysInitialize();
Expand Down Expand Up @@ -265,10 +267,14 @@ int main(int argc, char* argv[]) {
rootFrame->addTab("Export", exportList);
rootFrame->addSeparator();
rootFrame->addTab("About", aboutList);
rootFrame->registerAction("Show Mii applet", brls::Key::X, [] {
miiLaShowMiiEdit(MiiSpecialKeyCode_Special);
return true;
});

// This was not working in applet mode. I think this is a memory issue?
if(APPLET_TYPE == AppletType_Application || APPLET_TYPE == AppletType_SystemApplication) {
rootFrame->registerAction("Show Mii applet", brls::Key::X, [] {
miiLaShowMiiEdit(MiiSpecialKeyCode_Special);
return true;
});
}

brls::Application::pushView(rootFrame);

Expand Down

0 comments on commit d31152e

Please sign in to comment.