A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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

Change-Id: I28ab8189c00002c8f68bc9d0c23d2ae78d9e33d0

+115 -115
+1 -1
apps/debug_menu.c
··· 2216 2216 }; 2217 2217 int mode = system_memory_guard(MEMGUARD_KEEP); 2218 2218 2219 - set_option( "Catch mem accesses", &mode, INT, names, MAXMEMGUARD, NULL); 2219 + set_option( "Catch mem accesses", &mode, RB_INT, names, MAXMEMGUARD, NULL); 2220 2220 system_memory_guard(mode); 2221 2221 2222 2222 return false;
+1 -1
apps/enc_config.c
··· 183 183 184 184 int index = round_value_to_list32(cfg->mp3_enc.bitrate, rate_list, 185 185 n_rates, false); 186 - bool res = set_option(str(LANG_BITRATE), &index, INT, 186 + bool res = set_option(str(LANG_BITRATE), &index, RB_INT, 187 187 items, n_rates, NULL); 188 188 index = round_value_to_list32(rate_list[index], mp3_enc_bitr, 189 189 MP3_ENC_NUM_BITR, false);
+5 -5
apps/menus/recording_menu.c
··· 91 91 #endif 92 92 93 93 return set_option(str(LANG_RECORDING_SOURCE), 94 - &global_settings.rec_source, INT, names, 94 + &global_settings.rec_source, RB_INT, names, 95 95 n_opts, NULL ); 96 96 } 97 97 MENUITEM_FUNCTION(recsource, 0, ID2P(LANG_RECORDING_SOURCE), ··· 171 171 } 172 172 173 173 ret = set_option(str(LANG_FREQUENCY), 174 - &rec_frequency, INT, opts, n_opts, NULL ); 174 + &rec_frequency, RB_INT, opts, n_opts, NULL ); 175 175 176 176 if (!ret 177 177 HAVE_SPDIF_REC_( && global_settings.rec_source != REC_SRC_SPDIF) ··· 221 221 make_options_from_indexes(names, table, n_opts, opts); 222 222 223 223 ret = set_option(str(LANG_CHANNELS), &rec_channels, 224 - INT, opts, n_opts, NULL ); 224 + RB_INT, opts, n_opts, NULL ); 225 225 226 226 if (!ret) 227 227 global_settings.rec_channels = table[rec_channels]; ··· 241 241 242 242 int rec_mono_mode = global_settings.rec_mono_mode; 243 243 bool ret = set_option(str(LANG_RECORDING_MONO_MODE), &rec_mono_mode, 244 - INT, names, 3, NULL ); 244 + RB_INT, names, 3, NULL ); 245 245 246 246 if (rec_mono_mode != global_settings.rec_mono_mode) 247 247 global_settings.rec_mono_mode = rec_mono_mode; ··· 261 261 }; 262 262 263 263 int rec_format = global_settings.rec_format; 264 - bool res = set_option(str(LANG_FORMAT), &rec_format, INT, 264 + bool res = set_option(str(LANG_FORMAT), &rec_format, RB_INT, 265 265 names, REC_NUM_FORMATS, NULL ); 266 266 267 267 if (rec_format != global_settings.rec_format)
+1 -1
apps/menus/time_menu.c
··· 135 135 #endif 136 136 return set_option(str(LANG_ALARM_WAKEUP_SCREEN), 137 137 &global_settings.alarm_wake_up_screen, 138 - INT, items, i, NULL); 138 + RB_INT, items, i, NULL); 139 139 } 140 140 141 141 MENUITEM_FUNCTION(alarm_wake_up_screen, 0, ID2P(LANG_ALARM_WAKEUP_SCREEN),
+1 -1
apps/plugins/announce_status.c
··· 383 383 break; 384 384 case 1: 385 385 rb->set_option(rb->str(LANG_ANNOUNCE_ON), 386 - &gAnnounce.announce_on, INT, announce_options, 2, NULL); 386 + &gAnnounce.announce_on, RB_INT, announce_options, 2, NULL); 387 387 break; 388 388 case 2: 389 389 rb->set_int(rb->str(LANG_GROUPING), "", 1,
+1 -1
apps/plugins/brickmania.c
··· 1565 1565 brickmania_init_game(true); 1566 1566 return 0; 1567 1567 case 2: 1568 - rb->set_option("Difficulty", &difficulty, INT, 1568 + rb->set_option("Difficulty", &difficulty, RB_INT, 1569 1569 options, 2, NULL); 1570 1570 break; 1571 1571 case 3:
+1 -1
apps/plugins/calendar.c
··· 911 911 912 912 case 6: /* weekday */ 913 913 rb->set_option("First Day of Week", &info.first_wday, 914 - INT, modes, 7, NULL); 914 + RB_INT, modes, 7, NULL); 915 915 break; 916 916 917 917 case 7: /* playback control */
+1 -1
apps/plugins/chopper.c
··· 784 784 res = -1; 785 785 break; 786 786 case 2: 787 - rb->set_option("Level", &iLevelMode, INT, levels, 2, NULL); 787 + rb->set_option("Level", &iLevelMode, RB_INT, levels, 2, NULL); 788 788 break; 789 789 case 3: 790 790 playback_control(NULL);
+12 -12
apps/plugins/clock/clock_menu.c
··· 81 81 switch(result){ 82 82 case 0: 83 83 rb->set_option("Show Date", &clock_settings.analog.show_date, 84 - BOOL, noyes_text, 2, NULL); 84 + RB_BOOL, noyes_text, 2, NULL); 85 85 break; 86 86 case 1: 87 87 rb->set_option("Show Second Hand", 88 88 &clock_settings.analog.show_seconds, 89 - BOOL, noyes_text, 2, NULL); 89 + RB_BOOL, noyes_text, 2, NULL); 90 90 break; 91 91 case 2: 92 92 rb->set_option("Show Border", 93 93 &clock_settings.analog.show_border, 94 - BOOL, noyes_text, 2, NULL); 94 + RB_BOOL, noyes_text, 2, NULL); 95 95 break; 96 96 } 97 97 } ··· 112 112 case 0: 113 113 rb->set_option("Show Seconds", 114 114 &clock_settings.digital.show_seconds, 115 - BOOL, noyes_text, 2, NULL); 115 + RB_BOOL, noyes_text, 2, NULL); 116 116 break; 117 117 case 1: 118 118 rb->set_option("Blinking Colon", 119 119 &clock_settings.digital.blinkcolon, 120 - BOOL, noyes_text, 2, NULL); 120 + RB_BOOL, noyes_text, 2, NULL); 121 121 break; 122 122 } 123 123 } ··· 129 129 static void confirm_reset(void){ 130 130 int result=0; 131 131 132 - rb->set_option("Reset all settings?", &result, INT, noyes_text, 2, NULL); 132 + rb->set_option("Reset all settings?", &result, RB_INT, noyes_text, 2, NULL); 133 133 134 134 if(result == 1){ /* reset! */ 135 135 clock_settings_reset(&clock_settings); ··· 157 157 case 0: 158 158 rb->set_option("Hour format", 159 159 &clock_settings.general.hour_format, 160 - INT, hour_format_text, 2, NULL); 160 + RB_INT, hour_format_text, 2, NULL); 161 161 break; 162 162 case 1: 163 163 rb->set_option("Date format", 164 164 &clock_settings.general.date_format, 165 - INT, date_format_text, 4, NULL); 165 + RB_INT, date_format_text, 4, NULL); 166 166 break; 167 167 case 2: 168 168 rb->set_option("Show Counter", &clock_settings.general.show_counter, 169 - BOOL, noyes_text, 2, NULL); 169 + RB_BOOL, noyes_text, 2, NULL); 170 170 break; 171 171 case 3: 172 172 confirm_reset(); ··· 180 180 case 5: 181 181 rb->set_option("Save On Exit", 182 182 &clock_settings.general.save_settings, 183 - BOOL, noyes_text, 2, NULL); 183 + RB_BOOL, noyes_text, 2, NULL); 184 184 185 185 /* if we no longer save on exit, 186 186 we better save now to remember that */ ··· 190 190 case 6: 191 191 rb->set_option("Backlight Settings", 192 192 &clock_settings.general.backlight, 193 - INT, backlight_settings_text, 3, NULL); 193 + RB_INT, backlight_settings_text, 3, NULL); 194 194 apply_backlight_setting(clock_settings.general.backlight); 195 195 break; 196 196 197 197 case 7: 198 198 rb->set_option("Idle Poweroff (temporary)", 199 199 &clock_settings.general.idle_poweroff, 200 - BOOL, idle_poweroff_text, 2, NULL); 200 + RB_BOOL, idle_poweroff_text, 2, NULL); 201 201 break; 202 202 } 203 203 }
+1 -1
apps/plugins/dice.c
··· 201 201 break; 202 202 203 203 case 2: 204 - rb->set_option("Number of Sides", &sides_index, INT, 204 + rb->set_option("Number of Sides", &sides_index, RB_INT, 205 205 nb_sides_option, 206 206 sizeof(nb_sides_values)/sizeof(int), NULL); 207 207 dice->nb_sides=nb_sides_values[sides_index];
+3 -3
apps/plugins/doom/rockdoom.c
··· 490 490 else 491 491 { 492 492 *keys[result]=translatekey(*keys[result]); 493 - rb->set_option(menu_[result], keys[result], INT, doomkeys, numdoomkeys, NULL ); 493 + rb->set_option(menu_[result], keys[result], RB_INT, doomkeys, numdoomkeys, NULL ); 494 494 *keys[result]=translatekey(*keys[result]); 495 495 } 496 496 } ··· 540 540 if(result==0) 541 541 Oset_keys(); 542 542 else if (result > 0) 543 - rb->set_option(menu_[result], options[result-1], INT, onoff, 2, NULL ); 543 + rb->set_option(menu_[result], options[result-1], RB_INT, onoff, 2, NULL ); 544 544 else 545 545 menuquit=1; 546 546 } ··· 620 620 result = rb->do_menu(&menu, &selected, NULL, false); 621 621 switch (result) { 622 622 case 0: /* Game picker */ 623 - rb->set_option("Game WAD", &gamever, INT, names, status, NULL ); 623 + rb->set_option("Game WAD", &gamever, RB_INT, names, status, NULL ); 624 624 break; 625 625 626 626 case 1: /* Addon picker */
+6 -6
apps/plugins/fireworks.c
··· 312 312 break; 313 313 314 314 case 1: 315 - rb->set_option("Auto-Fire", &autofire_delay, INT, 315 + rb->set_option("Auto-Fire", &autofire_delay, RB_INT, 316 316 autofire_delay_settings, 15, NULL); 317 317 break; 318 318 319 319 case 2: 320 320 rb->set_option("Particles Per Firework", &particles_per_firework, 321 - INT, particle_settings, 8, NULL); 321 + RB_INT, particle_settings, 8, NULL); 322 322 break; 323 323 324 324 case 3: 325 - rb->set_option("Particle Life", &particle_life, INT, 325 + rb->set_option("Particle Life", &particle_life, RB_INT, 326 326 particle_life_settings, 9, NULL); 327 327 break; 328 328 329 329 case 4: 330 - rb->set_option("Gravity", &gravity, INT, 330 + rb->set_option("Gravity", &gravity, RB_INT, 331 331 gravity_settings, 4, NULL); 332 332 break; 333 333 334 334 case 5: 335 - rb->set_option("Show Rockets", &show_rockets, INT, 335 + rb->set_option("Show Rockets", &show_rockets, RB_INT, 336 336 rocket_settings, 3, NULL); 337 337 break; 338 338 339 339 case 6: 340 - rb->set_option("FPS (Speed)", &frames_per_second, INT, 340 + rb->set_option("FPS (Speed)", &frames_per_second, RB_INT, 341 341 fps_settings, 9, NULL); 342 342 break; 343 343
+2 -2
apps/plugins/imageviewer/imageviewer.c
··· 230 230 [DITHER_DIFFUSION] = { STR(LANG_DIFFUSION) }, 231 231 }; 232 232 233 - rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, INT, 233 + rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, RB_INT, 234 234 dithering, DITHER_NUM_MODES, NULL); 235 235 return false; 236 236 } ··· 290 290 case MIID_RETURN: 291 291 break; 292 292 case MIID_TOGGLE_SS_MODE: 293 - rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, BOOL, 293 + rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, RB_BOOL, 294 294 slideshow , 2, NULL); 295 295 break; 296 296 case MIID_CHANGE_SS_MODE:
+1 -1
apps/plugins/jewels.c
··· 1481 1481 jewels_init(bj); 1482 1482 return 0; 1483 1483 case 2: 1484 - rb->set_option("Mode", &bj->tmp_type, INT, mode, 2, NULL); 1484 + rb->set_option("Mode", &bj->tmp_type, RB_INT, mode, 2, NULL); 1485 1485 break; 1486 1486 case 3: 1487 1487 if(jewels_help())
+1 -1
apps/plugins/lastfm_scrobbler_viewer.c
··· 478 478 {"Exclude Any", -1}, {"Include", -1}, 479 479 {"Include Case Sensitive", -1}, {"Include Any", -1} 480 480 }; 481 - if (rb->set_option("Find Type", &option, INT, 481 + if (rb->set_option("Find Type", &option, RB_INT, 482 482 find_types, 6, NULL)) 483 483 { 484 484 return 0;
+2 -2
apps/plugins/lrcplayer.c
··· 2288 2288 usb = rb->set_bool("Wipe", &prefs.wipe); 2289 2289 break; 2290 2290 case LRC_MENU_ALIGN: 2291 - usb = rb->set_option("Alignment", &prefs.align, INT, 2291 + usb = rb->set_option("Alignment", &prefs.align, RB_INT, 2292 2292 align_names, 3, NULL); 2293 2293 break; 2294 2294 case LRC_MENU_LINE_MODE: ··· 2345 2345 case LRC_MENU_ENCODING: 2346 2346 prefs.encoding++; 2347 2347 old_val = prefs.encoding; 2348 - usb = rb->set_option("Encoding", &prefs.encoding, INT, 2348 + usb = rb->set_option("Encoding", &prefs.encoding, RB_INT, 2349 2349 cp_names, NUM_CODEPAGES+1, NULL); 2350 2350 if (prefs.encoding != old_val) 2351 2351 {
+1 -1
apps/plugins/mikmod/mikmod.c
··· 623 623 break; 624 624 625 625 case 6: 626 - rb->set_option(rb->str(LANG_MIKMOD_SAMPLERATE), &(settings.sample_rate), INT, sr_names, 626 + rb->set_option(rb->str(LANG_MIKMOD_SAMPLERATE), &(settings.sample_rate), RB_INT, sr_names, 627 627 HW_NUM_FREQ, NULL); 628 628 applysettings(); 629 629 break;
+11 -11
apps/plugins/mpegplayer/mpeg_settings.c
··· 1199 1199 #if MPEG_OPTION_DITHERING_ENABLED 1200 1200 case MPEG_OPTION_DITHERING: 1201 1201 result = (settings.displayoptions & LCD_YUV_DITHER) ? 1 : 0; 1202 - mpeg_set_option(rb->str(LANG_DITHERING), &result, INT, noyes, 2, NULL); 1202 + mpeg_set_option(rb->str(LANG_DITHERING), &result, RB_INT, noyes, 2, NULL); 1203 1203 settings.displayoptions = 1204 1204 (settings.displayoptions & ~LCD_YUV_DITHER) 1205 1205 | ((result != 0) ? LCD_YUV_DITHER : 0); ··· 1208 1208 #endif /* MPEG_OPTION_DITHERING_ENABLED */ 1209 1209 1210 1210 case MPEG_OPTION_DISPLAY_FPS: 1211 - mpeg_set_option(rb->str(LANG_DISPLAY_FPS), &settings.showfps, INT, 1211 + mpeg_set_option(rb->str(LANG_DISPLAY_FPS), &settings.showfps, RB_INT, 1212 1212 noyes, 2, NULL); 1213 1213 break; 1214 1214 1215 1215 case MPEG_OPTION_LIMIT_FPS: 1216 - mpeg_set_option(rb->str(LANG_LIMIT_FPS), &settings.limitfps, INT, 1216 + mpeg_set_option(rb->str(LANG_LIMIT_FPS), &settings.limitfps, RB_INT, 1217 1217 noyes, 2, NULL); 1218 1218 break; 1219 1219 1220 1220 case MPEG_OPTION_SKIP_FRAMES: 1221 - mpeg_set_option(rb->str(LANG_SKIP_FRAMES), &settings.skipframes, INT, 1221 + mpeg_set_option(rb->str(LANG_SKIP_FRAMES), &settings.skipframes, RB_INT, 1222 1222 noyes, 2, NULL); 1223 1223 break; 1224 1224 ··· 1269 1269 switch (result) 1270 1270 { 1271 1271 case MPEG_AUDIO_TONE_CONTROLS: 1272 - mpeg_set_option(rb->str(LANG_TONE_CONTROLS), &settings.tone_controls, INT, 1272 + mpeg_set_option(rb->str(LANG_TONE_CONTROLS), &settings.tone_controls, RB_INT, 1273 1273 globaloff, 2, NULL); 1274 1274 sync_audio_setting(result, false); 1275 1275 break; 1276 1276 1277 1277 case MPEG_AUDIO_CHANNEL_MODES: 1278 1278 mpeg_set_option(rb->str(LANG_CHANNEL_CONFIGURATION), &settings.channel_modes, 1279 - INT, globaloff, 2, NULL); 1279 + RB_INT, globaloff, 2, NULL); 1280 1280 sync_audio_setting(result, false); 1281 1281 break; 1282 1282 1283 1283 case MPEG_AUDIO_CROSSFEED: 1284 - mpeg_set_option(rb->str(LANG_CROSSFEED), &settings.crossfeed, INT, 1284 + mpeg_set_option(rb->str(LANG_CROSSFEED), &settings.crossfeed, RB_INT, 1285 1285 globaloff, 2, NULL); 1286 1286 sync_audio_setting(result, false); 1287 1287 break; 1288 1288 1289 1289 case MPEG_AUDIO_EQUALIZER: 1290 - mpeg_set_option(rb->str(LANG_EQUALIZER), &settings.equalizer, INT, 1290 + mpeg_set_option(rb->str(LANG_EQUALIZER), &settings.equalizer, RB_INT, 1291 1291 globaloff, 2, NULL); 1292 1292 sync_audio_setting(result, false); 1293 1293 break; 1294 1294 1295 1295 case MPEG_AUDIO_DITHERING: 1296 - mpeg_set_option(rb->str(LANG_DITHERING), &settings.dithering, INT, 1296 + mpeg_set_option(rb->str(LANG_DITHERING), &settings.dithering, RB_INT, 1297 1297 globaloff, 2, NULL); 1298 1298 sync_audio_setting(result, false); 1299 1299 break; ··· 1322 1322 }; 1323 1323 1324 1324 mpeg_set_option(rb->str(LANG_MENU_RESUME_OPTIONS), &settings.resume_options, 1325 - INT, items, MPEG_RESUME_NUM_OPTIONS, NULL); 1325 + RB_INT, items, MPEG_RESUME_NUM_OPTIONS, NULL); 1326 1326 } 1327 1327 1328 1328 static void clear_resume_count(void) ··· 1369 1369 1370 1370 case MPEG_SETTING_PLAY_MODE: 1371 1371 mpeg_set_option(rb->str(LANG_MENU_PLAY_MODE), &settings.play_mode, 1372 - INT, singleall, 2, NULL); 1372 + RB_INT, singleall, 2, NULL); 1373 1373 break; 1374 1374 1375 1375 case MPEG_SETTING_CLEAR_RESUMES:
+7 -7
apps/plugins/pacbox/pacbox.c
··· 266 266 { 267 267 case PBMI_DIFFICULTY: 268 268 new_setting=settings.difficulty; 269 - rb->set_option("Difficulty", &new_setting, INT, 269 + rb->set_option("Difficulty", &new_setting, RB_INT, 270 270 difficulty_options , 2, NULL); 271 271 if (new_setting != settings.difficulty) { 272 272 settings.difficulty=new_setting; ··· 275 275 break; 276 276 case PBMI_PACMEN_PER_GAME: 277 277 new_setting=settings.numlives; 278 - rb->set_option("Pacmen Per Game", &new_setting, INT, 278 + rb->set_option("Pacmen Per Game", &new_setting, RB_INT, 279 279 numlives_options , 4, NULL); 280 280 if (new_setting != settings.numlives) { 281 281 settings.numlives=new_setting; ··· 284 284 break; 285 285 case PBMI_BONUS_LIFE: 286 286 new_setting=settings.bonus; 287 - rb->set_option("Bonus Life", &new_setting, INT, 287 + rb->set_option("Bonus Life", &new_setting, RB_INT, 288 288 bonus_options , 4, NULL); 289 289 if (new_setting != settings.bonus) { 290 290 settings.bonus=new_setting; ··· 293 293 break; 294 294 case PBMI_GHOST_NAMES: 295 295 new_setting=settings.ghostnames; 296 - rb->set_option("Ghost Names", &new_setting, INT, 296 + rb->set_option("Ghost Names", &new_setting, RB_INT, 297 297 ghostname_options , 2, NULL); 298 298 if (new_setting != settings.ghostnames) { 299 299 settings.ghostnames=new_setting; ··· 301 301 } 302 302 break; 303 303 case PBMI_DISPLAY_FPS: 304 - rb->set_option("Display FPS",&settings.showfps,INT, 304 + rb->set_option("Display FPS",&settings.showfps, RB_INT, 305 305 noyes, 2, NULL); 306 306 break; 307 307 case PBMI_SOUND: 308 - rb->set_option("Sound",&settings.sound, INT, 308 + rb->set_option("Sound",&settings.sound, RB_INT, 309 309 noyes, 2, NULL); 310 310 break; 311 311 #ifdef AI 312 312 case PBMI_AI: 313 - rb->set_option("AI",&settings.ai, INT, 313 + rb->set_option("AI",&settings.ai, RB_INT, 314 314 noyes, 2, NULL); 315 315 break; 316 316 #endif
+5 -5
apps/plugins/pictureflow/pictureflow.c
··· 3552 3552 case 0: 3553 3553 old_val = pf_cfg.show_album_name; 3554 3554 rb->set_option(rb->str(LANG_SHOW_ALBUM_TITLE), 3555 - &pf_cfg.show_album_name, INT, album_name_options, 5, NULL); 3555 + &pf_cfg.show_album_name, RB_INT, album_name_options, 5, NULL); 3556 3556 adjust_album_display_for_setting(old_val, pf_cfg.show_album_name); 3557 3557 break; 3558 3558 case 1: ··· 3561 3561 case 2: 3562 3562 old_val = pf_cfg.sort_albums_by; 3563 3563 rb->set_option(rb->str(LANG_SORT_ALBUMS_BY), 3564 - &pf_cfg.sort_albums_by, INT, sort_options, 4, NULL); 3564 + &pf_cfg.sort_albums_by, RB_INT, sort_options, 4, NULL); 3565 3565 if (old_val != pf_cfg.sort_albums_by && 3566 3566 !sort_albums(pf_cfg.sort_albums_by, true)) 3567 3567 pf_cfg.sort_albums_by = old_val; ··· 3569 3569 case 3: 3570 3570 old_val = pf_cfg.year_sort_order; 3571 3571 rb->set_option(rb->str(LANG_YEAR_SORT_ORDER), 3572 - &pf_cfg.year_sort_order, INT, year_sort_order_options, 2, NULL); 3572 + &pf_cfg.year_sort_order, RB_INT, year_sort_order_options, 2, NULL); 3573 3573 if (old_val != pf_cfg.year_sort_order && 3574 3574 !sort_albums(pf_cfg.sort_albums_by, true)) 3575 3575 pf_cfg.year_sort_order = old_val; ··· 3635 3635 break; 3636 3636 case 12: 3637 3637 rb->set_option(rb->str(LANG_WPS_INTEGRATION), 3638 - &pf_cfg.auto_wps, INT, wps_options, 3, NULL); 3638 + &pf_cfg.auto_wps, RB_INT, wps_options, 3, NULL); 3639 3639 break; 3640 3640 case 13: 3641 3641 rb->set_option(rb->str(LANG_BACKLIGHT), 3642 - &pf_cfg.backlight_mode, INT, backlight_options, 2, NULL); 3642 + &pf_cfg.backlight_mode, RB_INT, backlight_options, 2, NULL); 3643 3643 break; 3644 3644 3645 3645 case MENU_ATTACHED_USB:
+3 -3
apps/plugins/pitch_detector.c
··· 503 503 rb->set_option( 504 504 "Algorithm Pickiness (Lower -> more discriminating)", 505 505 &settings.yin_threshold, 506 - INT, yin_threshold_text, 506 + RB_INT, yin_threshold_text, 507 507 sizeof(yin_threshold_text) / sizeof(yin_threshold_text[0]), 508 508 NULL); 509 509 break; 510 510 case 5: 511 511 rb->set_option("Display Accidentals As", 512 512 &settings.use_sharps, 513 - BOOL, accidental_text, 2, NULL); 513 + RB_BOOL, accidental_text, 2, NULL); 514 514 break; 515 515 case 6: 516 516 rb->set_option("Key Transposition", 517 517 &settings.key_transposition, 518 - INT, transpose_text, 12, NULL); 518 + RB_INT, transpose_text, 12, NULL); 519 519 break; 520 520 case 7: 521 521 rb->set_bool("Display Frequency (Hz)",
+2 -2
apps/plugins/reversi/reversi-gui.c
··· 400 400 } 401 401 402 402 result = 403 - rb->set_option(prompt, &index, INT, strategy_settings, num_items, NULL); 403 + rb->set_option(prompt, &index, RB_INT, strategy_settings, num_items, NULL); 404 404 405 405 (*player) = strategy_values[index]; 406 406 ··· 450 450 break; 451 451 } 452 452 } 453 - rb->set_option(MENU_TEXT_WRAP_MODE, &index, INT, 453 + rb->set_option(MENU_TEXT_WRAP_MODE, &index, RB_INT, 454 454 cursor_wrap_mode_settings, 3, NULL); 455 455 cursor_wrap_mode = cursor_wrap_mode_values[index]; 456 456 break;
+7 -7
apps/plugins/rockboy/menu.c
··· 437 437 switch (result) 438 438 { 439 439 case 0: /* Frameskip */ 440 - rb->set_option("Max Frameskip", &options.maxskip, INT, frameskip, 440 + rb->set_option("Max Frameskip", &options.maxskip, RB_INT, frameskip, 441 441 sizeof(frameskip)/sizeof(*frameskip), NULL ); 442 442 break; 443 443 case 1: /* Autosave */ 444 - rb->set_option("Autosave", &options.autosave, INT, onoff, 2, NULL ); 444 + rb->set_option("Autosave", &options.autosave, RB_INT, onoff, 2, NULL ); 445 445 break; 446 446 case 2: /* Sound */ 447 447 if(options.sound>1) options.sound=1; 448 - rb->set_option("Sound", &options.sound, INT, onoff, 2, NULL ); 448 + rb->set_option("Sound", &options.sound, RB_INT, onoff, 2, NULL ); 449 449 if(options.sound) sound_dirty(); 450 450 break; 451 451 case 3: /* Volume */ 452 452 rb->option_screen((struct settings_list*)vol, parentvp, false, "Volume"); 453 453 break; 454 454 case 4: /* Stats */ 455 - rb->set_option("Stats", &options.showstats, INT, stats, 3, NULL ); 455 + rb->set_option("Stats", &options.showstats, RB_INT, stats, 3, NULL ); 456 456 break; 457 457 case 5: /* Keys */ 458 458 setupkeys(); 459 459 break; 460 460 #ifdef HAVE_LCD_COLOR 461 461 case 6: /* Screen Size */ 462 - rb->set_option("Screen Size", &options.scaling, INT, scaling, 462 + rb->set_option("Screen Size", &options.scaling, RB_INT, scaling, 463 463 sizeof(scaling)/sizeof(*scaling), NULL ); 464 464 setvidmode(); 465 465 break; 466 466 case 7: /* Screen rotate */ 467 - rb->set_option("Screen Rotate", &options.rotate, INT, rotate, 467 + rb->set_option("Screen Rotate", &options.rotate, RB_INT, rotate, 468 468 sizeof(rotate)/sizeof(*rotate), NULL ); 469 469 setvidmode(); 470 470 break; 471 471 case 8: /* Palette */ 472 - rb->set_option("Set Palette", &options.pal, INT, palette, 17, NULL ); 472 + rb->set_option("Set Palette", &options.pal, RB_INT, palette, 17, NULL ); 473 473 set_pal(); 474 474 break; 475 475 #endif
+3 -3
apps/plugins/rockpaint.c
··· 2869 2869 case MAIN_MENU_BRUSH_SIZE: 2870 2870 for(multi = 0; multi<4; multi++) 2871 2871 if(bsize == times_list[multi]) break; 2872 - rb->set_option( "Brush Size", &multi, INT, times_options, 4, NULL ); 2872 + rb->set_option( "Brush Size", &multi, RB_INT, times_options, 4, NULL ); 2873 2873 if( multi >= 0 ) 2874 2874 bsize = times_list[multi]; 2875 2875 break; ··· 2877 2877 case MAIN_MENU_BRUSH_SPEED: 2878 2878 for(multi = 0; multi<3; multi++) 2879 2879 if(bspeed == times_list[multi]) break; 2880 - rb->set_option( "Brush Speed", &multi, INT, times_options, 3, NULL ); 2880 + rb->set_option( "Brush Speed", &multi, RB_INT, times_options, 3, NULL ); 2881 2881 if( multi >= 0 ) { 2882 2882 bspeed = times_list[multi]; 2883 2883 incdec_x.step[0] = bspeed; ··· 2894 2894 case MAIN_MENU_GRID_SIZE: 2895 2895 for(multi = 0; multi<4; multi++) 2896 2896 if(gridsize == gridsize_list[multi]) break; 2897 - rb->set_option( "Grid Size", &multi, INT, gridsize_options, 4, NULL ); 2897 + rb->set_option( "Grid Size", &multi, RB_INT, gridsize_options, 4, NULL ); 2898 2898 if( multi >= 0 ) 2899 2899 gridsize = gridsize_list[multi]; 2900 2900 break;
+1 -1
apps/plugins/snake2.c
··· 1599 1599 speed = level*20; 1600 1600 return; 1601 1601 case 1: 1602 - rb->set_option("Game Type", &game_type, INT, 1602 + rb->set_option("Game Type", &game_type, RB_INT, 1603 1603 type_options, 2, NULL); 1604 1604 break; 1605 1605 case 2:
+1 -1
apps/plugins/solitaire.c
··· 1088 1088 1089 1089 case 2: 1090 1090 if (rb->set_option("Draw Cards Option", &sol.draw_type, 1091 - INT, drawcards, 2, NULL)) 1091 + RB_INT, drawcards, 2, NULL)) 1092 1092 result = MENU_USB; 1093 1093 break; 1094 1094
+2 -2
apps/plugins/sudoku/sudoku.c
··· 867 867 {"Coloured", -1}, 868 868 }; 869 869 870 - return rb->set_option("Number Display", &sudcfg.number_display, INT, names, 870 + return rb->set_option("Number Display", &sudcfg.number_display, RB_INT, names, 871 871 sizeof(names) / sizeof(names[0]), NULL); 872 872 } 873 873 #endif ··· 880 880 {"Show", -1}, 881 881 }; 882 882 883 - return rb->set_option("Show Markings", &sudcfg.show_markings, INT, names, 883 + return rb->set_option("Show Markings", &sudcfg.show_markings, RB_INT, names, 884 884 sizeof(names) / sizeof(names[0]), NULL); 885 885 } 886 886 #endif
+1 -1
apps/plugins/superdom.c
··· 583 583 }; 584 584 static int sel=1; 585 585 rb->set_option("Computer difficulty", &sel, 586 - INT, difficulty_options, 3, NULL); 586 + RB_INT, difficulty_options, 3, NULL); 587 587 superdom_settings.compdiff=sel+1; 588 588 break; 589 589 }
+1 -1
apps/plugins/test_codec.c
··· 915 915 #ifdef HAVE_ADJUSTABLE_CPU_FREQ 916 916 if (result == BOOST) 917 917 { 918 - rb->set_option("Boosting", &boost, INT, 918 + rb->set_option("Boosting", &boost, RB_INT, 919 919 boost_settings, 2, NULL); 920 920 goto menu; 921 921 }
+1 -1
apps/plugins/test_sampr.c
··· 252 252 else 253 253 #endif /* HAVE_VOLUME_IN_LIST */ 254 254 { 255 - rb->set_option("Sample Rate", &freq, INT, names, 255 + rb->set_option("Sample Rate", &freq, RB_INT, names, 256 256 HW_NUM_FREQ, set_frequency); 257 257 (void)volume_set; 258 258 }
+7 -7
apps/plugins/text_viewer/tv_menu.c
··· 46 46 {"Scroll by Column", -1}, 47 47 }; 48 48 49 - return rb->set_option("Scroll Mode", &new_prefs.horizontal_scroll_mode, INT, 49 + return rb->set_option("Scroll Mode", &new_prefs.horizontal_scroll_mode, RB_INT, 50 50 names, 2, NULL); 51 51 } 52 52 ··· 75 75 {"Scroll by Line", -1}, 76 76 }; 77 77 78 - return rb->set_option("Scroll Mode", &new_prefs.vertical_scroll_mode, INT, 78 + return rb->set_option("Scroll Mode", &new_prefs.vertical_scroll_mode, RB_INT, 79 79 names, 2, NULL); 80 80 } 81 81 ··· 97 97 {"Top/Bottom Page", -1}, 98 98 }; 99 99 100 - return rb->set_option("Left/Right Key", &new_prefs.narrow_mode, INT, 100 + return rb->set_option("Left/Right Key", &new_prefs.narrow_mode, RB_INT, 101 101 names, 2, NULL); 102 102 } 103 103 ··· 138 138 names[idx].voice_id = -1; 139 139 } 140 140 141 - return rb->set_option("Encoding", &new_prefs.encoding, INT, names, 141 + return rb->set_option("Encoding", &new_prefs.encoding, RB_INT, names, 142 142 sizeof(names) / sizeof(names[0]), NULL); 143 143 } 144 144 ··· 149 149 {"Off (Chop Words)", -1}, 150 150 }; 151 151 152 - return rb->set_option("Word Wrap", &new_prefs.word_mode, INT, 152 + return rb->set_option("Word Wrap", &new_prefs.word_mode, RB_INT, 153 153 names, 2, NULL); 154 154 } 155 155 ··· 162 162 {"Reflow Lines", -1}, 163 163 }; 164 164 165 - return rb->set_option("Line Mode", &new_prefs.line_mode, INT, names, 165 + return rb->set_option("Line Mode", &new_prefs.line_mode, RB_INT, names, 166 166 sizeof(names) / sizeof(names[0]), NULL); 167 167 } 168 168 ··· 179 179 {"Right", -1}, 180 180 }; 181 181 182 - return rb->set_option("Alignment", &new_prefs.alignment, INT, 182 + return rb->set_option("Alignment", &new_prefs.alignment, RB_INT, 183 183 names , 2, NULL); 184 184 } 185 185
+1 -1
apps/plugins/theme_remove.c
··· 589 589 { 590 590 struct remove_setting *setting = &remove_list[result]; 591 591 int prev_option = setting->option; 592 - if (rb->set_option(option_menu_[result], &setting->option, INT, 592 + if (rb->set_option(option_menu_[result], &setting->option, RB_INT, 593 593 remove_names, NUM_REMOVE_OPTION, NULL)) 594 594 return true; 595 595 if (prev_option != setting->option)
+3 -3
apps/plugins/vu_meter.c
··· 668 668 switch(rb->do_menu(&menu, &selection, NULL, false)) 669 669 { 670 670 case 0: 671 - rb->set_option("Meter Type", &vumeter_settings.meter_type, INT, 671 + rb->set_option("Meter Type", &vumeter_settings.meter_type, RB_INT, 672 672 meter_type_option, 2, NULL); 673 673 break; 674 674 ··· 701 701 case 3: 702 702 if(vumeter_settings.meter_type==ANALOG) 703 703 { 704 - rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT, 704 + rb->set_option("Decay Speed", &vumeter_settings.analog_decay, RB_INT, 705 705 decay_speed_option, 7, NULL); 706 706 } 707 707 else 708 708 { 709 - rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT, 709 + rb->set_option("Decay Speed", &vumeter_settings.digital_decay, RB_INT, 710 710 decay_speed_option, 7, NULL); 711 711 } 712 712 break;
+6 -6
apps/plugins/wormlet.c
··· 2562 2562 case 3: 2563 2563 switch(players) { 2564 2564 case 0: 2565 - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, 2565 + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, 2566 2566 nokey_option, 1, NULL); 2567 2567 break; 2568 2568 case 1: 2569 - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, 2569 + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, 2570 2570 key24_option, 2, NULL); 2571 2571 break; 2572 2572 case 2: 2573 2573 #ifdef REMOTE 2574 - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, 2574 + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, 2575 2575 remote_option, 2, NULL); 2576 2576 #else 2577 - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, 2577 + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, 2578 2578 key2_option, 1, NULL); 2579 2579 #endif 2580 2580 break; 2581 2581 case 3: 2582 - rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote,INT, 2582 + rb->set_option(rb->str(LANG_CONTROL_STYLE),&use_remote, RB_INT, 2583 2583 remoteonly_option, 1, NULL); 2584 2584 break; 2585 2585 } ··· 2608 2608 break; 2609 2609 case 9: 2610 2610 new_setting = 0; 2611 - rb->set_option(rb->str(LANG_RESET), &new_setting, INT, noyes , 2, NULL); 2611 + rb->set_option(rb->str(LANG_RESET), &new_setting, RB_INT, noyes , 2, NULL); 2612 2612 if (new_setting == 1) 2613 2613 default_settings(); 2614 2614 break;
+2 -2
apps/plugins/xworld/sys.c
··· 206 206 #else 207 207 case 2: 208 208 #endif 209 - rb->set_option("Scaling", &sys->settings.scaling_quality, INT, scaling_settings, 209 + rb->set_option("Scaling", &sys->settings.scaling_quality, RB_INT, scaling_settings, 210 210 #ifdef HAVE_LCD_COLOR 211 211 3 212 212 #else ··· 225 225 #else 226 226 case 3: 227 227 #endif 228 - rb->set_option("Rotation", &sys->settings.rotation_option, INT, rotation_settings, 3, NULL); 228 + rb->set_option("Rotation", &sys->settings.rotation_option, RB_INT, rotation_settings, 3, NULL); 229 229 if(sys->settings.rotation_option && 230 230 sys->settings.zoom) 231 231 {
+6 -6
apps/plugins/zxbox/spmain.c
··· 257 257 { 258 258 case 0: 259 259 new_setting=settings.kempston; 260 - rb->set_option("Map Keys to kempston",&new_setting,INT, 260 + rb->set_option("Map Keys to kempston",&new_setting, RB_INT, 261 261 no_yes, 2, NULL); 262 262 if (new_setting != settings.kempston ) 263 263 settings.kempston=new_setting; 264 264 break; 265 265 case 1: 266 266 new_setting = settings.showfps; 267 - rb->set_option("Display Speed",&new_setting,INT, 267 + rb->set_option("Display Speed",&new_setting, RB_INT, 268 268 no_yes, 2, NULL); 269 269 if (new_setting != settings.showfps ) 270 270 settings.showfps=new_setting; 271 271 break; 272 272 case 2: 273 273 new_setting = settings.invert_colors; 274 - rb->set_option("Invert Colors",&new_setting,INT, 274 + rb->set_option("Invert Colors",&new_setting, RB_INT, 275 275 no_yes, 2, NULL); 276 276 if (new_setting != settings.invert_colors ) 277 277 settings.invert_colors=new_setting; ··· 279 279 break; 280 280 case 3: 281 281 new_setting = settings.frameskip; 282 - rb->set_option("Frameskip",&new_setting,INT, 282 + rb->set_option("Frameskip",&new_setting, RB_INT, 283 283 frameskip_items, 10, NULL); 284 284 if (new_setting != settings.frameskip ) 285 285 settings.frameskip=new_setting; 286 286 break; 287 287 case 4: 288 288 new_setting = settings.sound; 289 - rb->set_option("Sound",&new_setting,INT, 289 + rb->set_option("Sound",&new_setting, RB_INT, 290 290 no_yes, 2, NULL); 291 291 if (new_setting != settings.sound ) 292 292 settings.sound=new_setting; ··· 296 296 break; 297 297 case 5: 298 298 new_setting = 9 - settings.volume; 299 - rb->set_option("Volume",&new_setting,INT, 299 + rb->set_option("Volume",&new_setting, RB_INT, 300 300 frameskip_items, 10, NULL); 301 301 new_setting = 9 - new_setting; 302 302 if (new_setting != settings.volume )
+3 -3
apps/settings.c
··· 1201 1201 }; 1202 1202 bool result; 1203 1203 1204 - result = set_option(string, variable, BOOL, names, 2, 1204 + result = set_option(string, variable, RB_BOOL, names, 2, 1205 1205 (void (*)(int))(void (*)(void))function); 1206 1206 return result; 1207 1207 } ··· 1286 1286 item.lang_id = -1; 1287 1287 item.cfg_vals = (char*)string; 1288 1288 item.setting = &temp; 1289 - if (type == BOOL) 1289 + if (type == RB_BOOL) 1290 1290 temp = *(bool*)variable? 1: 0; 1291 1291 else 1292 1292 temp = *(int*)variable; 1293 1293 if (!option_screen(&item, NULL, false, NULL)) 1294 1294 { 1295 - if (type == BOOL) 1295 + if (type == RB_BOOL) 1296 1296 1297 1297 *(bool*)variable = (temp == 1); 1298 1298 else
+1 -1
apps/settings.h
··· 261 261 void settings_apply_pm_range(void); 262 262 void settings_display(void); 263 263 264 - enum optiontype { INT, BOOL }; 264 + enum optiontype { RB_INT, RB_BOOL }; 265 265 266 266 const struct settings_list* find_setting(const void* variable); 267 267 const struct settings_list* find_setting_by_cfgname(const char* name);