@@ -348,14 +348,19 @@ void FunkeyMenu::add_menu_zone(ENUM_MENU_TYPE menu_type){
348348 text_pos.y = surface->h - MENU_ZONE_HEIGHT/2 - text_surface->h/2;
349349 SDL_BlitSurface(text_surface, NULL, surface, &text_pos);*/
350350 break ;
351- /* case MENU_TYPE_THEME :
352- MENU_DEBUG_PRINTF("Init MENU_TYPE_THEME \n");
351+ case MENU_TYPE_LAUNCHER :
352+ MENU_DEBUG_PRINTF (" Init MENU_TYPE_LAUNCHER \n " );
353353 // / ------ Text ------
354- text_surface = TTF_RenderText_Blended(menu_title_font, "SET THEME ", text_color);
354+ text_surface = TTF_RenderText_Blended (menu_title_font, " SET LAUNCHER " , text_color);
355355 text_pos.x = (surface->w - MENU_ZONE_WIDTH)/2 + (MENU_ZONE_WIDTH - text_surface->w )/2 ;
356356 text_pos.y = surface->h - MENU_ZONE_HEIGHT/2 - text_surface->h /2 - padding_y_from_center_menu_zone*2 ;
357357 SDL_BlitSurface (text_surface, NULL , surface, &text_pos);
358- break;*/
358+ // / ------ Text ------
359+ text_surface = TTF_RenderText_Blended (menu_title_font, " RETROFE" , text_color);
360+ text_pos.x = (surface->w - MENU_ZONE_WIDTH)/2 + (MENU_ZONE_WIDTH - text_surface->w )/2 ;
361+ text_pos.y = surface->h - MENU_ZONE_HEIGHT/2 - text_surface->h /2 ;
362+ SDL_BlitSurface (text_surface, NULL , surface, &text_pos);
363+ break ;
359364 case MENU_TYPE_POWERDOWN:
360365 MENU_DEBUG_PRINTF (" Init MENU_TYPE_POWERDOWN\n " );
361366 // / ------ Text ------
@@ -388,8 +393,8 @@ void FunkeyMenu::init_menu_zones(){
388393 // add_menu_zone(MENU_TYPE_EXIT);
389394 // / Init USB Menu
390395 add_menu_zone (MENU_TYPE_USB);
391- /* /// Init Theme Menu
392- add_menu_zone(MENU_TYPE_THEME); */
396+ // / Init Launcher Menu
397+ add_menu_zone (MENU_TYPE_LAUNCHER);
393398 // / Init Powerdown Menu
394399 add_menu_zone (MENU_TYPE_POWERDOWN);
395400}
@@ -611,22 +616,7 @@ void FunkeyMenu::menu_screen_refresh(int menuItem, int prevItem, int scroll, uin
611616 }
612617 break ;
613618
614- /* case MENU_TYPE_THEME:
615- /// ---- Write current chosen theme -----
616- curLayoutName = (char*)getFileName(config->layouts_.at(indexChooseLayout)).c_str();
617-
618- // no more than max_chars chars in name to fit screen
619- if(strlen(curLayoutName) > max_chars){
620- curLayoutName[max_chars-2] = 0;
621- dots = true;
622- }
623- sprintf(text_tmp, "< %s%s >", curLayoutName, dots?"...":"" );
624-
625- text_surface = TTF_RenderText_Blended(menu_info_font, text_tmp, text_color);
626- text_pos.x = (draw_screen->w - MENU_ZONE_WIDTH)/2 + (MENU_ZONE_WIDTH - text_surface->w)/2;
627- text_pos.y = draw_screen->h - MENU_ZONE_HEIGHT/2 - text_surface->h/2;
628- SDL_BlitSurface(text_surface, NULL, draw_screen, &text_pos);
629-
619+ case MENU_TYPE_LAUNCHER:
630620 if (menu_action){
631621 sprintf (text_tmp, " In progress..." );
632622 text_surface = TTF_RenderText_Blended (menu_info_font, text_tmp, text_color);
@@ -641,7 +631,7 @@ void FunkeyMenu::menu_screen_refresh(int menuItem, int prevItem, int scroll, uin
641631 text_pos.y = draw_screen->h - MENU_ZONE_HEIGHT/2 - text_surface->h /2 + 2 *padding_y_from_center_menu_zone;
642632 SDL_BlitSurface (text_surface, NULL , draw_screen, &text_pos);
643633 }
644- break;*/
634+ break ;
645635
646636 case MENU_TYPE_EXIT:
647637 case MENU_TYPE_POWERDOWN:
@@ -877,7 +867,7 @@ int FunkeyMenu::launch( )
877867 // / ------ Refresh screen ------
878868 screen_refresh = 1 ;
879869 }
880- /* else if(idx_menus[menuItem] == MENU_TYPE_THEME ){
870+ /* else if(idx_menus[menuItem] == MENU_TYPE_LAUNCHER ){
881871 MENU_DEBUG_PRINTF("Theme previous\n");
882872
883873 /// ------ Refresh screen ------
@@ -937,7 +927,7 @@ int FunkeyMenu::launch( )
937927 // / ------ Refresh screen ------
938928 screen_refresh = 1 ;
939929 }
940- /* else if(idx_menus[menuItem] == MENU_TYPE_THEME ){
930+ /* else if(idx_menus[menuItem] == MENU_TYPE_LAUNCHER ){
941931 MENU_DEBUG_PRINTF("Theme previous\n");
942932
943933 /// ------ Refresh screen ------
@@ -1013,23 +1003,27 @@ int FunkeyMenu::launch( )
10131003 screen_refresh = 1 ;
10141004 }
10151005 }
1016- /* else if(idx_menus[menuItem] == MENU_TYPE_THEME ){
1006+ else if (idx_menus[menuItem] == MENU_TYPE_LAUNCHER ){
10171007 if (menu_confirmation){
1018- MENU_DEBUG_PRINTF("Theme change - confirmed\n");
1008+ MENU_DEBUG_PRINTF (" Lancher change - confirmed\n " );
10191009
10201010 // / ------ Refresh Screen -------
10211011 menu_screen_refresh (menuItem, prevItem, scroll, menu_confirmation, 1 );
10221012
1013+ // / ----- Shell cmd ----
1014+ MENU_DEBUG_PRINTF (" Running command: %s\n " , SHELL_CMD_SET_LAUNCHER_RETROFE);
1015+ executeRawPath (SHELL_CMD_SET_LAUNCHER_RETROFE);
1016+
10231017 stop_menu_loop = 1 ;
10241018 returnCode = MENU_RETURN_EXIT;
10251019 }
10261020 else {
1027- MENU_DEBUG_PRINTF("Theme change - asking confirmation\n");
1021+ MENU_DEBUG_PRINTF (" Launcher change - asking confirmation\n " );
10281022 menu_confirmation = 1 ;
10291023 // / ------ Refresh screen ------
10301024 screen_refresh = 1 ;
10311025 }
1032- }*/
1026+ }
10331027 else if (idx_menus[menuItem] == MENU_TYPE_EXIT){
10341028 MENU_DEBUG_PRINTF (" Exit game\n " );
10351029 if (menu_confirmation){
0 commit comments