Skip to content

Commit

Permalink
Latest Release RM0517-1117-0.101.3-2d1a66a on PATREON - Fix Menu Add
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueMaster committed May 18, 2024
1 parent 5b2ce04 commit a48ebae
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 39 deletions.
4 changes: 3 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ This software is for experimental purposes only and is not meant for any illegal
- OFW: [JS: Add textbox module #3597 (By Willy-JL)](https://github.com/flipperdevices/flipperzero-firmware/pull/3597) Updates (By skotopes)
- Updated: [Dolphin Trainer v1.2 (By nymda)](https://github.com/nymda/FlipperAntidepressants) With Modifications (By RogueMaster) To Adjust For Level Mod
- Image assets for BLE Pairing, DFU, SubGHz Receiving & Updating changed to Pikachu or Goku. Many other in app image assets also updated.
- Updated: [CFW Settings v1.6 - Imported/Modified By RogueMaster (By Willy-JL)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/ecf91524a956f773881d564c4ada833f844264ca) (Fixed App Saving and Game Menu Type Selection)
- Updated: [Game List for Game Only Mode default menu. Now has 82 games! (By RogueMaster)]

<a name="release">

Expand Down Expand Up @@ -385,7 +387,7 @@ $ ./fbt dolphin_ext
- [Camera (By Z4urce)](https://github.com/Z4urce/flipper-camera) `Req: ESP32-CAM`
- [Canon Intervalometer v1.0 (By TravisCG)](https://github.com/TravisCG/canonivm)
- [Caesar Cipher v1.1 (By panki27)](https://github.com/panki27/caesar-cipher)
- [CFW Settings - Imported/Modified By RogueMaster (By Willy-JL)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/ecf91524a956f773881d564c4ada833f844264ca)
- [CFW Settings v1.6 - Imported/Modified By RogueMaster (By Willy-JL)](https://github.com/RogueMaster/flipperzero-firmware-wPlugins/commit/ecf91524a956f773881d564c4ada833f844264ca)
- [Chronometer (By nmrr)](https://github.com/nmrr/flipperzero-chronometer)
- [CLI Bridge (By ranchordo)](https://github.com/ranchordo/flipperzero-cli-bridge)
- [Clock v1.1 (By kowalski7cc)](https://github.com/kowalski7cc/flipperzero-firmware/tree/clock-v1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ GamesMenuList Version 0
/ext/apps/Games/etchasketch.fap
/ext/apps/Games/five_nights_at_flippers.fap
/ext/apps/Games/flappybird.fap
/ext/apps/Games/flight_assault.fap
/ext/apps/Games/flipper_hero.fap
/ext/apps/Games/flippy_road.fap
/ext/apps/Games/game15.fap
/ext/apps/Games/gameoflife.fap
/ext/apps/Games/guess_the_number.fap
/ext/apps/Games/hangman.fap
/ext/apps/Games/hanoi_towers.fap
/ext/apps/Games/heap_defence.fap
/ext/apps/Games/jetpack.fap
/ext/apps/Games/kcline.fap
/ext/apps/Games/mandelbrotset.fap
/ext/apps/Games/matagotchi.fap
/ext/apps/Games/minesweeper.fap
/ext/apps/Games/minesweeper_redux.fap
/ext/apps/Games/montyhall.fap
Expand Down Expand Up @@ -71,6 +77,7 @@ GamesMenuList Version 0
/ext/apps/Games/vexed.fap
/ext/apps/GPIO/VGM/video_game_module_tool.fap
/ext/apps/Games/videopoker.fap
/ext/apps/Games/yapinvaders.fap
/ext/apps/Games/yatzee.fap
/ext/apps/Games/zero.fap
/ext/apps/Games/zombiez.fap
1 change: 1 addition & 0 deletions applications/external/ir_decoder/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ App(
apptype=FlipperAppType.EXTERNAL,
entry_point="ir_decoder_app",
stack_size=2 * 1024,
fap_icon="ir_scope.png",
fap_category="Infrared",
fap_author="prplecake",
fap_weburl="https://github.com/prplecake/f0/tree/master/infrared/apps/ir_decoder",
Expand Down
Binary file added applications/external/ir_decoder/ir_scope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion applications/settings/cfw_app/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ App(
fap_category="Settings",
fap_icon="cfw_app_10px.png",
fap_icon_assets="images",
fap_version=(1, 5),
fap_version="1.6",
)
1 change: 0 additions & 1 deletion applications/settings/cfw_app/cfw_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <desktop/desktop_settings.h>
#include "helpers/passport_settings.h"

#define MENU_ICON_MAX_SIZE 14
#define CFW_SUBGHZ_FREQ_BUFFER_SIZE 6

ARRAY_DEF(CharList, char*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,27 @@ void cfw_app_scene_interface_gamemenu_add_on_enter(void* context) {
.base_path = GAMES_FOLDER,
};
FuriString* temp_path = furi_string_alloc_set_str(GAMES_FOLDER);
FuriString* filename = furi_string_alloc();
if(dialog_file_browser_show(app->dialogs, temp_path, temp_path, &browser_options)) {
CharList_push_back(app->gamemenu_app_paths, strdup(furi_string_get_cstr(temp_path)));
Storage* storage = furi_record_open(RECORD_STORAGE);
uint8_t* icon_buf = malloc(MENU_ICON_MAX_SIZE);

if(flipper_application_load_name_and_icon(temp_path, storage, &icon_buf, filename)) {
CharList_push_back(app->gamemenu_app_names, strdup(furi_string_get_cstr(filename)));
CharList_push_back(app->gamemenu_app_paths, strdup(furi_string_get_cstr(temp_path)));
app->gamemenu_app_index = CharList_size(app->gamemenu_app_names) - 1;
app->save_gamemenu_apps = true;
app->require_reboot = true;
}
free(icon_buf);
uint8_t* unused_icon = malloc(FAP_MANIFEST_MAX_ICON_SIZE);
flipper_application_load_name_and_icon(temp_path, storage, &unused_icon, temp_path);
free(unused_icon);
furi_record_close(RECORD_STORAGE);
furi_string_free(temp_path);
furi_string_free(filename);
if(furi_string_start_with_str(temp_path, "[")) {
size_t trim = furi_string_search_str(temp_path, "] ", 1);
if(trim != FURI_STRING_FAILURE) {
furi_string_right(temp_path, trim + 2);
}
}
CharList_push_back(app->gamemenu_app_names, strdup(furi_string_get_cstr(temp_path)));
app->gamemenu_app_index = CharList_size(app->gamemenu_app_names) - 1;
app->save_gamemenu_apps = true;
app->require_reboot = true;
scene_manager_search_and_switch_to_previous_scene(
app->scene_manager, CfwAppSceneInterfaceGamemenu);
}
scene_manager_search_and_switch_to_previous_scene(
app->scene_manager, CfwAppSceneInterfaceGamemenu);
furi_string_free(temp_path);
}

bool cfw_app_scene_interface_gamemenu_add_on_event(void* context, SceneManagerEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,27 @@ static void cfw_app_scene_interface_mainmenu_add_submenu_callback(void* context,
.base_path = EXT_PATH("apps"),
};
FuriString* temp_path = furi_string_alloc_set_str(EXT_PATH("apps"));
FuriString* filename = furi_string_alloc();
if(dialog_file_browser_show(app->dialogs, temp_path, temp_path, &browser_options)) {
CharList_push_back(app->mainmenu_app_paths, strdup(furi_string_get_cstr(temp_path)));
Storage* storage = furi_record_open(RECORD_STORAGE);
uint8_t* icon_buf = malloc(MENU_ICON_MAX_SIZE);

if(!flipper_application_load_name_and_icon(temp_path, storage, &icon_buf, filename)) {
free(icon_buf);
} else {
free(icon_buf);
CharList_push_back(
app->mainmenu_app_names, strdup(furi_string_get_cstr(filename)));
CharList_push_back(
app->mainmenu_app_paths, strdup(furi_string_get_cstr(temp_path)));
app->mainmenu_app_index = CharList_size(app->mainmenu_app_names) - 1;
app->save_mainmenu_apps = true;
app->require_reboot = true;
}
uint8_t* unused_icon = malloc(FAP_MANIFEST_MAX_ICON_SIZE);
flipper_application_load_name_and_icon(temp_path, storage, &unused_icon, temp_path);
free(unused_icon);
furi_record_close(RECORD_STORAGE);
furi_string_free(temp_path);
furi_string_free(filename);
if(furi_string_start_with_str(temp_path, "[")) {
size_t trim = furi_string_search_str(temp_path, "] ", 1);
if(trim != FURI_STRING_FAILURE) {
furi_string_right(temp_path, trim + 2);
}
}
CharList_push_back(app->mainmenu_app_names, strdup(furi_string_get_cstr(temp_path)));
app->mainmenu_app_index = CharList_size(app->mainmenu_app_names) - 1;
app->save_mainmenu_apps = true;
app->require_reboot = true;
scene_manager_search_and_switch_to_previous_scene(
app->scene_manager, CfwAppSceneInterfaceMainmenu);
}
scene_manager_search_and_switch_to_previous_scene(
app->scene_manager, CfwAppSceneInterfaceMainmenu);
furi_string_free(temp_path);
break;
}
default:
Expand All @@ -70,6 +68,8 @@ void cfw_app_scene_interface_mainmenu_add_on_enter(void* context) {
CfwApp* app = context;
Submenu* submenu = app->submenu;

submenu_set_header(submenu, "Add Menu App:");

submenu_add_item(
submenu,
"Main App",
Expand All @@ -84,8 +84,6 @@ void cfw_app_scene_interface_mainmenu_add_on_enter(void* context) {
cfw_app_scene_interface_mainmenu_add_submenu_callback,
app);

submenu_set_header(submenu, "Add Menu App:");

view_dispatcher_switch_to_view(app->view_dispatcher, CfwAppViewSubmenu);
}

Expand Down

0 comments on commit a48ebae

Please sign in to comment.