MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / HandleHomeButton

Function HandleHomeButton

projects/uSystem/source/main.cpp:536–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534 }
535
536 void HandleHomeButton() {
537 if(la::IsActive() && !IsMenuRunning()) {
538 // A library applet is opened which is not uMenu, close it and open uMenu
539 UL_RC_ASSERT(la::Terminate());
540 g_LastLibraryAppletLaunchedNotMenu = false;
541
542 UL_RC_ASSERT(LaunchMenu(ul::smi::MenuStartMode::MainMenu));
543 }
544 else if(app::IsActive() && app::HasForeground()) {
545 // Hide the application currently on focus and open uMenu
546 UL_RC_ASSERT(sys::SetForeground());
547
548 UL_RC_ASSERT(LaunchMenu(ul::smi::MenuStartMode::MainMenu));
549 }
550 else if(IsMenuRunning()) {
551 // Send a message to our menu to handle itself the home press
552 PushSimpleMenuMessage(ul::smi::MenuMessage::HomeRequest);
553 }
554 }
555
556 void HandleGeneralChannelMessage() {
557 AppletStorage sams_st;

Callers 2

HandleAppletMessageFunction · 0.85

Calls 7

IsMenuRunningFunction · 0.85
LaunchMenuFunction · 0.85
PushSimpleMenuMessageFunction · 0.85
IsActiveFunction · 0.50
TerminateFunction · 0.50
HasForegroundFunction · 0.50
SetForegroundFunction · 0.50

Tested by

no test coverage detected