mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
fix desktop button options
This commit is contained in:
@@ -116,8 +116,21 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpenSubRemote:
|
||||
LoaderStatus status = loader_start(
|
||||
desktop->loader, "Applications", EXT_PATH("/apps/Main/SubGHz_Remote.fap"));
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopMainEventOpenClock:
|
||||
loader_start(desktop->loader, FLIPPER_APPS[0].name, NULL);
|
||||
// loader_start(desktop->loader, FLIPPER_APPS[0].name, NULL);
|
||||
LoaderStatus status = loader_start(
|
||||
desktop->loader, "Applications", EXT_PATH("/apps/Main/Clock.fap"));
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopMainEventOpenFavoritePrimary:
|
||||
@@ -178,6 +191,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpen2048: {
|
||||
@@ -186,6 +200,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpenZombiez: {
|
||||
@@ -194,6 +209,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpenTetris: {
|
||||
@@ -202,6 +218,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpenDOOM: {
|
||||
@@ -210,6 +227,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopMainEventOpenDice: {
|
||||
@@ -218,6 +236,7 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
}
|
||||
case DesktopLockedEventUpdate:
|
||||
|
||||
@@ -18,6 +18,7 @@ typedef enum {
|
||||
DesktopMainEventOpenTetris,
|
||||
DesktopMainEventOpenDOOM,
|
||||
DesktopMainEventOpenDice,
|
||||
DesktopMainEventOpenSubRemote,
|
||||
|
||||
DesktopLockedEventUnlocked,
|
||||
DesktopLockedEventUpdate,
|
||||
|
||||
@@ -69,7 +69,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpenArchive, main_view->context);
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenFavoritePrimary, main_view->context);
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context); // OPENS Clock
|
||||
} else if(event->key == InputKeyRight) {
|
||||
// Right key is handled by animation manager
|
||||
// GOES TO PASSPORT NO MATTER WHAT
|
||||
@@ -80,11 +80,11 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
if(event->key == InputKeyOk) {
|
||||
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
||||
} else if(event->key == InputKeyUp) {
|
||||
main_view->callback(DesktopMainEventOpenDOOM, main_view->context); // OPENS DOOM
|
||||
main_view->callback(DesktopMainEventOpenFavoritePrimary, main_view->context);
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpenZombiez, main_view->context); // OPENS Zombiez
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteSecondary, main_view->context);
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenSubRemote, main_view->context); // OPENS SUBGHZ REMOTE
|
||||
}
|
||||
}
|
||||
} else if(main_view->is_gamemode == true) {
|
||||
@@ -97,7 +97,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
// PREFER TO OPEN GAMES MENU
|
||||
main_view->callback(DesktopMainEventOpen2048, main_view->context); // OPENS 2048
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context);
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context); // OPENS CLOCK
|
||||
}
|
||||
} else if(event->type == InputTypeLong) {
|
||||
if(event->key == InputKeyOk) {
|
||||
@@ -110,7 +110,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
main_view->callback(DesktopMainEventOpenTetris, main_view->context); // OPENS TETRIS
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if(event->type == InputTypeShort) {
|
||||
if(event->key == InputKeyOk) {
|
||||
main_view->callback(DesktopMainEventOpenDice, main_view->context); // OPENS Dice
|
||||
@@ -119,7 +119,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpen2048, main_view->context); // OPENS 2048
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenPassport, main_view->context);
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context); // OPENS CLOCK
|
||||
}
|
||||
} else if(event->type == InputTypeLong) {
|
||||
if(event->key == InputKeyOk) {
|
||||
@@ -127,12 +127,12 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
} else if(event->key == InputKeyUp) {
|
||||
main_view->callback(DesktopMainEventOpenSnake, main_view->context); // OPENS SNAKE
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpenTetris, main_view->context); // OPENS TETRIS
|
||||
main_view->callback(DesktopMainEventOpenZombiez, main_view->context); // OPENS Zombiez
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context);
|
||||
main_view->callback(DesktopMainEventOpenTetris, main_view->context); // OPENS TETRIS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(event->key == InputKeyBack) {
|
||||
if(event->type == InputTypePress) {
|
||||
|
||||
Reference in New Issue
Block a user