Skip to content

Commit

Permalink
change for new notif script
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
  • Loading branch information
Vincent-FK committed May 15, 2021
1 parent b573bc6 commit 5ab34a8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ u32 update_input()
/*sprintf(hud_msg, "SAVED IN SLOT %d", savestate_slot);
set_hud_msg(hud_msg, 4);*/
sprintf(shell_cmd, "%s %d \" SAVED IN SLOT %d\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, savestate_slot+1);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, savestate_slot+1);
fp = popen(shell_cmd, "r");
if (fp == NULL) {
printf("Failed to run command %s\n", shell_cmd);
Expand All @@ -847,7 +847,7 @@ u32 update_input()
/*sprintf(hud_msg, "LOADED FROM SLOT %d", savestate_slot);
set_hud_msg(hud_msg, 4);*/
sprintf(shell_cmd, "%s %d \" LOADED FROM SLOT %d\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, savestate_slot+1);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, savestate_slot+1);
fp = popen(shell_cmd, "r");
if (fp == NULL) {
printf("Failed to run command %s\n", shell_cmd);
Expand Down Expand Up @@ -951,7 +951,7 @@ u32 update_input()
/*sprintf(hud_msg, " DISP MODE: ZOOMED %d%%", aspect_ratio_factor_percent);
set_hud_msg(hud_msg, 4);*/
sprintf(shell_cmd, "%s %d \" DISPLAY MODE: ZOOMED %d%%%%\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
fp = popen(shell_cmd, "r");
if (fp == NULL) {
printf("Failed to run command %s\n", shell_cmd);
Expand All @@ -977,7 +977,7 @@ u32 update_input()
/*sprintf(hud_msg, " DISP MODE: ZOOMED %d%%", aspect_ratio_factor_percent);
set_hud_msg(hud_msg, 4);*/
sprintf(shell_cmd, "%s %d \" DISPLAY MODE: ZOOMED %d%%%%\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
fp = popen(shell_cmd, "r");
if (fp == NULL) {
printf("Failed to run command %s\n", shell_cmd);
Expand All @@ -998,12 +998,12 @@ u32 update_input()
if(aspect_ratio == ASPECT_RATIOS_TYPE_MANUAL){
//sprintf(hud_msg, " DISP MODE: ZOOMED %d%%", aspect_ratio_factor_percent);
sprintf(shell_cmd, "%s %d \" DISPLAY MODE: ZOOMED %d%%%%\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, aspect_ratio_factor_percent);
}
else{
//sprintf(hud_msg, "DISPLAY MODE: %s", aspect_ratio_name[aspect_ratio]);
sprintf(shell_cmd, "%s %d \" DISPLAY MODE: %s\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, aspect_ratio_name[aspect_ratio]);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, aspect_ratio_name[aspect_ratio]);
}
//set_hud_msg(hud_msg, 4);
fp = popen(shell_cmd, "r");
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ int main(int argc, char *argv[])
/** Set notif for BIOS */
char shell_cmd[400];
sprintf(shell_cmd, "%s 0 \" BIOS FILE MISSING^^Connect your FunKey S to ^your computer and copy the^BIOS file to the folder:^ Game Boy Advance/bios/^^The file must be called:^gba_bios.bin^Size=16384 Bytes^MD5=a860e8c0b6d573d191e4ec7d^b1b1e4f6^^For more instructions:^www.funkey-project.com^^Press any button to exit...\"",
SHELL_CMD_NOTIF);
SHELL_CMD_NOTIF_SET);
system(shell_cmd);

while(gui_action == CURSOR_NONE)
Expand Down
6 changes: 3 additions & 3 deletions menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ void run_menu_loop()

/// ----- Hud Msg -----
sprintf(shell_cmd, "%s %d \" SAVED IN SLOT %d\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, savestate_slot+1);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, savestate_slot+1);
system(shell_cmd);
stop_menu_loop = 1;
}
Expand Down Expand Up @@ -881,11 +881,11 @@ void run_menu_loop()
/// ----- Hud Msg -----
if(quick_load_slot_chosen){
sprintf(shell_cmd, "%s %d \" LOADED FROM AUTO SAVE\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP);
}
else{
sprintf(shell_cmd, "%s %d \" LOADED FROM SLOT %d\"",
SHELL_CMD_NOTIF, NOTIF_SECONDS_DISP, savestate_slot+1);
SHELL_CMD_NOTIF_SET, NOTIF_SECONDS_DISP, savestate_slot+1);
}
system(shell_cmd);
stop_menu_loop = 1;
Expand Down
4 changes: 2 additions & 2 deletions menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ typedef enum {RESUME_OPTIONS} ENUM_RESUME_OPTIONS;
#define SHELL_CMD_VOLUME_SET "volume set"
#define SHELL_CMD_BRIGHTNESS_GET "brightness get"
#define SHELL_CMD_BRIGHTNESS_SET "brightness set"
#define SHELL_CMD_NOTIF "notif_set"
#define SHELL_CMD_NOTIF_CLEAR "notif_clear"
#define SHELL_CMD_NOTIF_SET "notif set"
#define SHELL_CMD_NOTIF_CLEAR "notif clear"
#define SHELL_CMD_AUDIO_AMP_ON "audio_amp on"
#define SHELL_CMD_AUDIO_AMP_OFF "audio_amp off"
#define SHELL_CMD_CANCEL_SCHED_POWERDOWN "cancel_sched_powerdown"
Expand Down

0 comments on commit 5ab34a8

Please sign in to comment.