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); 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); system_memory_guard(mode);
return false; 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, int index = round_value_to_list32(cfg->mp3_enc.bitrate, rate_list,
n_rates, false); 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); items, n_rates, NULL);
index = round_value_to_list32(rate_list[index], mp3_enc_bitr, index = round_value_to_list32(rate_list[index], mp3_enc_bitr,
MP3_ENC_NUM_BITR, false); MP3_ENC_NUM_BITR, false);

View file

@ -91,7 +91,7 @@ static int recsource_func(void)
#endif #endif
return set_option(str(LANG_RECORDING_SOURCE), return set_option(str(LANG_RECORDING_SOURCE),
&global_settings.rec_source, INT, names, &global_settings.rec_source, RB_INT, names,
n_opts, NULL ); n_opts, NULL );
} }
MENUITEM_FUNCTION(recsource, 0, ID2P(LANG_RECORDING_SOURCE), MENUITEM_FUNCTION(recsource, 0, ID2P(LANG_RECORDING_SOURCE),
@ -171,7 +171,7 @@ static int recfrequency_func(void)
} }
ret = set_option(str(LANG_FREQUENCY), ret = set_option(str(LANG_FREQUENCY),
&rec_frequency, INT, opts, n_opts, NULL ); &rec_frequency, RB_INT, opts, n_opts, NULL );
if (!ret if (!ret
HAVE_SPDIF_REC_( && global_settings.rec_source != REC_SRC_SPDIF) 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); make_options_from_indexes(names, table, n_opts, opts);
ret = set_option(str(LANG_CHANNELS), &rec_channels, ret = set_option(str(LANG_CHANNELS), &rec_channels,
INT, opts, n_opts, NULL ); RB_INT, opts, n_opts, NULL );
if (!ret) if (!ret)
global_settings.rec_channels = table[rec_channels]; 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; int rec_mono_mode = global_settings.rec_mono_mode;
bool ret = set_option(str(LANG_RECORDING_MONO_MODE), &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) if (rec_mono_mode != global_settings.rec_mono_mode)
global_settings.rec_mono_mode = 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; 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 ); names, REC_NUM_FORMATS, NULL );
if (rec_format != global_settings.rec_format) if (rec_format != global_settings.rec_format)

View file

@ -135,7 +135,7 @@ static int alarm_setting(void)
#endif #endif
return set_option(str(LANG_ALARM_WAKEUP_SCREEN), return set_option(str(LANG_ALARM_WAKEUP_SCREEN),
&global_settings.alarm_wake_up_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), MENUITEM_FUNCTION(alarm_wake_up_screen, 0, ID2P(LANG_ALARM_WAKEUP_SCREEN),

View file

@ -383,7 +383,7 @@ static int settings_menu(void)
break; break;
case 1: case 1:
rb->set_option(rb->str(LANG_ANNOUNCE_ON), 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; break;
case 2: case 2:
rb->set_int(rb->str(LANG_GROUPING), "", 1, rb->set_int(rb->str(LANG_GROUPING), "", 1,

View file

@ -1565,7 +1565,7 @@ static int brickmania_menu(void)
brickmania_init_game(true); brickmania_init_game(true);
return 0; return 0;
case 2: case 2:
rb->set_option("Difficulty", &difficulty, INT, rb->set_option("Difficulty", &difficulty, RB_INT,
options, 2, NULL); options, 2, NULL);
break; break;
case 3: case 3:

View file

@ -911,7 +911,7 @@ static bool edit_memo(int change, struct shown *shown)
case 6: /* weekday */ case 6: /* weekday */
rb->set_option("First Day of Week", &info.first_wday, rb->set_option("First Day of Week", &info.first_wday,
INT, modes, 7, NULL); RB_INT, modes, 7, NULL);
break; break;
case 7: /* playback control */ case 7: /* playback control */

View file

@ -784,7 +784,7 @@ static int chopMenu(int menunum)
res = -1; res = -1;
break; break;
case 2: case 2:
rb->set_option("Level", &iLevelMode, INT, levels, 2, NULL); rb->set_option("Level", &iLevelMode, RB_INT, levels, 2, NULL);
break; break;
case 3: case 3:
playback_control(NULL); playback_control(NULL);

View file

@ -81,17 +81,17 @@ static void menu_analog_settings(void)
switch(result){ switch(result){
case 0: case 0:
rb->set_option("Show Date", &clock_settings.analog.show_date, rb->set_option("Show Date", &clock_settings.analog.show_date,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
case 1: case 1:
rb->set_option("Show Second Hand", rb->set_option("Show Second Hand",
&clock_settings.analog.show_seconds, &clock_settings.analog.show_seconds,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
case 2: case 2:
rb->set_option("Show Border", rb->set_option("Show Border",
&clock_settings.analog.show_border, &clock_settings.analog.show_border,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
} }
} }
@ -112,12 +112,12 @@ static void menu_digital_settings(void){
case 0: case 0:
rb->set_option("Show Seconds", rb->set_option("Show Seconds",
&clock_settings.digital.show_seconds, &clock_settings.digital.show_seconds,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
case 1: case 1:
rb->set_option("Blinking Colon", rb->set_option("Blinking Colon",
&clock_settings.digital.blinkcolon, &clock_settings.digital.blinkcolon,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
} }
} }
@ -129,7 +129,7 @@ static void menu_digital_settings(void){
static void confirm_reset(void){ static void confirm_reset(void){
int result=0; 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! */ if(result == 1){ /* reset! */
clock_settings_reset(&clock_settings); clock_settings_reset(&clock_settings);
@ -157,16 +157,16 @@ static void menu_general_settings(void){
case 0: case 0:
rb->set_option("Hour format", rb->set_option("Hour format",
&clock_settings.general.hour_format, &clock_settings.general.hour_format,
INT, hour_format_text, 2, NULL); RB_INT, hour_format_text, 2, NULL);
break; break;
case 1: case 1:
rb->set_option("Date format", rb->set_option("Date format",
&clock_settings.general.date_format, &clock_settings.general.date_format,
INT, date_format_text, 4, NULL); RB_INT, date_format_text, 4, NULL);
break; break;
case 2: case 2:
rb->set_option("Show Counter", &clock_settings.general.show_counter, rb->set_option("Show Counter", &clock_settings.general.show_counter,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
break; break;
case 3: case 3:
confirm_reset(); confirm_reset();
@ -180,7 +180,7 @@ static void menu_general_settings(void){
case 5: case 5:
rb->set_option("Save On Exit", rb->set_option("Save On Exit",
&clock_settings.general.save_settings, &clock_settings.general.save_settings,
BOOL, noyes_text, 2, NULL); RB_BOOL, noyes_text, 2, NULL);
/* if we no longer save on exit, /* if we no longer save on exit,
we better save now to remember that */ we better save now to remember that */
@ -190,14 +190,14 @@ static void menu_general_settings(void){
case 6: case 6:
rb->set_option("Backlight Settings", rb->set_option("Backlight Settings",
&clock_settings.general.backlight, &clock_settings.general.backlight,
INT, backlight_settings_text, 3, NULL); RB_INT, backlight_settings_text, 3, NULL);
apply_backlight_setting(clock_settings.general.backlight); apply_backlight_setting(clock_settings.general.backlight);
break; break;
case 7: case 7:
rb->set_option("Idle Poweroff (temporary)", rb->set_option("Idle Poweroff (temporary)",
&clock_settings.general.idle_poweroff, &clock_settings.general.idle_poweroff,
BOOL, idle_poweroff_text, 2, NULL); RB_BOOL, idle_poweroff_text, 2, NULL);
break; break;
} }
} }

View file

@ -201,7 +201,7 @@ static bool dice_menu(struct dices * dice) {
break; break;
case 2: case 2:
rb->set_option("Number of Sides", &sides_index, INT, rb->set_option("Number of Sides", &sides_index, RB_INT,
nb_sides_option, nb_sides_option,
sizeof(nb_sides_values)/sizeof(int), NULL); sizeof(nb_sides_values)/sizeof(int), NULL);
dice->nb_sides=nb_sides_values[sides_index]; dice->nb_sides=nb_sides_values[sides_index];

View file

@ -490,7 +490,7 @@ int Oset_keys()
else else
{ {
*keys[result]=translatekey(*keys[result]); *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]); *keys[result]=translatekey(*keys[result]);
} }
} }
@ -540,7 +540,7 @@ static bool Doptions()
if(result==0) if(result==0)
Oset_keys(); Oset_keys();
else if (result > 0) 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 else
menuquit=1; menuquit=1;
} }
@ -620,7 +620,7 @@ int doom_menu()
result = rb->do_menu(&menu, &selected, NULL, false); result = rb->do_menu(&menu, &selected, NULL, false);
switch (result) { switch (result) {
case 0: /* Game picker */ 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; break;
case 1: /* Addon picker */ case 1: /* Addon picker */

View file

@ -312,32 +312,32 @@ static void fireworks_menu(void)
break; break;
case 1: case 1:
rb->set_option("Auto-Fire", &autofire_delay, INT, rb->set_option("Auto-Fire", &autofire_delay, RB_INT,
autofire_delay_settings, 15, NULL); autofire_delay_settings, 15, NULL);
break; break;
case 2: case 2:
rb->set_option("Particles Per Firework", &particles_per_firework, rb->set_option("Particles Per Firework", &particles_per_firework,
INT, particle_settings, 8, NULL); RB_INT, particle_settings, 8, NULL);
break; break;
case 3: case 3:
rb->set_option("Particle Life", &particle_life, INT, rb->set_option("Particle Life", &particle_life, RB_INT,
particle_life_settings, 9, NULL); particle_life_settings, 9, NULL);
break; break;
case 4: case 4:
rb->set_option("Gravity", &gravity, INT, rb->set_option("Gravity", &gravity, RB_INT,
gravity_settings, 4, NULL); gravity_settings, 4, NULL);
break; break;
case 5: case 5:
rb->set_option("Show Rockets", &show_rockets, INT, rb->set_option("Show Rockets", &show_rockets, RB_INT,
rocket_settings, 3, NULL); rocket_settings, 3, NULL);
break; break;
case 6: 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); fps_settings, 9, NULL);
break; break;

View file

@ -230,7 +230,7 @@ static bool set_option_dithering(void)
[DITHER_DIFFUSION] = { STR(LANG_DIFFUSION) }, [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); dithering, DITHER_NUM_MODES, NULL);
return false; return false;
} }
@ -290,7 +290,7 @@ static int show_menu(void) /* return 1 to quit */
case MIID_RETURN: case MIID_RETURN:
break; break;
case MIID_TOGGLE_SS_MODE: 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); slideshow , 2, NULL);
break; break;
case MIID_CHANGE_SS_MODE: 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); jewels_init(bj);
return 0; return 0;
case 2: 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; break;
case 3: case 3:
if(jewels_help()) if(jewels_help())

View file

@ -478,7 +478,7 @@ static int filter_items(struct printcell_data_t *pc_data,
{"Exclude Any", -1}, {"Include", -1}, {"Exclude Any", -1}, {"Include", -1},
{"Include Case Sensitive", -1}, {"Include Any", -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)) find_types, 6, NULL))
{ {
return 0; return 0;

View file

@ -2288,7 +2288,7 @@ static bool lrc_display_menu(void)
usb = rb->set_bool("Wipe", &prefs.wipe); usb = rb->set_bool("Wipe", &prefs.wipe);
break; break;
case LRC_MENU_ALIGN: 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); align_names, 3, NULL);
break; break;
case LRC_MENU_LINE_MODE: case LRC_MENU_LINE_MODE:
@ -2345,7 +2345,7 @@ static bool lrc_lyrics_menu(void)
case LRC_MENU_ENCODING: case LRC_MENU_ENCODING:
prefs.encoding++; prefs.encoding++;
old_val = 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); cp_names, NUM_CODEPAGES+1, NULL);
if (prefs.encoding != old_val) if (prefs.encoding != old_val)
{ {

View file

@ -623,7 +623,7 @@ static int settings_menu(void)
break; break;
case 6: 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); HW_NUM_FREQ, NULL);
applysettings(); applysettings();
break; break;

View file

@ -1199,7 +1199,7 @@ static void display_options(void)
#if MPEG_OPTION_DITHERING_ENABLED #if MPEG_OPTION_DITHERING_ENABLED
case MPEG_OPTION_DITHERING: case MPEG_OPTION_DITHERING:
result = (settings.displayoptions & LCD_YUV_DITHER) ? 1 : 0; 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 =
(settings.displayoptions & ~LCD_YUV_DITHER) (settings.displayoptions & ~LCD_YUV_DITHER)
| ((result != 0) ? LCD_YUV_DITHER : 0); | ((result != 0) ? LCD_YUV_DITHER : 0);
@ -1208,17 +1208,17 @@ static void display_options(void)
#endif /* MPEG_OPTION_DITHERING_ENABLED */ #endif /* MPEG_OPTION_DITHERING_ENABLED */
case MPEG_OPTION_DISPLAY_FPS: 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); noyes, 2, NULL);
break; break;
case MPEG_OPTION_LIMIT_FPS: 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); noyes, 2, NULL);
break; break;
case MPEG_OPTION_SKIP_FRAMES: 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); noyes, 2, NULL);
break; break;
@ -1269,31 +1269,31 @@ static void audio_options(void)
switch (result) switch (result)
{ {
case MPEG_AUDIO_TONE_CONTROLS: 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); globaloff, 2, NULL);
sync_audio_setting(result, false); sync_audio_setting(result, false);
break; break;
case MPEG_AUDIO_CHANNEL_MODES: case MPEG_AUDIO_CHANNEL_MODES:
mpeg_set_option(rb->str(LANG_CHANNEL_CONFIGURATION), &settings.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); sync_audio_setting(result, false);
break; break;
case MPEG_AUDIO_CROSSFEED: 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); globaloff, 2, NULL);
sync_audio_setting(result, false); sync_audio_setting(result, false);
break; break;
case MPEG_AUDIO_EQUALIZER: 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); globaloff, 2, NULL);
sync_audio_setting(result, false); sync_audio_setting(result, false);
break; break;
case MPEG_AUDIO_DITHERING: 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); globaloff, 2, NULL);
sync_audio_setting(result, false); sync_audio_setting(result, false);
break; break;
@ -1322,7 +1322,7 @@ static void resume_options(void)
}; };
mpeg_set_option(rb->str(LANG_MENU_RESUME_OPTIONS), &settings.resume_options, 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) static void clear_resume_count(void)
@ -1369,7 +1369,7 @@ static void mpeg_settings(void)
case MPEG_SETTING_PLAY_MODE: case MPEG_SETTING_PLAY_MODE:
mpeg_set_option(rb->str(LANG_MENU_PLAY_MODE), &settings.play_mode, mpeg_set_option(rb->str(LANG_MENU_PLAY_MODE), &settings.play_mode,
INT, singleall, 2, NULL); RB_INT, singleall, 2, NULL);
break; break;
case MPEG_SETTING_CLEAR_RESUMES: case MPEG_SETTING_CLEAR_RESUMES:

View file

@ -266,7 +266,7 @@ static bool pacbox_menu(void)
{ {
case PBMI_DIFFICULTY: case PBMI_DIFFICULTY:
new_setting=settings.difficulty; new_setting=settings.difficulty;
rb->set_option("Difficulty", &new_setting, INT, rb->set_option("Difficulty", &new_setting, RB_INT,
difficulty_options , 2, NULL); difficulty_options , 2, NULL);
if (new_setting != settings.difficulty) { if (new_setting != settings.difficulty) {
settings.difficulty=new_setting; settings.difficulty=new_setting;
@ -275,7 +275,7 @@ static bool pacbox_menu(void)
break; break;
case PBMI_PACMEN_PER_GAME: case PBMI_PACMEN_PER_GAME:
new_setting=settings.numlives; 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); numlives_options , 4, NULL);
if (new_setting != settings.numlives) { if (new_setting != settings.numlives) {
settings.numlives=new_setting; settings.numlives=new_setting;
@ -284,7 +284,7 @@ static bool pacbox_menu(void)
break; break;
case PBMI_BONUS_LIFE: case PBMI_BONUS_LIFE:
new_setting=settings.bonus; 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); bonus_options , 4, NULL);
if (new_setting != settings.bonus) { if (new_setting != settings.bonus) {
settings.bonus=new_setting; settings.bonus=new_setting;
@ -293,7 +293,7 @@ static bool pacbox_menu(void)
break; break;
case PBMI_GHOST_NAMES: case PBMI_GHOST_NAMES:
new_setting=settings.ghostnames; 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); ghostname_options , 2, NULL);
if (new_setting != settings.ghostnames) { if (new_setting != settings.ghostnames) {
settings.ghostnames=new_setting; settings.ghostnames=new_setting;
@ -301,16 +301,16 @@ static bool pacbox_menu(void)
} }
break; break;
case PBMI_DISPLAY_FPS: case PBMI_DISPLAY_FPS:
rb->set_option("Display FPS",&settings.showfps,INT, rb->set_option("Display FPS",&settings.showfps, RB_INT,
noyes, 2, NULL); noyes, 2, NULL);
break; break;
case PBMI_SOUND: case PBMI_SOUND:
rb->set_option("Sound",&settings.sound, INT, rb->set_option("Sound",&settings.sound, RB_INT,
noyes, 2, NULL); noyes, 2, NULL);
break; break;
#ifdef AI #ifdef AI
case PBMI_AI: case PBMI_AI:
rb->set_option("AI",&settings.ai, INT, rb->set_option("AI",&settings.ai, RB_INT,
noyes, 2, NULL); noyes, 2, NULL);
break; break;
#endif #endif

View file

@ -3552,7 +3552,7 @@ static int settings_menu(void)
case 0: case 0:
old_val = pf_cfg.show_album_name; old_val = pf_cfg.show_album_name;
rb->set_option(rb->str(LANG_SHOW_ALBUM_TITLE), 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); adjust_album_display_for_setting(old_val, pf_cfg.show_album_name);
break; break;
case 1: case 1:
@ -3561,7 +3561,7 @@ static int settings_menu(void)
case 2: case 2:
old_val = pf_cfg.sort_albums_by; old_val = pf_cfg.sort_albums_by;
rb->set_option(rb->str(LANG_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 && if (old_val != pf_cfg.sort_albums_by &&
!sort_albums(pf_cfg.sort_albums_by, true)) !sort_albums(pf_cfg.sort_albums_by, true))
pf_cfg.sort_albums_by = old_val; pf_cfg.sort_albums_by = old_val;
@ -3569,7 +3569,7 @@ static int settings_menu(void)
case 3: case 3:
old_val = pf_cfg.year_sort_order; old_val = pf_cfg.year_sort_order;
rb->set_option(rb->str(LANG_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 && if (old_val != pf_cfg.year_sort_order &&
!sort_albums(pf_cfg.sort_albums_by, true)) !sort_albums(pf_cfg.sort_albums_by, true))
pf_cfg.year_sort_order = old_val; pf_cfg.year_sort_order = old_val;
@ -3635,11 +3635,11 @@ static int settings_menu(void)
break; break;
case 12: case 12:
rb->set_option(rb->str(LANG_WPS_INTEGRATION), 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; break;
case 13: case 13:
rb->set_option(rb->str(LANG_BACKLIGHT), 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; break;
case MENU_ATTACHED_USB: case MENU_ATTACHED_USB:

View file

@ -503,19 +503,19 @@ static bool main_menu(void)
rb->set_option( rb->set_option(
"Algorithm Pickiness (Lower -> more discriminating)", "Algorithm Pickiness (Lower -> more discriminating)",
&settings.yin_threshold, &settings.yin_threshold,
INT, yin_threshold_text, RB_INT, yin_threshold_text,
sizeof(yin_threshold_text) / sizeof(yin_threshold_text[0]), sizeof(yin_threshold_text) / sizeof(yin_threshold_text[0]),
NULL); NULL);
break; break;
case 5: case 5:
rb->set_option("Display Accidentals As", rb->set_option("Display Accidentals As",
&settings.use_sharps, &settings.use_sharps,
BOOL, accidental_text, 2, NULL); RB_BOOL, accidental_text, 2, NULL);
break; break;
case 6: case 6:
rb->set_option("Key Transposition", rb->set_option("Key Transposition",
&settings.key_transposition, &settings.key_transposition,
INT, transpose_text, 12, NULL); RB_INT, transpose_text, 12, NULL);
break; break;
case 7: case 7:
rb->set_bool("Display Frequency (Hz)", rb->set_bool("Display Frequency (Hz)",

View file

@ -400,7 +400,7 @@ static bool reversi_gui_choose_strategy(
} }
result = 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]; (*player) = strategy_values[index];
@ -450,7 +450,7 @@ static bool reversi_gui_menu(void) {
break; 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_settings, 3, NULL);
cursor_wrap_mode = cursor_wrap_mode_values[index]; cursor_wrap_mode = cursor_wrap_mode_values[index];
break; break;

View file

@ -437,39 +437,39 @@ static void do_opt_menu(void)
switch (result) switch (result)
{ {
case 0: /* Frameskip */ 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 ); sizeof(frameskip)/sizeof(*frameskip), NULL );
break; break;
case 1: /* Autosave */ 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; break;
case 2: /* Sound */ case 2: /* Sound */
if(options.sound>1) options.sound=1; 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(); if(options.sound) sound_dirty();
break; break;
case 3: /* Volume */ case 3: /* Volume */
rb->option_screen((struct settings_list*)vol, parentvp, false, "Volume"); rb->option_screen((struct settings_list*)vol, parentvp, false, "Volume");
break; break;
case 4: /* Stats */ 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; break;
case 5: /* Keys */ case 5: /* Keys */
setupkeys(); setupkeys();
break; break;
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
case 6: /* Screen Size */ 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 ); sizeof(scaling)/sizeof(*scaling), NULL );
setvidmode(); setvidmode();
break; break;
case 7: /* Screen rotate */ 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 ); sizeof(rotate)/sizeof(*rotate), NULL );
setvidmode(); setvidmode();
break; break;
case 8: /* Palette */ 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(); set_pal();
break; break;
#endif #endif

View file

@ -2869,7 +2869,7 @@ static void goto_menu(void)
case MAIN_MENU_BRUSH_SIZE: case MAIN_MENU_BRUSH_SIZE:
for(multi = 0; multi<4; multi++) for(multi = 0; multi<4; multi++)
if(bsize == times_list[multi]) break; 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 ) if( multi >= 0 )
bsize = times_list[multi]; bsize = times_list[multi];
break; break;
@ -2877,7 +2877,7 @@ static void goto_menu(void)
case MAIN_MENU_BRUSH_SPEED: case MAIN_MENU_BRUSH_SPEED:
for(multi = 0; multi<3; multi++) for(multi = 0; multi<3; multi++)
if(bspeed == times_list[multi]) break; 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 ) { if( multi >= 0 ) {
bspeed = times_list[multi]; bspeed = times_list[multi];
incdec_x.step[0] = bspeed; incdec_x.step[0] = bspeed;
@ -2894,7 +2894,7 @@ static void goto_menu(void)
case MAIN_MENU_GRID_SIZE: case MAIN_MENU_GRID_SIZE:
for(multi = 0; multi<4; multi++) for(multi = 0; multi<4; multi++)
if(gridsize == gridsize_list[multi]) break; 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 ) if( multi >= 0 )
gridsize = gridsize_list[multi]; gridsize = gridsize_list[multi];
break; break;

View file

@ -1599,7 +1599,7 @@ static void game_init(void)
speed = level*20; speed = level*20;
return; return;
case 1: case 1:
rb->set_option("Game Type", &game_type, INT, rb->set_option("Game Type", &game_type, RB_INT,
type_options, 2, NULL); type_options, 2, NULL);
break; break;
case 2: case 2:

View file

@ -1088,7 +1088,7 @@ static int solitaire_menu(bool in_game)
case 2: case 2:
if (rb->set_option("Draw Cards Option", &sol.draw_type, if (rb->set_option("Draw Cards Option", &sol.draw_type,
INT, drawcards, 2, NULL)) RB_INT, drawcards, 2, NULL))
result = MENU_USB; result = MENU_USB;
break; break;

View file

@ -867,7 +867,7 @@ static bool numdisplay_setting(void)
{"Coloured", -1}, {"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); sizeof(names) / sizeof(names[0]), NULL);
} }
#endif #endif
@ -880,7 +880,7 @@ static bool showmarkings_setting(void)
{"Show", -1}, {"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); sizeof(names) / sizeof(names[0]), NULL);
} }
#endif #endif

View file

@ -583,7 +583,7 @@ static int settings_menu(void)
}; };
static int sel=1; static int sel=1;
rb->set_option("Computer difficulty", &sel, rb->set_option("Computer difficulty", &sel,
INT, difficulty_options, 3, NULL); RB_INT, difficulty_options, 3, NULL);
superdom_settings.compdiff=sel+1; superdom_settings.compdiff=sel+1;
break; break;
} }

View file

@ -915,7 +915,7 @@ menu:
#ifdef HAVE_ADJUSTABLE_CPU_FREQ #ifdef HAVE_ADJUSTABLE_CPU_FREQ
if (result == BOOST) if (result == BOOST)
{ {
rb->set_option("Boosting", &boost, INT, rb->set_option("Boosting", &boost, RB_INT,
boost_settings, 2, NULL); boost_settings, 2, NULL);
goto menu; goto menu;
} }

View file

@ -252,7 +252,7 @@ static void play_tone(bool volume_set)
else else
#endif /* HAVE_VOLUME_IN_LIST */ #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); HW_NUM_FREQ, set_frequency);
(void)volume_set; (void)volume_set;
} }

View file

@ -46,7 +46,7 @@ static bool tv_horizontal_scroll_mode_setting(void)
{"Scroll by Column", -1}, {"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); names, 2, NULL);
} }
@ -75,7 +75,7 @@ static bool tv_vertical_scroll_mode_setting(void)
{"Scroll by Line", -1}, {"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); names, 2, NULL);
} }
@ -97,7 +97,7 @@ static bool tv_narrow_mode_setting(void)
{"Top/Bottom Page", -1}, {"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); names, 2, NULL);
} }
@ -138,7 +138,7 @@ static bool tv_encoding_setting(void)
names[idx].voice_id = -1; 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); sizeof(names) / sizeof(names[0]), NULL);
} }
@ -149,7 +149,7 @@ static bool tv_word_wrap_setting(void)
{"Off (Chop Words)", -1}, {"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); names, 2, NULL);
} }
@ -162,7 +162,7 @@ static bool tv_line_mode_setting(void)
{"Reflow Lines", -1}, {"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); sizeof(names) / sizeof(names[0]), NULL);
} }
@ -179,7 +179,7 @@ static bool tv_alignment_setting(void)
{"Right", -1}, {"Right", -1},
}; };
return rb->set_option("Alignment", &new_prefs.alignment, INT, return rb->set_option("Alignment", &new_prefs.alignment, RB_INT,
names , 2, NULL); names , 2, NULL);
} }

View file

@ -589,7 +589,7 @@ static bool option_menu(void)
{ {
struct remove_setting *setting = &remove_list[result]; struct remove_setting *setting = &remove_list[result];
int prev_option = setting->option; 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)) remove_names, NUM_REMOVE_OPTION, NULL))
return true; return true;
if (prev_option != setting->option) 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)) switch(rb->do_menu(&menu, &selection, NULL, false))
{ {
case 0: 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); meter_type_option, 2, NULL);
break; break;
@ -701,12 +701,12 @@ static bool vu_meter_menu(void)
case 3: case 3:
if(vumeter_settings.meter_type==ANALOG) 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); decay_speed_option, 7, NULL);
} }
else 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); decay_speed_option, 7, NULL);
} }
break; break;

View file

@ -2562,24 +2562,24 @@ enum plugin_status plugin_start(const void* parameter)
case 3: case 3:
switch(players) { switch(players) {
case 0: 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); nokey_option, 1, NULL);
break; break;
case 1: 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); key24_option, 2, NULL);
break; break;
case 2: case 2:
#ifdef REMOTE #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); remote_option, 2, NULL);
#else #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); key2_option, 1, NULL);
#endif #endif
break; break;
case 3: 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); remoteonly_option, 1, NULL);
break; break;
} }
@ -2608,7 +2608,7 @@ enum plugin_status plugin_start(const void* parameter)
break; break;
case 9: case 9:
new_setting = 0; 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) if (new_setting == 1)
default_settings(); default_settings();
break; break;

View file

@ -206,7 +206,7 @@ static void do_video_settings(struct System* sys)
#else #else
case 2: case 2:
#endif #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 #ifdef HAVE_LCD_COLOR
3 3
#else #else
@ -225,7 +225,7 @@ static void do_video_settings(struct System* sys)
#else #else
case 3: case 3:
#endif #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 && if(sys->settings.rotation_option &&
sys->settings.zoom) sys->settings.zoom)
{ {

View file

@ -257,21 +257,21 @@ static void options_menu(void){
{ {
case 0: case 0:
new_setting=settings.kempston; 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); no_yes, 2, NULL);
if (new_setting != settings.kempston ) if (new_setting != settings.kempston )
settings.kempston=new_setting; settings.kempston=new_setting;
break; break;
case 1: case 1:
new_setting = settings.showfps; 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); no_yes, 2, NULL);
if (new_setting != settings.showfps ) if (new_setting != settings.showfps )
settings.showfps=new_setting; settings.showfps=new_setting;
break; break;
case 2: case 2:
new_setting = settings.invert_colors; 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); no_yes, 2, NULL);
if (new_setting != settings.invert_colors ) if (new_setting != settings.invert_colors )
settings.invert_colors=new_setting; settings.invert_colors=new_setting;
@ -279,14 +279,14 @@ static void options_menu(void){
break; break;
case 3: case 3:
new_setting = settings.frameskip; new_setting = settings.frameskip;
rb->set_option("Frameskip",&new_setting,INT, rb->set_option("Frameskip",&new_setting, RB_INT,
frameskip_items, 10, NULL); frameskip_items, 10, NULL);
if (new_setting != settings.frameskip ) if (new_setting != settings.frameskip )
settings.frameskip=new_setting; settings.frameskip=new_setting;
break; break;
case 4: case 4:
new_setting = settings.sound; new_setting = settings.sound;
rb->set_option("Sound",&new_setting,INT, rb->set_option("Sound",&new_setting, RB_INT,
no_yes, 2, NULL); no_yes, 2, NULL);
if (new_setting != settings.sound ) if (new_setting != settings.sound )
settings.sound=new_setting; settings.sound=new_setting;
@ -296,7 +296,7 @@ static void options_menu(void){
break; break;
case 5: case 5:
new_setting = 9 - settings.volume; new_setting = 9 - settings.volume;
rb->set_option("Volume",&new_setting,INT, rb->set_option("Volume",&new_setting, RB_INT,
frameskip_items, 10, NULL); frameskip_items, 10, NULL);
new_setting = 9 - new_setting; new_setting = 9 - new_setting;
if (new_setting != settings.volume ) if (new_setting != settings.volume )

View file

@ -1201,7 +1201,7 @@ bool set_bool_options(const char* string, const bool* variable,
}; };
bool result; bool result;
result = set_option(string, variable, BOOL, names, 2, result = set_option(string, variable, RB_BOOL, names, 2,
(void (*)(int))(void (*)(void))function); (void (*)(int))(void (*)(void))function);
return result; return result;
} }
@ -1286,13 +1286,13 @@ bool set_option(const char* string, const void* variable, enum optiontype type,
item.lang_id = -1; item.lang_id = -1;
item.cfg_vals = (char*)string; item.cfg_vals = (char*)string;
item.setting = &temp; item.setting = &temp;
if (type == BOOL) if (type == RB_BOOL)
temp = *(bool*)variable? 1: 0; temp = *(bool*)variable? 1: 0;
else else
temp = *(int*)variable; temp = *(int*)variable;
if (!option_screen(&item, NULL, false, NULL)) if (!option_screen(&item, NULL, false, NULL))
{ {
if (type == BOOL) if (type == RB_BOOL)
*(bool*)variable = (temp == 1); *(bool*)variable = (temp == 1);
else else

View file

@ -261,7 +261,7 @@ void settings_apply(bool read_disk);
void settings_apply_pm_range(void); void settings_apply_pm_range(void);
void settings_display(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(const void* variable);
const struct settings_list* find_setting_by_cfgname(const char* name); const struct settings_list* find_setting_by_cfgname(const char* name);