diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2023-09-22 09:57:48 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-09-22 10:00:46 -0400 |
commit | 8cc3266b2a172a51dc12d05e8e1a06485b895e48 (patch) | |
tree | f45e7c9e273037d2f4ea0c72b740c4241458eeb2 | |
parent | cb3a6877fcbb001a8ee9afd3e4a25579ac40f805 (diff) | |
download | rockbox-8cc3266b2a.tar.gz rockbox-8cc3266b2a.zip |
Settings: Rename INT/BOOL setting type enum to RB_INT/RB_BOOL
....Because INT and BOOL are already defined in mingw32.
Change-Id: I28ab8189c00002c8f68bc9d0c23d2ae78d9e33d0
38 files changed, 115 insertions, 115 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 7fc93b315b..d80705df13 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2216,7 +2216,7 @@ static bool dbg_set_memory_guard(void) }; int mode = system_memory_guard(MEMGUARD_KEEP); - set_option( "Catch mem accesses", &mode, INT, names, MAXMEMGUARD, NULL); + set_option( "Catch mem accesses", &mode, RB_INT, names, MAXMEMGUARD, NULL); system_memory_guard(mode); return false; diff --git a/apps/enc_config.c b/apps/enc_config.c index b70ac03888..d06ac84b5f 100644 --- a/apps/enc_config.c +++ b/apps/enc_config.c @@ -183,7 +183,7 @@ static bool mp3_enc_bitrate(struct menucallback_data *data) int index = round_value_to_list32(cfg->mp3_enc.bitrate, rate_list, n_rates, false); - bool res = set_option(str(LANG_BITRATE), &index, INT, + bool res = set_option(str(LANG_BITRATE), &index, RB_INT, items, n_rates, NULL); index = round_value_to_list32(rate_list[index], mp3_enc_bitr, MP3_ENC_NUM_BITR, false); diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index 4d9f24d643..6fd1de8834 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c @@ -91,7 +91,7 @@ static int recsource_func(void) #endif return set_option(str(LANG_RECORDING_SOURCE), - &global_settings.rec_source, INT, names, + &global_settings.rec_source, RB_INT, names, n_opts, NULL ); } MENUITEM_FUNCTION(recsource, 0, ID2P(LANG_RECORDING_SOURCE), @@ -171,7 +171,7 @@ static int recfrequency_func(void) } ret = set_option(str(LANG_FREQUENCY), - &rec_frequency, INT, opts, n_opts, NULL ); + &rec_frequency, RB_INT, opts, n_opts, NULL ); if (!ret HAVE_SPDIF_REC_( && global_settings.rec_source != REC_SRC_SPDIF) @@ -221,7 +221,7 @@ static int recchannels_func(void) make_options_from_indexes(names, table, n_opts, opts); ret = set_option(str(LANG_CHANNELS), &rec_channels, - INT, opts, n_opts, NULL ); + RB_INT, opts, n_opts, NULL ); if (!ret) global_settings.rec_channels = table[rec_channels]; @@ -241,7 +241,7 @@ static int recmonomode_func(void) int rec_mono_mode = global_settings.rec_mono_mode; bool ret = set_option(str(LANG_RECORDING_MONO_MODE), &rec_mono_mode, - INT, names, 3, NULL ); + RB_INT, names, 3, NULL ); if (rec_mono_mode != global_settings.rec_mono_mode) global_settings.rec_mono_mode = rec_mono_mode; @@ -261,7 +261,7 @@ static int recformat_func(void) }; int rec_format = global_settings.rec_format; - bool res = set_option(str(LANG_FORMAT), &rec_format, INT, + bool res = set_option(str(LANG_FORMAT), &rec_format, RB_INT, names, REC_NUM_FORMATS, NULL ); if (rec_format != global_settings.rec_format) diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index 6043573684..e6b5637047 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c @@ -135,7 +135,7 @@ static int alarm_setting(void) #endif return set_option(str(LANG_ALARM_WAKEUP_SCREEN), &global_settings.alarm_wake_up_screen, - INT, items, i, NULL); + RB_INT, items, i, NULL); } MENUITEM_FUNCTION(alarm_wake_up_screen, 0, ID2P(LANG_ALARM_WAKEUP_SCREEN), diff --git a/apps/plugins/announce_status.c b/apps/plugins/announce_status.c index 1ccfc1e70a..21518b4d68 100644 --- a/apps/plugins/announce_status.c +++ b/apps/plugins/announce_status.c @@ -383,7 +383,7 @@ static int settings_menu(void) break; case 1: rb->set_option(rb->str(LANG_ANNOUNCE_ON), - &gAnnounce.announce_on, INT, announce_options, 2, NULL); + &gAnnounce.announce_on, RB_INT, announce_options, 2, NULL); break; case 2: rb->set_int(rb->str(LANG_GROUPING), "", 1, diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index de65ce69e1..a26ff8edd8 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -1565,7 +1565,7 @@ static int brickmania_menu(void) brickmania_init_game(true); return 0; case 2: - rb->set_option("Difficulty", &difficulty, INT, + rb->set_option("Difficulty", &difficulty, RB_INT, options, 2, NULL); break; case 3: diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 765b42ef59..6d1091159f 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -911,7 +911,7 @@ static bool edit_memo(int change, struct shown *shown) case 6: /* weekday */ rb->set_option("First Day of Week", &info.first_wday, - INT, modes, 7, NULL); + RB_INT, modes, 7, NULL); break; case 7: /* playback control */ diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 5c87e74e50..78cc292147 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -784,7 +784,7 @@ static int chopMenu(int menunum) res = -1; break; case 2: - rb->set_option("Level", &iLevelMode, INT, levels, 2, NULL); + rb->set_option("Level", &iLevelMode, RB_INT, levels, 2, NULL); break; case 3: playback_control(NULL); diff --git a/apps/plugins/clock/clock_menu.c b/apps/plugins/clock/clock_menu.c index a597664f49..8b7a2c82be 100644 --- a/apps/plugins/clock/clock_menu.c +++ b/apps/plugins/clock/clock_menu.c @@ -81,17 +81,17 @@ static void menu_analog_settings(void) switch(result){ case 0: rb->set_option("Show Date", &clock_settings.analog.show_date, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; case 1: rb->set_option("Show Second Hand", &clock_settings.analog.show_seconds, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; case 2: rb->set_option("Show Border", &clock_settings.analog.show_border, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; } } @@ -112,12 +112,12 @@ static void menu_digital_settings(void){ case 0: rb->set_option("Show Seconds", &clock_settings.digital.show_seconds, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; case 1: rb->set_option("Blinking Colon", &clock_settings.digital.blinkcolon, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; } } @@ -129,7 +129,7 @@ static void menu_digital_settings(void){ static void confirm_reset(void){ int result=0; - rb->set_option("Reset all settings?", &result, INT, noyes_text, 2, NULL); + rb->set_option("Reset all settings?", &result, RB_INT, noyes_text, 2, NULL); if(result == 1){ /* reset! */ clock_settings_reset(&clock_settings); @@ -157,16 +157,16 @@ static void menu_general_settings(void){ case 0: rb->set_option("Hour format", &clock_settings.general.hour_format, - INT, hour_format_text, 2, NULL); + RB_INT, hour_format_text, 2, NULL); break; case 1: rb->set_option("Date format", &clock_settings.general.date_format, - INT, date_format_text, 4, NULL); + RB_INT, date_format_text, 4, NULL); break; case 2: rb->set_option("Show Counter", &clock_settings.general.show_counter, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); break; case 3: confirm_reset(); @@ -180,7 +180,7 @@ static void menu_general_settings(void){ case 5: rb->set_option("Save On Exit", &clock_settings.general.save_settings, - BOOL, noyes_text, 2, NULL); + RB_BOOL, noyes_text, 2, NULL); /* if we no longer save on exit, we better save now to remember that */ @@ -190,14 +190,14 @@ static void menu_general_settings(void){ case 6: rb->set_option("Backlight Settings", &clock_settings.general.backlight, - INT, backlight_settings_text, 3, NULL); + RB_INT, backlight_settings_text, 3, NULL); apply_backlight_setting(clock_settings.general.backlight); break; case 7: rb->set_option("Idle Poweroff (temporary)", &clock_settings.general.idle_poweroff, - BOOL, idle_poweroff_text, 2, NULL); + RB_BOOL, idle_poweroff_text, 2, NULL); break; } } diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c index 7580697267..8f2315cde8 100644 --- a/apps/plugins/dice.c +++ b/apps/plugins/dice.c @@ -201,7 +201,7 @@ static bool dice_menu(struct dices * dice) { break; case 2: - rb->set_option("Number of Sides", &sides_index, INT, + rb->set_option("Number of Sides", &sides_index, RB_INT, nb_sides_option, sizeof(nb_sides_values)/sizeof(int), NULL); dice->nb_sides=nb_sides_values[sides_index]; diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c index b68107f8aa..04817d4722 100644 --- a/apps/plugins/doom/rockdoom.c +++ b/apps/plugins/doom/rockdoom.c @@ -490,7 +490,7 @@ int Oset_keys() else { *keys[result]=translatekey(*keys[result]); - rb->set_option(menu_[result], keys[result], INT, doomkeys, numdoomkeys, NULL ); + rb->set_option(menu_[result], keys[result], RB_INT, doomkeys, numdoomkeys, NULL ); *keys[result]=translatekey(*keys[result]); } } @@ -540,7 +540,7 @@ static bool Doptions() if(result==0) Oset_keys(); else if (result > 0) - rb->set_option(menu_[result], options[result-1], INT, onoff, 2, NULL ); + rb->set_option(menu_[result], options[result-1], RB_INT, onoff, 2, NULL ); else menuquit=1; } @@ -620,7 +620,7 @@ int doom_menu() result = rb->do_menu(&menu, &selected, NULL, false); switch (result) { case 0: /* Game picker */ - rb->set_option("Game WAD", &gamever, INT, names, status, NULL ); + rb->set_option("Game WAD", &gamever, RB_INT, names, status, NULL ); break; case 1: /* Addon picker */ diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index 54a6d07c20..5f547ed5e0 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c @@ -312,32 +312,32 @@ static void fireworks_menu(void) break; case 1: - rb->set_option("Auto-Fire", &autofire_delay, INT, + rb->set_option("Auto-Fire", &autofire_delay, RB_INT, autofire_delay_settings, 15, NULL); break; case 2: rb->set_option("Particles Per Firework", &particles_per_firework, - INT, particle_settings, 8, NULL); + RB_INT, particle_settings, 8, NULL); break; case 3: - rb->set_option("Particle Life", &particle_life, INT, + rb->set_option("Particle Life", &particle_life, RB_INT, particle_life_settings, 9, NULL); break; case 4: - rb->set_option("Gravity", &gravity, INT, + rb->set_option("Gravity", &gravity, RB_INT, gravity_settings, 4, NULL); break; case 5: - rb->set_option("Show Rockets", &show_rockets, INT, + rb->set_option("Show Rockets", &show_rockets, RB_INT, rocket_settings, 3, NULL); break; case 6: - rb->set_option("FPS (Speed)", &frames_per_second, INT, + rb->set_option("FPS (Speed)", &frames_per_second, RB_INT, fps_settings, 9, NULL); break; diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index c77b22fdae..d1a512c4fd 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c @@ -230,7 +230,7 @@ static bool set_option_dithering(void) [DITHER_DIFFUSION] = { STR(LANG_DIFFUSION) }, }; - rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, INT, + rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, RB_INT, dithering, DITHER_NUM_MODES, NULL); return false; } @@ -290,7 +290,7 @@ static int show_menu(void) /* return 1 to quit */ case MIID_RETURN: break; case MIID_TOGGLE_SS_MODE: - rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, BOOL, + rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, RB_BOOL, slideshow , 2, NULL); break; case MIID_CHANGE_SS_MODE: diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 1536b785b4..3a65e8ba64 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1481,7 +1481,7 @@ static int jewels_game_menu(struct game_context* bj, bool ingame) jewels_init(bj); return 0; case 2: - rb->set_option("Mode", &bj->tmp_type, INT, mode, 2, NULL); + rb->set_option("Mode", &bj->tmp_type, RB_INT, mode, 2, NULL); break; case 3: if(jewels_help()) diff --git a/apps/plugins/lastfm_scrobbler_viewer.c b/apps/plugins/lastfm_scrobbler_viewer.c index c8b125c293..c35ba64918 100644 --- a/apps/plugins/lastfm_scrobbler_viewer.c +++ b/apps/plugins/lastfm_scrobbler_viewer.c @@ -478,7 +478,7 @@ static int filter_items(struct printcell_data_t *pc_data, {"Exclude Any", -1}, {"Include", -1}, {"Include Case Sensitive", -1}, {"Include Any", -1} }; - if (rb->set_option("Find Type", &option, INT, + if (rb->set_option("Find Type", &option, RB_INT, find_types, 6, NULL)) { return 0; diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index de31733671..d341e6b7a5 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -2288,7 +2288,7 @@ static bool lrc_display_menu(void) usb = rb->set_bool("Wipe", &prefs.wipe); break; case LRC_MENU_ALIGN: - usb = rb->set_option("Alignment", &prefs.align, INT, + usb = rb->set_option("Alignment", &prefs.align, RB_INT, align_names, 3, NULL); break; case LRC_MENU_LINE_MODE: @@ -2345,7 +2345,7 @@ static bool lrc_lyrics_menu(void) case LRC_MENU_ENCODING: prefs.encoding++; old_val = prefs.encoding; - usb = rb->set_option("Encoding", &prefs.encoding, INT, + usb = rb->set_option("Encoding", &prefs.encoding, RB_INT, cp_names, NUM_CODEPAGES+1, NULL); if (prefs.encoding != old_val) { diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index 65633c0ad1..5179848549 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c @@ -623,7 +623,7 @@ static int settings_menu(void) break; case 6: - rb->set_option(rb->str(LANG_MIKMOD_SAMPLERATE), &(settings.sample_rate), INT, sr_names, + rb->set_option(rb->str(LANG_MIKMOD_SAMPLERATE), &(settings.sample_rate), RB_INT, sr_names, HW_NUM_FREQ, NULL); applysettings(); break; diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index c904de466d..6464f37217 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -1199,7 +1199,7 @@ static void display_options(void) #if MPEG_OPTION_DITHERING_ENABLED case MPEG_OPTION_DITHERING: result = (settings.displayoptions & LCD_YUV_DITHER) ? 1 : 0; - mpeg_set_option(rb->str(LANG_DITHERING), &result, INT, noyes, 2, NULL); + mpeg_set_option(rb->str(LANG_DITHERING), &result, RB_INT, noyes, 2, NULL); settings.displayoptions = (settings.displayoptions & ~LCD_YUV_DITHER) | ((result != 0) ? LCD_YUV_DITHER : 0); @@ -1208,17 +1208,17 @@ static void display_options(void) #endif /* MPEG_OPTION_DITHERING_ENABLED */ case MPEG_OPTION_DISPLAY_FPS: - mpeg_set_option(rb->str(LANG_DISPLAY_FPS), &settings.showfps, INT, + mpeg_set_option(rb->str(LANG_DISPLAY_FPS), &settings.showfps, RB_INT, noyes, 2, NULL); break; case MPEG_OPTION_LIMIT_FPS: - mpeg_set_option(rb->str(LANG_LIMIT_FPS), &settings.limitfps, INT, + mpeg_set_option(rb->str(LANG_LIMIT_FPS), &settings.limitfps, RB_INT, noyes, 2, NULL); break; case MPEG_OPTION_SKIP_FRAMES: - mpeg_set_option(rb->str(LANG_SKIP_FRAMES), &settings.skipframes, INT, + mpeg_set_option(rb->str(LANG_SKIP_FRAMES), &settings.skipframes, RB_INT, noyes, 2, NULL); break; @@ -1269,31 +1269,31 @@ static void audio_options(void) switch (result) { case MPEG_AUDIO_TONE_CONTROLS: - mpeg_set_option(rb->str(LANG_TONE_CONTROLS), &settings.tone_controls, INT, + mpeg_set_option(rb->str(LANG_TONE_CONTROLS), &settings.tone_controls, RB_INT, globaloff, 2, NULL); sync_audio_setting(result, false); break; case MPEG_AUDIO_CHANNEL_MODES: mpeg_set_option(rb->str(LANG_CHANNEL_CONFIGURATION), &settings.channel_modes, - INT, globaloff, 2, NULL); + RB_INT, globaloff, 2, NULL); sync_audio_setting(result, false); break; case MPEG_AUDIO_CROSSFEED: - mpeg_set_option(rb->str(LANG_CROSSFEED), &settings.crossfeed, INT, + mpeg_set_option(rb->str(LANG_CROSSFEED), &settings.crossfeed, RB_INT, globaloff, 2, NULL); sync_audio_setting(result, false); break; case MPEG_AUDIO_EQUALIZER: - mpeg_set_option(rb->str(LANG_EQUALIZER), &settings.equalizer, INT, + mpeg_set_option(rb->str(LANG_EQUALIZER), &settings.equalizer, RB_INT, globaloff, 2, NULL); sync_audio_setting(result, false); break; case MPEG_AUDIO_DITHERING: - mpeg_set_option(rb->str(LANG_DITHERING), &settings.dithering, INT, + mpeg_set_option(rb->str(LANG_DITHERING), &settings.dithering, RB_INT, globaloff, 2, NULL); sync_audio_setting(result, false); break; @@ -1322,7 +1322,7 @@ static void resume_options(void) }; mpeg_set_option(rb->str(LANG_MENU_RESUME_OPTIONS), &settings.resume_options, - INT, items, MPEG_RESUME_NUM_OPTIONS, NULL); + RB_INT, items, MPEG_RESUME_NUM_OPTIONS, NULL); } static void clear_resume_count(void) @@ -1369,7 +1369,7 @@ static void mpeg_settings(void) case MPEG_SETTING_PLAY_MODE: mpeg_set_option(rb->str(LANG_MENU_PLAY_MODE), &settings.play_mode, - INT, singleall, 2, NULL); + RB_INT, singleall, 2, NULL); break; case MPEG_SETTING_CLEAR_RESUMES: diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index 9434aed743..b306503862 100755 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c @@ -266,7 +266,7 @@ static bool pacbox_menu(void) { case PBMI_DIFFICULTY: new_setting=settings.difficulty; - rb->set_option("Difficulty", &new_setting, INT, + rb->set_option("Difficulty", &new_setting, RB_INT, difficulty_options , 2, NULL); if (new_setting != settings.difficulty) { settings.difficulty=new_setting; @@ -275,7 +275,7 @@ static bool pacbox_menu(void) break; case PBMI_PACMEN_PER_GAME: new_setting=settings.numlives; - rb->set_option("Pacmen Per Game", &new_setting, INT, + rb->set_option("Pacmen Per Game", &new_setting, RB_INT, numlives_options , 4, NULL); if (new_setting != settings.numlives) { settings.numlives=new_setting; @@ -284,7 +284,7 @@ static bool pacbox_menu(void) break; case PBMI_BONUS_LIFE: new_setting=settings.bonus; - rb->set_option("Bonus Life", &new_setting, INT, + rb->set_option("Bonus Life", &new_setting, RB_INT, bonus_options , 4, NULL); if (new_setting != settings.bonus) { settings.bonus=new_setting; @@ -293,7 +293,7 @@ static bool pacbox_menu(void) break; case PBMI_GHOST_NAMES: new_setting=settings.ghostnames; - rb->set_option("Ghost Names", &new_setting, INT, + rb->set_option("Ghost Names", &new_setting, RB_INT, ghostname_options , 2, NULL); if (new_setting != settings.ghostnames) { settings.ghostnames=new_setting; @@ -301,16 +301,16 @@ static bool pacbox_menu(void) } break; case PBMI_DISPLAY_FPS: - rb->set_option("Display FPS",&settings.showfps,INT, + rb->set_option("Display FPS",&settings.showfps, RB_INT, noyes, 2, NULL); break; case PBMI_SOUND: - rb->set_option("Sound",&settings.sound, INT, + rb->set_option("Sound",&settings.sound, RB_INT, noyes, 2, NULL); break; #ifdef AI case PBMI_AI: - rb->set_option("AI",&settings.ai, INT, + rb->set_option("AI",&settings.ai, RB_INT, noyes, 2, NULL); break; #endif diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index b21faf1dd8..c49d23dc49 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -3552,7 +3552,7 @@ static int settings_menu(void) case 0: old_val = pf_cfg.show_album_name; rb->set_option(rb->str(LANG_SHOW_ALBUM_TITLE), - &pf_cfg.show_album_name, INT, album_name_options, 5, NULL); + &pf_cfg.show_album_name, RB_INT, album_name_options, 5, NULL); adjust_album_display_for_setting(old_val, pf_cfg.show_album_name); break; case 1: @@ -3561,7 +3561,7 @@ static int settings_menu(void) case 2: old_val = pf_cfg.sort_albums_by; rb->set_option(rb->str(LANG_SORT_ALBUMS_BY), - &pf_cfg.sort_albums_by, INT, sort_options, 4, NULL); + &pf_cfg.sort_albums_by, RB_INT, sort_options, 4, NULL); if (old_val != pf_cfg.sort_albums_by && !sort_albums(pf_cfg.sort_albums_by, true)) pf_cfg.sort_albums_by = old_val; @@ -3569,7 +3569,7 @@ static int settings_menu(void) case 3: old_val = pf_cfg.year_sort_order; rb->set_option(rb->str(LANG_YEAR_SORT_ORDER), - &pf_cfg.year_sort_order, INT, year_sort_order_options, 2, NULL); + &pf_cfg.year_sort_order, RB_INT, year_sort_order_options, 2, NULL); if (old_val != pf_cfg.year_sort_order && !sort_albums(pf_cfg.sort_albums_by, true)) pf_cfg.year_sort_order = old_val; @@ -3635,11 +3635,11 @@ static int settings_menu(void) break; case 12: rb->set_option(rb->str(LANG_WPS_INTEGRATION), - &pf_cfg.auto_wps, INT, wps_options, 3, NULL); + &pf_cfg.auto_wps, RB_INT, wps_options, 3, NULL); break; case 13: rb->set_option(rb->str(LANG_BACKLIGHT), - &pf_cfg.backlight_mode, INT, backlight_options, 2, NULL); + &pf_cfg.backlight_mode, RB_INT, backlight_options, 2, NULL); break; case MENU_ATTACHED_USB: diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c index e9b1fb11b0..f7d1219445 100644 --- a/apps/plugins/pitch_detector.c +++ b/apps/plugins/pitch_detector.c @@ -503,19 +503,19 @@ static bool main_menu(void) rb->set_option( "Algorithm Pickiness (Lower -> more discriminating)", &settings.yin_threshold, - INT, yin_threshold_text, + RB_INT, yin_threshold_text, sizeof(yin_threshold_text) / sizeof(yin_threshold_text[0]), NULL); break; case 5: rb->set_option("Display Accidentals As", &settings.use_sharps, - BOOL, accidental_text, 2, NULL); + RB_BOOL, accidental_text, 2, NULL); break; case 6: rb->set_option("Key Transposition", &settings.key_transposition, - INT, transpose_text, 12, NULL); + RB_INT, transpose_text, 12, NULL); break; case 7: rb->set_bool("Display Frequency (Hz)", diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index 74dd98b676..e4bb232a26 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -400,7 +400,7 @@ static bool reversi_gui_choose_strategy( } result = - rb->set_option(prompt, &index, INT, strategy_settings, num_items, NULL); + rb->set_option(prompt, &index, RB_INT, strategy_settings, num_items, NULL); (*player) = strategy_values[index]; @@ -450,7 +450,7 @@ static bool reversi_gui_menu(void) { break; } } - rb->set_option(MENU_TEXT_WRAP_MODE, &index, INT, + rb->set_option(MENU_TEXT_WRAP_MODE, &index, RB_INT, cursor_wrap_mode_settings, 3, NULL); cursor_wrap_mode = cursor_wrap_mode_values[index]; break; diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 7fd7aabdc8..870ea389fb 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c @@ -437,39 +437,39 @@ static void do_opt_menu(void) switch (result) { case 0: /* Frameskip */ - rb->set_option("Max Frameskip", &options.maxskip, INT, frameskip, + rb->set_option("Max Frameskip", &options.maxskip, RB_INT, frameskip, sizeof(frameskip)/sizeof(*frameskip), NULL ); break; case 1: /* Autosave */ - rb->set_option("Autosave", &options.autosave, INT, onoff, 2, NULL ); + rb->set_option("Autosave", &options.autosave, RB_INT, onoff, 2, NULL ); break; case 2: /* Sound */ if(options.sound>1) options.sound=1; - rb->set_option("Sound", &options.sound, INT, onoff, 2, NULL ); + rb->set_option("Sound", &options.sound, RB_INT, onoff, 2, NULL ); if(options.sound) sound_dirty(); break; case 3: /* Volume */ rb->option_screen((struct settings_list*)vol, parentvp, false, "Volume"); break; case 4: /* Stats */ - rb->set_option("Stats", &options.showstats, INT, stats, 3, NULL ); + rb->set_option("Stats", &options.showstats, RB_INT, stats, 3, NULL ); break; case 5: /* Keys */ setupkeys(); break; #ifdef HAVE_LCD_COLOR case 6: /* Screen Size */ - rb->set_option("Screen Size", &options.scaling, INT, scaling, + rb->set_option("Screen Size", &options.scaling, RB_INT, scaling, sizeof(scaling)/sizeof(*scaling), NULL ); setvidmode(); break; case 7: /* Screen rotate */ - rb->set_option("Screen Rotate", &options.rotate, INT, rotate, + rb->set_option("Screen Rotate", &options.rotate, RB_INT, rotate, sizeof(rotate)/sizeof(*rotate), NULL ); setvidmode(); break; case 8: /* Palette */ - rb->set_option("Set Palette", &options.pal, INT, palette, 17, NULL ); + rb->set_option("Set Palette", &options.pal, RB_INT, palette, 17, NULL ); set_pal(); break; #endif diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index cba1701eb6..52281edfb0 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -2869,7 +2869,7 @@ static void goto_menu(void) case MAIN_MENU_BRUSH_SIZE: for(multi = 0; multi<4; multi++) if(bsize == times_list[multi]) break; - rb->set_option( "Brush Size", &multi, INT, times_options, 4, NULL ); + rb->set_option( "Brush Size", &multi, RB_INT, times_options, 4, NULL ); if( multi >= 0 ) bsize = times_list[multi]; break; @@ -2877,7 +2877,7 @@ static void goto_menu(void) case MAIN_MENU_BRUSH_SPEED: for(multi = 0; multi<3; multi++) if(bspeed == times_list[multi]) break; - rb->set_option( "Brush Speed", &multi, INT, times_options, 3, NULL ); + rb->set_option( "Brush Speed", &multi, RB_INT, times_options, 3, NULL ); if( multi >= 0 ) { bspeed = times_list[multi]; incdec_x.step[0] = bspeed; @@ -2894,7 +2894,7 @@ static void goto_menu(void) case MAIN_MENU_GRID_SIZE: for(multi = 0; multi<4; multi++) if(gridsize == gridsize_list[multi]) break; - rb->set_option( "Grid Size", &multi, INT, gridsize_options, 4, NULL ); + rb->set_option( "Grid Size", &multi, RB_INT, gridsize_options, 4, NULL ); if( multi >= 0 ) gridsize = gridsize_list[multi]; break; diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 7a43b235b7..c71fa7f247 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -1599,7 +1599,7 @@ static void game_init(void) speed = level*20; return; case 1: - rb->set_option("Game Type", &game_type, INT, + rb->set_option("Game Type", &game_type, RB_INT, type_options, 2, NULL); break; case 2: diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 874d872d95..fde3d04a0b 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -1088,7 +1088,7 @@ static int solitaire_menu(bool in_game) case 2: if (rb->set_option("Draw Cards Option", &sol.draw_type, - INT, drawcards, 2, NULL)) + RB_INT, drawcards, 2, NULL)) result = MENU_USB; break; diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 34a1f6dd07..3ede4e8af6 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -867,7 +867,7 @@ static bool numdisplay_setting(void) {"Coloured", -1}, }; - return rb->set_option("Number Display", &sudcfg.number_display, INT, names, + return rb->set_option("Number Display", &sudcfg.number_display, RB_INT, names, sizeof(names) / sizeof(names[0]), NULL); } #endif @@ -880,7 +880,7 @@ static bool showmarkings_setting(void) {"Show", -1}, }; - return rb->set_option("Show Markings", &sudcfg.show_markings, INT, names, + return rb->set_option("Show Markings", &sudcfg.show_markings, RB_INT, names, sizeof(names) / sizeof(names[0]), NULL); } #endif diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 6969f76165..79a6d1a8f2 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c @@ -583,7 +583,7 @@ static int settings_menu(void) }; static int sel=1; rb->set_option("Computer difficulty", &sel, - INT, difficulty_options, 3, NULL); + RB_INT, difficulty_options, 3, NULL); superdom_settings.compdiff=sel+1; break; } diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index ac0dbf1633..91599bfc5d 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -915,7 +915,7 @@ menu: #ifdef HAVE_ADJUSTABLE_CPU_FREQ if (result == BOOST) { - rb->set_option("Boosting", &boost, INT, + rb->set_option("Boosting", &boost, RB_INT, boost_settings, 2, NULL); goto menu; } diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c index c13392f069..3006faeea5 100644 --- a/apps/plugins/test_sampr.c +++ b/apps/plugins/test_sampr.c @@ -252,7 +252,7 @@ static void play_tone(bool volume_set) else #endif /* HAVE_VOLUME_IN_LIST */ { - rb->set_option("Sample Rate", &freq, INT, names, + rb->set_option("Sample Rate", &freq, RB_INT, names, HW_NUM_FREQ, set_frequency); (void)volume_set; } diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index 1cc471e207..74a964ba98 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c @@ -46,7 +46,7 @@ static bool tv_horizontal_scroll_mode_setting(void) {"Scroll by Column", -1}, }; - return rb->set_option("Scroll Mode", &new_prefs.horizontal_scroll_mode, INT, + return rb->set_option("Scroll Mode", &new_prefs.horizontal_scroll_mode, RB_INT, names, 2, NULL); } @@ -75,7 +75,7 @@ static bool tv_vertical_scroll_mode_setting(void) {"Scroll by Line", -1}, }; - return rb->set_option("Scroll Mode", &new_prefs.vertical_scroll_mode, INT, + return rb->set_option("Scroll Mode", &new_prefs.vertical_scroll_mode, RB_INT, names, 2, NULL); } @@ -97,7 +97,7 @@ static bool tv_narrow_mode_setting(void) {"Top/Bottom Page", -1}, }; - return rb->set_option("Left/Right Key", &new_prefs.narrow_mode, INT, + return rb->set_option("Left/Right Key", &new_prefs.narrow_mode, RB_INT, names, 2, NULL); } @@ -138,7 +138,7 @@ static bool tv_encoding_setting(void) names[idx].voice_id = -1; } - return rb->set_option("Encoding", &new_prefs.encoding, INT, names, + return rb->set_option("Encoding", &new_prefs.encoding, RB_INT, names, sizeof(names) / sizeof(names[0]), NULL); } @@ -149,7 +149,7 @@ static bool tv_word_wrap_setting(void) {"Off (Chop Words)", -1}, }; - return rb->set_option("Word Wrap", &new_prefs.word_mode, INT, + return rb->set_option("Word Wrap", &new_prefs.word_mode, RB_INT, names, 2, NULL); } @@ -162,7 +162,7 @@ static bool tv_line_mode_setting(void) {"Reflow Lines", -1}, }; - return rb->set_option("Line Mode", &new_prefs.line_mode, INT, names, + return rb->set_option("Line Mode", &new_prefs.line_mode, RB_INT, names, sizeof(names) / sizeof(names[0]), NULL); } @@ -179,7 +179,7 @@ static bool tv_alignment_setting(void) {"Right", -1}, }; - return rb->set_option("Alignment", &new_prefs.alignment, INT, + return rb->set_option("Alignment", &new_prefs.alignment, RB_INT, names , 2, NULL); } diff --git a/apps/plugins/theme_remove.c b/apps/plugins/theme_remove.c index f39d224868..6f5353f3f6 100644 --- a/apps/plugins/theme_remove.c +++ b/apps/plugins/theme_remove.c @@ -589,7 +589,7 @@ static bool option_menu(void) { struct remove_setting *setting = &remove_list[result]; int prev_option = setting->option; - if (rb->set_option(option_menu_[result], &setting->option, INT, + if (rb->set_option(option_menu_[result], &setting->option, RB_INT, remove_names, NUM_REMOVE_OPTION, NULL)) return true; if (prev_option != setting->option) diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 39deae6947..0dafd05845 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c @@ -668,7 +668,7 @@ static bool vu_meter_menu(void) switch(rb->do_menu(&menu, &selection, NULL, false)) { case 0: - rb->set_option("Meter Type", &vumeter_settings.meter_type, INT, + rb->set_option("Meter Type", &vumeter_settings.meter_type, RB_INT, meter_type_option, 2, NULL); break; @@ -701,12 +701,12 @@ static bool vu_meter_menu(void) case 3: if(vumeter_settings.meter_type==ANALOG) { - rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT, + rb->set_option("Decay Speed", &vumeter_settings.analog_decay, RB_INT, decay_speed_option, 7, NULL); } else { - rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT, + rb->set_option("Decay Speed", &vumeter_settings.digital_decay, RB_INT, decay_speed_option, 7, NULL); } break; diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index abdb6a4725..7dd814bc08 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -2562,24 +2562,24 @@ enum plugin_status plugin_start(const void* parameter) case 3: switch(players) { case 0: - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, nokey_option, 1, NULL); break; case 1: - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, key24_option, 2, NULL); break; case 2: #ifdef REMOTE - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, remote_option, 2, NULL); #else - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, key2_option, 1, NULL); #endif break; case 3: - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, remoteonly_option, 1, NULL); break; } @@ -2608,7 +2608,7 @@ enum plugin_status plugin_start(const void* parameter) break; case 9: new_setting = 0; - rb->set_option(rb->str(LANG_RESET), &new_setting, INT, noyes , 2, NULL); + rb->set_option(rb->str(LANG_RESET), &new_setting, RB_INT, noyes , 2, NULL); if (new_setting == 1) default_settings(); break; diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index e20322258d..4a80152b70 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c @@ -206,7 +206,7 @@ static void do_video_settings(struct System* sys) #else case 2: #endif - rb->set_option("Scaling", &sys->settings.scaling_quality, INT, scaling_settings, + rb->set_option("Scaling", &sys->settings.scaling_quality, RB_INT, scaling_settings, #ifdef HAVE_LCD_COLOR 3 #else @@ -225,7 +225,7 @@ static void do_video_settings(struct System* sys) #else case 3: #endif - rb->set_option("Rotation", &sys->settings.rotation_option, INT, rotation_settings, 3, NULL); + rb->set_option("Rotation", &sys->settings.rotation_option, RB_INT, rotation_settings, 3, NULL); if(sys->settings.rotation_option && sys->settings.zoom) { diff --git a/apps/plugins/zxbox/spmain.c b/apps/plugins/zxbox/spmain.c index 6c6b59c3fb..38cc175a85 100644 --- a/apps/plugins/zxbox/spmain.c +++ b/apps/plugins/zxbox/spmain.c @@ -257,21 +257,21 @@ static void options_menu(void){ { case 0: new_setting=settings.kempston; - rb->set_option("Map Keys to kempston",&new_setting,INT, + rb->set_option("Map Keys to kempston",&new_setting, RB_INT, no_yes, 2, NULL); if (new_setting != settings.kempston ) settings.kempston=new_setting; break; case 1: new_setting = settings.showfps; - rb->set_option("Display Speed",&new_setting,INT, + rb->set_option("Display Speed",&new_setting, RB_INT, no_yes, 2, NULL); if (new_setting != settings.showfps ) settings.showfps=new_setting; break; case 2: new_setting = settings.invert_colors; - rb->set_option("Invert Colors",&new_setting,INT, + rb->set_option("Invert Colors",&new_setting, RB_INT, no_yes, 2, NULL); if (new_setting != settings.invert_colors ) settings.invert_colors=new_setting; @@ -279,14 +279,14 @@ static void options_menu(void){ break; case 3: new_setting = settings.frameskip; - rb->set_option("Frameskip",&new_setting,INT, + rb->set_option("Frameskip",&new_setting, RB_INT, frameskip_items, 10, NULL); if (new_setting != settings.frameskip ) settings.frameskip=new_setting; break; case 4: new_setting = settings.sound; - rb->set_option("Sound",&new_setting,INT, + rb->set_option("Sound",&new_setting, RB_INT, no_yes, 2, NULL); if (new_setting != settings.sound ) settings.sound=new_setting; @@ -296,7 +296,7 @@ static void options_menu(void){ break; case 5: new_setting = 9 - settings.volume; - rb->set_option("Volume",&new_setting,INT, + rb->set_option("Volume",&new_setting, RB_INT, frameskip_items, 10, NULL); new_setting = 9 - new_setting; if (new_setting != settings.volume ) diff --git a/apps/settings.c b/apps/settings.c index 8cfd4afec3..b281646686 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -1201,7 +1201,7 @@ bool set_bool_options(const char* string, const bool* variable, }; bool result; - result = set_option(string, variable, BOOL, names, 2, + result = set_option(string, variable, RB_BOOL, names, 2, (void (*)(int))(void (*)(void))function); return result; } @@ -1286,13 +1286,13 @@ bool set_option(const char* string, const void* variable, enum optiontype type, item.lang_id = -1; item.cfg_vals = (char*)string; item.setting = &temp; - if (type == BOOL) + if (type == RB_BOOL) temp = *(bool*)variable? 1: 0; else temp = *(int*)variable; if (!option_screen(&item, NULL, false, NULL)) { - if (type == BOOL) + if (type == RB_BOOL) *(bool*)variable = (temp == 1); else diff --git a/apps/settings.h b/apps/settings.h index 66945e181b..13550ffd2a 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -261,7 +261,7 @@ void settings_apply(bool read_disk); void settings_apply_pm_range(void); void settings_display(void); -enum optiontype { INT, BOOL }; +enum optiontype { RB_INT, RB_BOOL }; const struct settings_list* find_setting(const void* variable); const struct settings_list* find_setting_by_cfgname(const char* name); |