mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-04 22:33:36 -07:00
no games menu or favorite game since games moved
This commit is contained in:
@@ -38,12 +38,6 @@ extern const size_t FLIPPER_APPS_COUNT;
|
||||
extern const FlipperOnStartHook FLIPPER_ON_SYSTEM_START[];
|
||||
extern const size_t FLIPPER_ON_SYSTEM_START_COUNT;
|
||||
|
||||
/* Games list
|
||||
* Spawned by loader
|
||||
*/
|
||||
extern const FlipperApplication FLIPPER_GAMES[];
|
||||
extern const size_t FLIPPER_GAMES_COUNT;
|
||||
|
||||
/* Plugins list
|
||||
* Spawned by loader
|
||||
*/
|
||||
|
||||
@@ -148,19 +148,6 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopMainEventOpenFavoriteGame:
|
||||
LOAD_DESKTOP_SETTINGS(&desktop->settings);
|
||||
if(desktop->settings.favorite_game < FLIPPER_GAMES_COUNT) {
|
||||
LoaderStatus status = loader_start(
|
||||
desktop->loader, FLIPPER_GAMES[desktop->settings.favorite_game].name, NULL);
|
||||
if(status != LoaderStatusOk) {
|
||||
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||
}
|
||||
} else {
|
||||
FURI_LOG_E(TAG, "Can't find game favorite application");
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopAnimationEventCheckAnimation:
|
||||
animation_manager_check_blocking_process(desktop->animation_manager);
|
||||
consumed = true;
|
||||
|
||||
@@ -6,7 +6,6 @@ typedef enum {
|
||||
DesktopMainEventOpenFavoritePrimary,
|
||||
DesktopMainEventOpenClock,
|
||||
DesktopMainEventOpenFavoriteSecondary,
|
||||
DesktopMainEventOpenFavoriteGame,
|
||||
DesktopMainEventOpenMenu,
|
||||
DesktopMainEventOpenGames,
|
||||
DesktopMainEventOpenDebug,
|
||||
|
||||
@@ -71,9 +71,9 @@ bool desktop_main_input(InputEvent* event, void* context) {
|
||||
if(event->key == InputKeyOk) {
|
||||
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
||||
} else if(event->key == InputKeyUp) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteSecondary, main_view->context);
|
||||
} else if(event->key == InputKeyRight) {
|
||||
@@ -83,9 +83,9 @@ bool desktop_main_input(InputEvent* event, void* context) {
|
||||
} else {
|
||||
if(event->type == InputTypeShort) {
|
||||
if(event->key == InputKeyOk) {
|
||||
main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
} else if(event->key == InputKeyUp) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
} else if(event->key == InputKeyDown) {
|
||||
// PREFER TO OPEN GAMES MENU
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
@@ -97,9 +97,9 @@ bool desktop_main_input(InputEvent* event, void* context) {
|
||||
if(event->key == InputKeyOk) {
|
||||
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
||||
} else if(event->key == InputKeyUp) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenFavoriteGame, main_view->context);
|
||||
} else if(event->key == InputKeyDown) {
|
||||
main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
// main_view->callback(DesktopMainEventOpenGames, main_view->context);
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenClock, main_view->context);
|
||||
} else if(event->key == InputKeyRight) {
|
||||
|
||||
@@ -18,17 +18,6 @@ void add_favorite_submenu_item(DesktopSettingsApp* app, Submenu* submenu) {
|
||||
}
|
||||
}
|
||||
|
||||
void add_game_submenu_item(DesktopSettingsApp* app, Submenu* submenu) {
|
||||
for(size_t i = 0; i < FLIPPER_GAMES_COUNT; i++) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
FLIPPER_GAMES[i].name,
|
||||
i,
|
||||
desktop_settings_scene_favorite_submenu_callback,
|
||||
app);
|
||||
}
|
||||
}
|
||||
|
||||
void desktop_settings_scene_favorite_on_enter(void* context) {
|
||||
DesktopSettingsApp* app = context;
|
||||
Submenu* submenu = app->submenu;
|
||||
@@ -48,11 +37,6 @@ void desktop_settings_scene_favorite_on_enter(void* context) {
|
||||
submenu_set_header(app->submenu, "Secondary Favorite App:");
|
||||
submenu_set_selected_item(app->submenu, app->settings.favorite_secondary);
|
||||
break;
|
||||
case 2:
|
||||
add_game_submenu_item(app, submenu);
|
||||
submenu_set_header(app->submenu, "Favorite Game:");
|
||||
submenu_set_selected_item(app->submenu, app->settings.favorite_game);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -75,9 +59,6 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e
|
||||
case 1:
|
||||
app->settings.favorite_secondary = event.event;
|
||||
break;
|
||||
case 2:
|
||||
app->settings.favorite_game = event.event;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user