1
0
Fork 0
forked from len0rd/rockbox

Settings: Rename INT/BOOL setting type enum to RB_INT/RB_BOOL

....Because INT and BOOL are already defined in mingw32.

Change-Id: I28ab8189c00002c8f68bc9d0c23d2ae78d9e33d0
This commit is contained in:
Solomon Peachy 2023-09-22 09:57:48 -04:00
parent cb3a6877fc
commit 8cc3266b2a
38 changed files with 115 additions and 115 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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)

View file

@ -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),

View file

@ -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,

View file

@ -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:

View file

@ -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 */

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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];

View file

@ -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 */

View file

@ -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;

View file

@ -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:

View file

@ -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())

View file

@ -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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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)",

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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:

View file

@ -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;

View file

@ -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

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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)

View file

@ -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;

View file

@ -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;

View file

@ -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)
{

View file

@ -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 )

View file

@ -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

View file

@ -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);