mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Start refactoring bool variables
This commit is contained in:
parent
193b0b147f
commit
cc095e56fc
@ -1785,7 +1785,7 @@ static bool command_event_resize_windowed_scale(void)
|
||||
configuration_set_float(settings, settings->video.scale, *window_scale);
|
||||
}
|
||||
|
||||
if (!settings->video.fullscreen)
|
||||
if (!settings->bools.video_fullscreen)
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
@ -2504,17 +2504,17 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_FULLSCREEN_TOGGLE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool new_fullscreen_state = !settings->video.fullscreen;
|
||||
bool new_fullscreen_state = !settings->bools.video_fullscreen;
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
|
||||
/* If we go fullscreen we drop all drivers and
|
||||
* reinitialize to be safe. */
|
||||
configuration_set_bool(settings, settings->video.fullscreen,
|
||||
configuration_set_bool(settings, settings->bools.video_fullscreen,
|
||||
new_fullscreen_state);
|
||||
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
if (settings->video.fullscreen)
|
||||
if (settings->bools.video_fullscreen)
|
||||
video_driver_hide_mouse();
|
||||
else
|
||||
video_driver_show_mouse();
|
||||
|
@ -723,9 +723,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
global_t *global = global_get_ptr();
|
||||
struct config_bool_setting *tmp = NULL;
|
||||
|
||||
SETTING_BOOL("ui_companion_start_on_boot", &settings->ui.companion_start_on_boot, true, ui_companion_start_on_boot, false);
|
||||
SETTING_BOOL("ui_companion_enable", &settings->ui.companion_enable, true, ui_companion_enable, false);
|
||||
SETTING_BOOL("video_gpu_record", &settings->video.gpu_record, true, gpu_record, false);
|
||||
SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false);
|
||||
SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false);
|
||||
SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, gpu_record, false);
|
||||
SETTING_BOOL("input_remap_binds_enable", &settings->input.remap_binds_enable, true, true, false);
|
||||
SETTING_BOOL("all_users_control_menu", &settings->input.all_users_control_menu, true, all_users_control_menu, false);
|
||||
SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->input.menu_swap_ok_cancel_buttons, true, menu_swap_ok_cancel_buttons, false);
|
||||
@ -745,40 +745,40 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("builtin_mediaplayer_enable", &settings->multimedia.builtin_mediaplayer_enable, false, false /* TODO */, false);
|
||||
SETTING_BOOL("builtin_imageviewer_enable", &settings->multimedia.builtin_imageviewer_enable, true, true, false);
|
||||
SETTING_BOOL("fps_show", &settings->fps_show, true, false, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->ui.menubar_enable, true, true, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->ui.suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("rewind_enable", &settings->rewind_enable, true, rewind_enable, false);
|
||||
SETTING_BOOL("audio_sync", &settings->audio.sync, true, audio_sync, false);
|
||||
SETTING_BOOL("video_shader_enable", &settings->video.shader_enable, true, shader_enable, false);
|
||||
SETTING_BOOL("video_shader_enable", &settings->bools.video_shader_enable, true, shader_enable, false);
|
||||
|
||||
/* Let implementation decide if automatic, or 1:1 PAR. */
|
||||
SETTING_BOOL("video_aspect_ratio_auto", &settings->video.aspect_ratio_auto, true, aspect_ratio_auto, false);
|
||||
SETTING_BOOL("video_aspect_ratio_auto", &settings->bools.video_aspect_ratio_auto, true, aspect_ratio_auto, false);
|
||||
|
||||
SETTING_BOOL("video_allow_rotate", &settings->video.allow_rotate, true, allow_rotate, false);
|
||||
SETTING_BOOL("video_windowed_fullscreen", &settings->video.windowed_fullscreen, true, windowed_fullscreen, false);
|
||||
SETTING_BOOL("video_crop_overscan", &settings->video.crop_overscan, true, crop_overscan, false);
|
||||
SETTING_BOOL("video_scale_integer", &settings->video.scale_integer, true, scale_integer, false);
|
||||
SETTING_BOOL("video_smooth", &settings->video.smooth, true, video_smooth, false);
|
||||
SETTING_BOOL("video_force_aspect", &settings->video.force_aspect, true, force_aspect, false);
|
||||
SETTING_BOOL("video_threaded", &settings->video.threaded, true, video_threaded, false);
|
||||
SETTING_BOOL("video_shared_context", &settings->video.shared_context, true, video_shared_context, false);
|
||||
SETTING_BOOL("video_allow_rotate", &settings->bools.video_allow_rotate, true, allow_rotate, false);
|
||||
SETTING_BOOL("video_windowed_fullscreen", &settings->bools.video_windowed_fullscreen, true, windowed_fullscreen, false);
|
||||
SETTING_BOOL("video_crop_overscan", &settings->bools.video_crop_overscan, true, crop_overscan, false);
|
||||
SETTING_BOOL("video_scale_integer", &settings->bools.video_scale_integer, true, scale_integer, false);
|
||||
SETTING_BOOL("video_smooth", &settings->bools.video_smooth, true, video_smooth, false);
|
||||
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, force_aspect, false);
|
||||
SETTING_BOOL("video_threaded", &settings->bools.video_threaded, true, video_threaded, false);
|
||||
SETTING_BOOL("video_shared_context", &settings->bools.video_shared_context, true, video_shared_context, false);
|
||||
SETTING_BOOL("auto_screenshot_filename", &settings->auto_screenshot_filename, true, auto_screenshot_filename, false);
|
||||
SETTING_BOOL("video_force_srgb_disable", &settings->video.force_srgb_disable, true, false, false);
|
||||
SETTING_BOOL("video_fullscreen", &settings->video.fullscreen, true, fullscreen, false);
|
||||
SETTING_BOOL("video_force_srgb_disable", &settings->bools.video_force_srgb_disable, true, false, false);
|
||||
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, fullscreen, false);
|
||||
SETTING_BOOL("bundle_assets_extract_enable", &settings->bundle_assets_extract_enable, true, bundle_assets_extract_enable, false);
|
||||
SETTING_BOOL("video_vsync", &settings->video.vsync, true, vsync, false);
|
||||
SETTING_BOOL("video_hard_sync", &settings->video.hard_sync, true, hard_sync, false);
|
||||
SETTING_BOOL("video_black_frame_insertion", &settings->video.black_frame_insertion, true, black_frame_insertion, false);
|
||||
SETTING_BOOL("video_disable_composition", &settings->video.disable_composition, true, disable_composition, false);
|
||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, vsync, false);
|
||||
SETTING_BOOL("video_hard_sync", &settings->bools.video_hard_sync, true, hard_sync, false);
|
||||
SETTING_BOOL("video_black_frame_insertion", &settings->bools.video_black_frame_insertion, true, black_frame_insertion, false);
|
||||
SETTING_BOOL("video_disable_composition", &settings->bools.video_disable_composition, true, disable_composition, false);
|
||||
SETTING_BOOL("pause_nonactive", &settings->pause_nonactive, true, pause_nonactive, false);
|
||||
SETTING_BOOL("video_gpu_screenshot", &settings->video.gpu_screenshot, true, gpu_screenshot, false);
|
||||
SETTING_BOOL("video_post_filter_record", &settings->video.post_filter_record, true, post_filter_record, false);
|
||||
SETTING_BOOL("video_gpu_screenshot", &settings->bools.video_gpu_screenshot, true, gpu_screenshot, false);
|
||||
SETTING_BOOL("video_post_filter_record", &settings->bools.video_post_filter_record, true, post_filter_record, false);
|
||||
SETTING_BOOL("keyboard_gamepad_enable", &settings->input.keyboard_gamepad_enable, true, true, false);
|
||||
SETTING_BOOL("core_set_supports_no_game_enable", &settings->set_supports_no_game_enable, true, true, false);
|
||||
SETTING_BOOL("audio_enable", &settings->audio.enable, true, audio_enable, false);
|
||||
SETTING_BOOL("audio_mute_enable", &settings->audio.mute_enable, true, false, false);
|
||||
SETTING_BOOL("location_allow", &settings->location.allow, true, false, false);
|
||||
SETTING_BOOL("video_font_enable", &settings->video.font_enable, true, font_enable, false);
|
||||
SETTING_BOOL("video_font_enable", &settings->bools.video_font_enable, true, font_enable, false);
|
||||
SETTING_BOOL("core_updater_auto_extract_archive", &settings->network.buildbot_auto_extract_archive, true, true, false);
|
||||
SETTING_BOOL("camera_allow", &settings->camera.allow, true, false, false);
|
||||
#if defined(VITA)
|
||||
@ -789,7 +789,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("small_keyboard_enable", &settings->input.small_keyboard_enable, true, false, false);
|
||||
#endif
|
||||
#ifdef GEKKO
|
||||
SETTING_BOOL("video_vfilter", &settings->video.vfilter, true, video_vfilter, false);
|
||||
SETTING_BOOL("video_vfilter", &settings->bools.video_vfilter, true, video_vfilter, false);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_BOOL("menu_unified_controls", &settings->menu.unified_controls, true, false, false);
|
||||
@ -874,7 +874,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
|
||||
if (global)
|
||||
{
|
||||
SETTING_BOOL("custom_bgm_enable", &global->console.sound.system_bgm_enable, true, false, false);
|
||||
SETTING_BOOL("custom_bgm_enable", &global->console.sound.system_bgm_enable, true, false, false);
|
||||
}
|
||||
|
||||
*size = count;
|
||||
@ -1109,11 +1109,11 @@ static void config_set_defaults(void)
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_FORCE_FULLSCREEN, NULL))
|
||||
{
|
||||
configuration_set_bool(settings, settings->video.fullscreen, true);
|
||||
configuration_set_bool(settings, settings->bools.video_fullscreen, true);
|
||||
}
|
||||
|
||||
if (g_defaults.settings.video_threaded_enable != video_threaded)
|
||||
settings->video.threaded = g_defaults.settings.video_threaded_enable;
|
||||
settings->bools.video_threaded = g_defaults.settings.video_threaded_enable;
|
||||
|
||||
settings->video.msg_color_r = ((message_color >> 16) & 0xff) / 255.0f;
|
||||
settings->video.msg_color_g = ((message_color >> 8) & 0xff) / 255.0f;
|
||||
@ -1844,7 +1844,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
}
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_IS_FORCE_FULLSCREEN, NULL))
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.fullscreen, "video_fullscreen");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bools.video_fullscreen, "video_fullscreen");
|
||||
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
|
@ -46,6 +46,35 @@ typedef struct settings
|
||||
{
|
||||
bool placeholder;
|
||||
bool bundle_finished;
|
||||
|
||||
bool video_fullscreen;
|
||||
bool video_windowed_fullscreen;
|
||||
bool video_vsync;
|
||||
bool video_hard_sync;
|
||||
bool video_black_frame_insertion;
|
||||
#ifdef GEKKO
|
||||
bool video_vfilter;
|
||||
#endif
|
||||
bool video_smooth;
|
||||
bool video_force_aspect;
|
||||
bool video_crop_overscan;
|
||||
bool video_aspect_ratio_auto;
|
||||
bool video_scale_integer;
|
||||
bool video_shader_enable;
|
||||
bool video_threaded;
|
||||
bool video_font_enable;
|
||||
bool video_disable_composition;
|
||||
bool video_post_filter_record;
|
||||
bool video_gpu_record;
|
||||
bool video_gpu_screenshot;
|
||||
bool video_allow_rotate;
|
||||
bool video_shared_context;
|
||||
bool video_force_srgb_disable;
|
||||
|
||||
bool ui_menubar_enable;
|
||||
bool ui_suspend_screensaver_enable;
|
||||
bool ui_companion_start_on_boot;
|
||||
bool ui_companion_enable;
|
||||
} bools;
|
||||
|
||||
bool modified;
|
||||
@ -63,54 +92,27 @@ typedef struct settings
|
||||
float scale;
|
||||
unsigned window_x;
|
||||
unsigned window_y;
|
||||
bool fullscreen;
|
||||
bool windowed_fullscreen;
|
||||
unsigned monitor_index;
|
||||
unsigned fullscreen_x;
|
||||
unsigned fullscreen_y;
|
||||
bool vsync;
|
||||
bool hard_sync;
|
||||
bool black_frame_insertion;
|
||||
unsigned max_swapchain_images;
|
||||
unsigned swap_interval;
|
||||
unsigned hard_sync_frames;
|
||||
unsigned frame_delay;
|
||||
#ifdef GEKKO
|
||||
unsigned viwidth;
|
||||
bool vfilter;
|
||||
#endif
|
||||
bool smooth;
|
||||
bool force_aspect;
|
||||
bool crop_overscan;
|
||||
float aspect_ratio;
|
||||
bool aspect_ratio_auto;
|
||||
bool scale_integer;
|
||||
unsigned aspect_ratio_idx;
|
||||
unsigned rotation;
|
||||
|
||||
bool shader_enable;
|
||||
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
float msg_pos_x;
|
||||
float msg_pos_y;
|
||||
float msg_color_r;
|
||||
float msg_color_g;
|
||||
float msg_color_b;
|
||||
|
||||
bool disable_composition;
|
||||
|
||||
bool post_filter_record;
|
||||
bool gpu_record;
|
||||
bool gpu_screenshot;
|
||||
|
||||
bool allow_rotate;
|
||||
bool shared_context;
|
||||
bool force_srgb_disable;
|
||||
} video;
|
||||
|
||||
struct
|
||||
@ -118,14 +120,6 @@ typedef struct settings
|
||||
char driver[32];
|
||||
} record;
|
||||
|
||||
struct
|
||||
{
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
bool companion_start_on_boot;
|
||||
bool companion_enable;
|
||||
} ui;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
struct
|
||||
{
|
||||
|
2
driver.c
2
driver.c
@ -246,7 +246,7 @@ void driver_set_nonblock_state(void)
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool video_nonblock = enable;
|
||||
|
||||
if ( !settings->video.vsync
|
||||
if ( !settings->bools.video_vsync
|
||||
|| runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL))
|
||||
video_nonblock = true;
|
||||
video_driver_set_nonblock_state(video_nonblock);
|
||||
|
@ -962,9 +962,9 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
switch (cmd)
|
||||
{
|
||||
case RETRO_ENVIRONMENT_GET_OVERSCAN:
|
||||
*(bool*)data = !settings->video.crop_overscan;
|
||||
*(bool*)data = !settings->bools.video_crop_overscan;
|
||||
RARCH_LOG("Environ GET_OVERSCAN: %u\n",
|
||||
(unsigned)!settings->video.crop_overscan);
|
||||
(unsigned)!settings->bools.video_crop_overscan);
|
||||
break;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_CAN_DUPE:
|
||||
@ -1010,7 +1010,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
{
|
||||
unsigned rotation = *(const unsigned*)data;
|
||||
RARCH_LOG("Environ SET_ROTATION: %u\n", rotation);
|
||||
if (!settings->video.allow_rotate)
|
||||
if (!settings->bools.video_allow_rotate)
|
||||
break;
|
||||
|
||||
if (system)
|
||||
|
@ -178,7 +178,7 @@ int main(int argc, char *argv[])
|
||||
emscripten_set_canvas_size(800, 600);
|
||||
rarch_main(argc, argv, NULL);
|
||||
emscripten_set_main_loop(emscripten_mainloop,
|
||||
settings->video.vsync ? 0 : INT_MAX, 1);
|
||||
settings->bools.video_vsync ? 0 : INT_MAX, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ static void gfx_set_dwm(void)
|
||||
if (!gfx_init_dwm())
|
||||
return;
|
||||
|
||||
if (settings->video.disable_composition == dwm_composition_disabled)
|
||||
if (settings->bools.video_disable_composition == dwm_composition_disabled)
|
||||
return;
|
||||
|
||||
HRESULT (WINAPI *composition_enable)(UINT) =
|
||||
@ -104,10 +104,10 @@ static void gfx_set_dwm(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = composition_enable(!settings->video.disable_composition);
|
||||
ret = composition_enable(!settings->bools.video_disable_composition);
|
||||
if (FAILED(ret))
|
||||
RARCH_ERR("Failed to set composition state ...\n");
|
||||
dwm_composition_disabled = settings->video.disable_composition;
|
||||
dwm_composition_disabled = settings->bools.video_disable_composition;
|
||||
}
|
||||
|
||||
static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
||||
|
@ -582,7 +582,7 @@ D3DTEXTUREFILTERTYPE d3d_translate_filter(unsigned type)
|
||||
case RARCH_FILTER_UNSPEC:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings->video.smooth)
|
||||
if (!settings->bools.video_smooth)
|
||||
break;
|
||||
}
|
||||
/* fall-through */
|
||||
|
@ -416,7 +416,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
case WM_COMMAND:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (settings->ui.menubar_enable)
|
||||
if (settings->bools.ui_menubar_enable)
|
||||
win32_menu_loop(main_window.hwnd, wparam);
|
||||
}
|
||||
break;
|
||||
@ -841,7 +841,7 @@ void win32_set_window(unsigned *width, unsigned *height,
|
||||
settings_t *settings = config_get_ptr();
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (!fullscreen && settings->ui.menubar_enable)
|
||||
if (!fullscreen && settings->bools.ui_menubar_enable)
|
||||
{
|
||||
RECT rc_temp = {0, 0, (LONG)*height, 0x7FFF};
|
||||
SetMenu(main_window.hwnd,
|
||||
@ -885,7 +885,7 @@ bool win32_set_video_mode(void *data,
|
||||
g_resize_width = width;
|
||||
g_resize_height = height;
|
||||
|
||||
windowed_full = settings->video.windowed_fullscreen;
|
||||
windowed_full = settings->bools.video_windowed_fullscreen;
|
||||
|
||||
win32_set_style(¤t_mon, &hm_to_use, &width, &height,
|
||||
fullscreen, windowed_full, &rect, &mon_rect, &style);
|
||||
|
@ -134,7 +134,7 @@ static void ctr_update_viewport(ctr_video_t* ctr)
|
||||
if(ctr->rotation & 0x1)
|
||||
desired_aspect = 1.0 / desired_aspect;
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&ctr->vp, ctr->vp.full_width,
|
||||
ctr->vp.full_height, desired_aspect, ctr->keep_aspect);
|
||||
|
@ -81,7 +81,7 @@ static bool d3d_init_luts(d3d_video_t *d3d)
|
||||
d3d->renderchain_data,
|
||||
d3d->shader.lut[i].id, d3d->shader.lut[i].path,
|
||||
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC ?
|
||||
settings->video.smooth :
|
||||
settings->bools.video_smooth :
|
||||
(d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR)))
|
||||
return false;
|
||||
}
|
||||
@ -499,7 +499,7 @@ void d3d_make_d3dpp(void *data,
|
||||
#ifdef _XBOX
|
||||
d3dpp->Windowed = false;
|
||||
#else
|
||||
d3dpp->Windowed = settings->video.windowed_fullscreen
|
||||
d3dpp->Windowed = settings->bools.video_windowed_fullscreen
|
||||
|| !info->fullscreen;
|
||||
#endif
|
||||
d3dpp->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
|
||||
@ -674,7 +674,7 @@ static void d3d_calculate_rect(void *data,
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
|
||||
if (settings->video.scale_integer && !force_full)
|
||||
if (settings->bools.video_scale_integer && !force_full)
|
||||
{
|
||||
struct video_viewport vp;
|
||||
|
||||
@ -1020,7 +1020,7 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
g_resize_width = info->width;
|
||||
g_resize_height = info->height;
|
||||
|
||||
windowed_full = settings->video.windowed_fullscreen;
|
||||
windowed_full = settings->bools.video_windowed_fullscreen;
|
||||
|
||||
full_x = (windowed_full || info->width == 0) ?
|
||||
(mon_rect.right - mon_rect.left) : info->width;
|
||||
@ -1068,7 +1068,7 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
* later. */
|
||||
enum rarch_shader_type type =
|
||||
video_shader_parse_type(settings->path.shader, RARCH_SHADER_NONE);
|
||||
if (settings->video.shader_enable && type == RARCH_SHADER_CG)
|
||||
if (settings->bools.video_shader_enable && type == RARCH_SHADER_CG)
|
||||
d3d->shader_path = settings->path.shader;
|
||||
|
||||
if (!d3d_process_shader(d3d))
|
||||
|
@ -1051,7 +1051,7 @@ static int exynos_init_font(struct exynos_video *vid)
|
||||
const unsigned buf_bpp = defaults[EXYNOS_IMAGE_FONT].bpp;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->video.font_enable)
|
||||
if (!settings->bools.video_font_enable)
|
||||
return 0;
|
||||
|
||||
if (font_renderer_create_default(&vid->font_driver, &vid->font,
|
||||
|
@ -139,7 +139,7 @@ static void *gdi_gfx_init(const video_info_t *video,
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (settings->video.font_enable)
|
||||
if (settings->bools.video_font_enable)
|
||||
font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_GDI);
|
||||
|
||||
RARCH_LOG("[GDI]: Init complete.\n");
|
||||
|
@ -412,7 +412,7 @@ static bool gl_shader_init(gl_t *gl)
|
||||
video_shader_ctx_init_t init_data;
|
||||
enum rarch_shader_type type;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_path = (settings->video.shader_enable
|
||||
const char *shader_path = (settings->bools.video_shader_enable
|
||||
&& *settings->path.shader) ? settings->path.shader : NULL;
|
||||
|
||||
if (!gl)
|
||||
@ -1502,7 +1502,7 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident)
|
||||
|
||||
#ifdef HAVE_GL_SYNC
|
||||
gl->have_sync = gl_check_capability(GL_CAPS_SYNC);
|
||||
if (gl->have_sync && settings->video.hard_sync)
|
||||
if (gl->have_sync && settings->bools.video_hard_sync)
|
||||
RARCH_LOG("[GL]: Using ARB_sync to reduce latency.\n");
|
||||
#endif
|
||||
|
||||
@ -1525,7 +1525,7 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident)
|
||||
#endif
|
||||
|
||||
gl->has_fp_fbo = gl_check_capability(GL_CAPS_FP_FBO);
|
||||
if (settings->video.force_srgb_disable)
|
||||
if (settings->bools.video_force_srgb_disable)
|
||||
gl->has_srgb_fbo = false;
|
||||
else
|
||||
gl->has_srgb_fbo = gl_check_capability(GL_CAPS_SRGB_FBO);
|
||||
@ -1614,7 +1614,7 @@ static void gl_init_pbo_readback(gl_t *gl)
|
||||
* driver.recording_data, because recording is
|
||||
* not initialized yet.
|
||||
*/
|
||||
gl->pbo_readback_enable = settings->video.gpu_record
|
||||
gl->pbo_readback_enable = settings->bools.video_gpu_record
|
||||
&& *recording_enabled;
|
||||
|
||||
if (!gl->pbo_readback_enable)
|
||||
@ -1682,7 +1682,7 @@ static const gfx_ctx_driver_t *gl_get_context(gl_t *gl)
|
||||
|
||||
(void)api_name;
|
||||
|
||||
gl_shared_context_use = settings->video.shared_context
|
||||
gl_shared_context_use = settings->bools.video_shared_context
|
||||
&& hwr->context_type != RETRO_HW_CONTEXT_NONE;
|
||||
|
||||
return video_context_driver_init_first(gl, settings->video.context_driver,
|
||||
@ -2168,7 +2168,7 @@ static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
shader_filter.smooth = &smooth;
|
||||
|
||||
if (!video_shader_driver_filter_type(&shader_filter))
|
||||
smooth = settings->video.smooth;
|
||||
smooth = settings->bools.video_smooth;
|
||||
|
||||
mip_level = 1;
|
||||
wrap_info.idx = 1;
|
||||
|
@ -556,7 +556,7 @@ static void init_texture(void *data, unsigned width, unsigned height)
|
||||
|
||||
width &= ~3;
|
||||
height &= ~3;
|
||||
g_filter = settings->video.smooth ? GX_LINEAR : GX_NEAR;
|
||||
g_filter = settings->bools.video_smooth ? GX_LINEAR : GX_NEAR;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
|
@ -606,7 +606,7 @@ static int omapfb_init(omapfb_data_t *pdata, unsigned bpp)
|
||||
/* always use triple buffering to reduce chance of tearing */
|
||||
pdata->bpp = bpp;
|
||||
pdata->num_pages = 3;
|
||||
pdata->sync = settings->video.vsync;
|
||||
pdata->sync = settings->bools.video_vsync;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -835,7 +835,7 @@ static void omap_init_font(omap_video_t *vid, const char *font_path, unsigned fo
|
||||
int r, g, b;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->video.font_enable)
|
||||
if (!settings->bools.video_font_enable)
|
||||
return;
|
||||
|
||||
if (!(font_renderer_create_default(&vid->font_driver, &vid->font,
|
||||
|
@ -704,7 +704,7 @@ static void psp_update_viewport(psp1_video_t* psp,
|
||||
float height = SCEGU_SCR_HEIGHT;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&psp->vp, SCEGU_SCR_WIDTH,
|
||||
SCEGU_SCR_HEIGHT, video_driver_get_aspect_ratio(), psp->keep_aspect);
|
||||
|
@ -102,7 +102,7 @@ static void sdl2_init_font(sdl2_video_t *vid, const char *font_path,
|
||||
const struct font_atlas *atlas = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->video.font_enable)
|
||||
if (!settings->bools.video_font_enable)
|
||||
return;
|
||||
|
||||
if (!font_renderer_create_default((const void**)&vid->font_driver, &vid->font_data,
|
||||
@ -280,14 +280,14 @@ static void sdl_refresh_viewport(sdl2_video_t *vid)
|
||||
|
||||
SDL_GetWindowSize(vid->window, &win_w, &win_h);
|
||||
|
||||
vid->vp.x = 0;
|
||||
vid->vp.y = 0;
|
||||
vid->vp.width = win_w;
|
||||
vid->vp.height = win_h;
|
||||
vid->vp.x = 0;
|
||||
vid->vp.y = 0;
|
||||
vid->vp.width = win_w;
|
||||
vid->vp.height = win_h;
|
||||
vid->vp.full_width = win_w;
|
||||
vid->vp.full_height = win_h;
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
video_viewport_get_scaled_integer(&vid->vp,
|
||||
win_w, win_h, video_driver_get_aspect_ratio(),
|
||||
vid->video.force_aspect);
|
||||
@ -426,7 +426,7 @@ static void *sdl2_gfx_init(const video_info_t *video,
|
||||
|
||||
|
||||
if (video->fullscreen)
|
||||
flags = settings->video.windowed_fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN;
|
||||
flags = settings->bools.video_windowed_fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN;
|
||||
else
|
||||
flags = SDL_WINDOW_RESIZABLE;
|
||||
|
||||
|
@ -95,7 +95,7 @@ static void sdl_init_font(sdl_video_t *vid, const char *font_path, unsigned font
|
||||
int r, g, b;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->video.font_enable)
|
||||
if (!settings->bools.video_font_enable)
|
||||
return;
|
||||
|
||||
if (!font_renderer_create_default((const void**)&vid->font_driver, &vid->font,
|
||||
|
@ -354,7 +354,7 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita)
|
||||
float height = PSP_FB_HEIGHT;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&vita->vp, PSP_FB_WIDTH,
|
||||
PSP_FB_HEIGHT, video_driver_get_aspect_ratio(), vita->keep_aspect);
|
||||
@ -459,7 +459,7 @@ static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
|
||||
video_context_driver_translate_aspect(&aspect_data);
|
||||
|
||||
if (settings->video.scale_integer && !force_full)
|
||||
if (settings->bools.video_scale_integer && !force_full)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&vita->vp,
|
||||
viewport_width, viewport_height,
|
||||
|
@ -783,7 +783,7 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path)
|
||||
static bool vulkan_init_filter_chain(vk_t *vk)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_path = (settings->video.shader_enable && *settings->path.shader) ?
|
||||
const char *shader_path = (settings->bools.video_shader_enable && *settings->path.shader) ?
|
||||
settings->path.shader : NULL;
|
||||
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_path, RARCH_SHADER_NONE);
|
||||
@ -1051,7 +1051,7 @@ static void vulkan_init_readback(vk_t *vk)
|
||||
*/
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool *recording_enabled = recording_is_enabled();
|
||||
vk->readback.streamed = settings->video.gpu_record && *recording_enabled;
|
||||
vk->readback.streamed = settings->bools.video_gpu_record && *recording_enabled;
|
||||
|
||||
if (!vk->readback.streamed)
|
||||
return;
|
||||
@ -1374,7 +1374,7 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width,
|
||||
|
||||
video_context_driver_translate_aspect(&aspect_data);
|
||||
|
||||
if (settings->video.scale_integer && !force_full)
|
||||
if (settings->bools.video_scale_integer && !force_full)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&vk->vp,
|
||||
viewport_width, viewport_height,
|
||||
|
@ -165,7 +165,7 @@ static void wiiu_gfx_update_viewport(wiiu_video_t* wiiu)
|
||||
if(wiiu->rotation & 0x1)
|
||||
desired_aspect = 1.0 / desired_aspect;
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&wiiu->vp, wiiu->vp.full_width,
|
||||
wiiu->vp.full_height, desired_aspect, wiiu->keep_aspect);
|
||||
|
@ -136,7 +136,7 @@ static void xv_init_font(xv_t *xv, const char *font_path, unsigned font_size)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->video.font_enable)
|
||||
if (!settings->bools.video_font_enable)
|
||||
return;
|
||||
|
||||
if (font_renderer_create_default((const void**)&xv->font_driver,
|
||||
@ -371,7 +371,7 @@ static void xv_calc_out_rect(bool keep_aspect,
|
||||
vp->full_width = vp_width;
|
||||
vp->full_height = vp_height;
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
video_viewport_get_scaled_integer(vp, vp_width, vp_height,
|
||||
video_driver_get_aspect_ratio(), keep_aspect);
|
||||
else if (!keep_aspect)
|
||||
|
@ -454,8 +454,8 @@ static void gl_create_fbo_texture(gl_t *gl, unsigned i, GLuint texture)
|
||||
bool mipmapped = false;
|
||||
bool smooth = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
GLuint base_filt = settings->video.smooth ? GL_LINEAR : GL_NEAREST;
|
||||
GLuint base_mip_filt = settings->video.smooth ?
|
||||
GLuint base_filt = settings->bools.video_smooth ? GL_LINEAR : GL_NEAREST;
|
||||
GLuint base_mip_filt = settings->bools.video_smooth ?
|
||||
GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_NEAREST;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
@ -513,7 +513,7 @@ static void gl_create_fbo_texture(gl_t *gl, unsigned i, GLuint texture)
|
||||
RARCH_ERR("[GL]: sRGB FBO was requested, but it is not supported. Falling back to UNORM. Result may have banding!\n");
|
||||
}
|
||||
|
||||
if (settings->video.force_srgb_disable)
|
||||
if (settings->bools.video_force_srgb_disable)
|
||||
srgb_fbo = false;
|
||||
|
||||
if (srgb_fbo && gl->has_srgb_fbo)
|
||||
|
@ -416,9 +416,9 @@ static bool xdk_renderchain_render(void *data, const void *frame,
|
||||
|
||||
d3d_set_texture(d3dr, 0, chain->tex);
|
||||
d3d_set_viewports(chain->dev, &d3d->final_viewport);
|
||||
d3d_set_sampler_minfilter(d3dr, 0, settings->video.smooth ?
|
||||
d3d_set_sampler_minfilter(d3dr, 0, settings->bools.video_smooth ?
|
||||
D3DTEXF_LINEAR : D3DTEXF_POINT);
|
||||
d3d_set_sampler_magfilter(d3dr, 0, settings->video.smooth ?
|
||||
d3d_set_sampler_magfilter(d3dr, 0, settings->bools.video_smooth ?
|
||||
D3DTEXF_LINEAR : D3DTEXF_POINT);
|
||||
|
||||
d3d_set_vertex_declaration(d3dr, chain->vertex_decl);
|
||||
|
@ -352,7 +352,7 @@ bool video_driver_is_threaded(void)
|
||||
#ifdef HAVE_THREADS
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!video_driver_is_hw_context()
|
||||
&& settings->video.threaded)
|
||||
&& settings->bools.video_threaded)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
@ -732,7 +732,7 @@ static bool video_driver_init_internal(void)
|
||||
video_driver_set_aspect_ratio_value(
|
||||
aspectratio_lut[settings->video.aspect_ratio_idx].value);
|
||||
|
||||
if (settings->video.fullscreen)
|
||||
if (settings->bools.video_fullscreen)
|
||||
{
|
||||
width = settings->video.fullscreen_x;
|
||||
height = settings->video.fullscreen_y;
|
||||
@ -746,7 +746,7 @@ static bool video_driver_init_internal(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->video.force_aspect)
|
||||
if (settings->bools.video_force_aspect)
|
||||
{
|
||||
/* Do rounding here to simplify integer scale correctness. */
|
||||
unsigned base_width =
|
||||
@ -776,20 +776,20 @@ static bool video_driver_init_internal(void)
|
||||
|
||||
video.width = width;
|
||||
video.height = height;
|
||||
video.fullscreen = settings->video.fullscreen;
|
||||
video.vsync = settings->video.vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL);
|
||||
video.force_aspect = settings->video.force_aspect;
|
||||
video.fullscreen = settings->bools.video_fullscreen;
|
||||
video.vsync = settings->bools.video_vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL);
|
||||
video.force_aspect = settings->bools.video_force_aspect;
|
||||
#ifdef GEKKO
|
||||
video.viwidth = settings->video.viwidth;
|
||||
video.vfilter = settings->video.vfilter;
|
||||
#endif
|
||||
video.smooth = settings->video.smooth;
|
||||
video.smooth = settings->bools.video_smooth;
|
||||
video.input_scale = scale;
|
||||
video.rgb32 = video_driver_state_filter ?
|
||||
video_driver_state_out_rgb32 :
|
||||
(video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888);
|
||||
video.swap_interval = settings->video.swap_interval;
|
||||
video.font_enable = settings->video.font_enable;
|
||||
video.font_enable = settings->bools.video_font_enable;
|
||||
|
||||
/* Reset video frame count */
|
||||
video_driver_frame_count = 0;
|
||||
@ -844,7 +844,7 @@ static bool video_driver_init_internal(void)
|
||||
(settings->video.rotation + system->rotation) % 4);
|
||||
|
||||
current_video->suppress_screensaver(video_driver_data,
|
||||
settings->ui.suspend_screensaver_enable);
|
||||
settings->bools.ui_suspend_screensaver_enable);
|
||||
|
||||
video_driver_init_input(tmp);
|
||||
|
||||
@ -1346,13 +1346,13 @@ void video_driver_unset_stub_frame(void)
|
||||
bool video_driver_supports_recording(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return settings->video.gpu_record && current_video->read_viewport;
|
||||
return settings->bools.video_gpu_record && current_video->read_viewport;
|
||||
}
|
||||
|
||||
bool video_driver_supports_viewport_read(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return (settings->video.gpu_screenshot ||
|
||||
return (settings->bools.video_gpu_screenshot ||
|
||||
(video_driver_is_hw_context() && !current_video->read_frame_raw))
|
||||
&& current_video->read_viewport && current_video->viewport_info;
|
||||
}
|
||||
@ -1374,7 +1374,7 @@ void video_driver_set_viewport_config(void)
|
||||
if (!geom)
|
||||
return;
|
||||
|
||||
if (geom->aspect_ratio > 0.0f && settings->video.aspect_ratio_auto)
|
||||
if (geom->aspect_ratio > 0.0f && settings->bools.video_aspect_ratio_auto)
|
||||
aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio;
|
||||
else
|
||||
{
|
||||
@ -2239,19 +2239,19 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
||||
settings = config_get_ptr();
|
||||
video_info->refresh_rate = settings->video.refresh_rate;
|
||||
video_info->black_frame_insertion =
|
||||
settings->video.black_frame_insertion;
|
||||
video_info->hard_sync = settings->video.hard_sync;
|
||||
settings->bools.video_black_frame_insertion;
|
||||
video_info->hard_sync = settings->bools.video_hard_sync;
|
||||
video_info->hard_sync_frames = settings->video.hard_sync_frames;
|
||||
video_info->fps_show = settings->fps_show;
|
||||
video_info->scale_integer = settings->video.scale_integer;
|
||||
video_info->scale_integer = settings->bools.video_scale_integer;
|
||||
video_info->aspect_ratio_idx = settings->video.aspect_ratio_idx;
|
||||
video_info->post_filter_record = settings->video.post_filter_record;
|
||||
video_info->post_filter_record = settings->bools.video_post_filter_record;
|
||||
video_info->max_swapchain_images = settings->video.max_swapchain_images;
|
||||
video_info->windowed_fullscreen = settings->video.windowed_fullscreen;
|
||||
video_info->fullscreen = settings->video.fullscreen;
|
||||
video_info->windowed_fullscreen = settings->bools.video_windowed_fullscreen;
|
||||
video_info->fullscreen = settings->bools.video_fullscreen;
|
||||
video_info->monitor_index = settings->video.monitor_index;
|
||||
video_info->shared_context = settings->video.shared_context;
|
||||
video_info->font_enable = settings->video.font_enable;
|
||||
video_info->shared_context = settings->bools.video_shared_context;
|
||||
video_info->font_enable = settings->bools.video_font_enable;
|
||||
video_info->font_msg_pos_x = settings->video.msg_pos_x;
|
||||
video_info->font_msg_pos_y = settings->video.msg_pos_y;
|
||||
video_info->font_msg_color_r = settings->video.msg_color_r;
|
||||
|
@ -303,7 +303,7 @@ static void menu_action_setting_disp_set_label_shader_default_filter(
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
if (settings->video.smooth)
|
||||
if (settings->bools.video_smooth)
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LINEAR), len);
|
||||
else
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NEAREST), len);
|
||||
|
@ -638,7 +638,7 @@ static void rgui_render(void *data)
|
||||
if (rgui->mouse_show)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool cursor_visible = settings->video.fullscreen ||
|
||||
bool cursor_visible = settings->bools.video_fullscreen ||
|
||||
!video_driver_has_windowed();
|
||||
|
||||
if (settings->menu.mouse.enable && cursor_visible)
|
||||
|
@ -1002,7 +1002,7 @@ void menu_display_draw_cursor(
|
||||
menu_display_ctx_draw_t draw;
|
||||
struct video_coords coords;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool cursor_visible = settings->video.fullscreen ||
|
||||
bool cursor_visible = settings->bools.video_fullscreen ||
|
||||
!video_driver_has_windowed();
|
||||
|
||||
if (!settings->menu.mouse.enable)
|
||||
|
@ -193,7 +193,7 @@ static int setting_uint_action_left_custom_viewport_width(void *data, bool wrapa
|
||||
|
||||
if (custom->width <= 1)
|
||||
custom->width = 1;
|
||||
else if (settings->video.scale_integer)
|
||||
else if (settings->bools.video_scale_integer)
|
||||
{
|
||||
if (custom->width > geom->base_width)
|
||||
custom->width -= geom->base_width;
|
||||
@ -221,7 +221,7 @@ static int setting_uint_action_right_custom_viewport_width(void *data, bool wrap
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
custom->width += geom->base_width;
|
||||
else
|
||||
custom->width += 1;
|
||||
@ -248,7 +248,7 @@ static int setting_uint_action_left_custom_viewport_height(void *data, bool wrap
|
||||
|
||||
if (custom->height <= 1)
|
||||
custom->height = 1;
|
||||
else if (settings->video.scale_integer)
|
||||
else if (settings->bools.video_scale_integer)
|
||||
{
|
||||
if (custom->height > geom->base_height)
|
||||
custom->height -= geom->base_height;
|
||||
@ -276,7 +276,7 @@ static int setting_uint_action_right_custom_viewport_height(void *data, bool wra
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
custom->height += geom->base_height;
|
||||
else
|
||||
custom->height += 1;
|
||||
@ -956,7 +956,7 @@ static int setting_action_start_custom_viewport_width(void *data)
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
custom->width = ((custom->width + geom->base_width - 1) /
|
||||
geom->base_width) * geom->base_width;
|
||||
else
|
||||
@ -982,7 +982,7 @@ static int setting_action_start_custom_viewport_height(void *data)
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (settings->video.scale_integer)
|
||||
if (settings->bools.video_scale_integer)
|
||||
custom->height = ((custom->height + geom->base_height - 1) /
|
||||
geom->base_height) * geom->base_height;
|
||||
else
|
||||
@ -1621,7 +1621,7 @@ void general_write_handler(void *data)
|
||||
settings->modified = true;
|
||||
settings->video.scale = roundf(*setting->value.target.fraction);
|
||||
|
||||
if (!settings->video.fullscreen)
|
||||
if (!settings->bools.video_fullscreen)
|
||||
rarch_cmd = CMD_EVENT_REINIT;
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_PLAYER1_JOYPAD_INDEX:
|
||||
@ -1662,7 +1662,7 @@ void general_write_handler(void *data)
|
||||
}
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SMOOTH:
|
||||
video_driver_set_filtering(1, settings->video.smooth);
|
||||
video_driver_set_filtering(1, settings->bools.video_smooth);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_ROTATION:
|
||||
{
|
||||
@ -2746,7 +2746,7 @@ static bool setting_append_list(
|
||||
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
||||
parent_group);
|
||||
|
||||
bool_entries[0].target = &settings->video.shared_context;
|
||||
bool_entries[0].target = &settings->bools.video_shared_context;
|
||||
bool_entries[0].name_enum_idx = MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT;
|
||||
bool_entries[0].default_value = video_shared_context;
|
||||
@ -2770,7 +2770,7 @@ static bool setting_append_list(
|
||||
bool_entries[3].default_value = true;
|
||||
bool_entries[3].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
bool_entries[4].target = &settings->video.allow_rotate;
|
||||
bool_entries[4].target = &settings->bools.video_allow_rotate;
|
||||
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE;
|
||||
bool_entries[4].default_value = allow_rotate;
|
||||
@ -3094,7 +3094,7 @@ static bool setting_append_list(
|
||||
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->ui.suspend_screensaver_enable,
|
||||
&settings->bools.ui_suspend_screensaver_enable,
|
||||
MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE,
|
||||
true,
|
||||
@ -3154,7 +3154,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.fullscreen,
|
||||
&settings->bools.video_fullscreen,
|
||||
MENU_ENUM_LABEL_VIDEO_FULLSCREEN,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN,
|
||||
fullscreen,
|
||||
@ -3173,7 +3173,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.windowed_fullscreen,
|
||||
&settings->bools.video_windowed_fullscreen,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN,
|
||||
windowed_fullscreen,
|
||||
@ -3225,7 +3225,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.force_srgb_disable,
|
||||
&settings->bools.video_force_srgb_disable,
|
||||
MENU_ENUM_LABEL_VIDEO_FORCE_SRGB_DISABLE,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_SRGB_DISABLE,
|
||||
false,
|
||||
@ -3401,7 +3401,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.scale_integer,
|
||||
&settings->bools.video_scale_integer,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
|
||||
scale_integer,
|
||||
@ -3450,7 +3450,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.smooth,
|
||||
&settings->bools.video_smooth,
|
||||
MENU_ENUM_LABEL_VIDEO_SMOOTH,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SMOOTH,
|
||||
video_smooth,
|
||||
@ -3493,7 +3493,7 @@ static bool setting_append_list(
|
||||
#if defined(HAVE_THREADS)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.threaded,
|
||||
&settings->bools.video_threaded,
|
||||
MENU_ENUM_LABEL_VIDEO_THREADED,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_THREADED,
|
||||
video_threaded,
|
||||
@ -3511,7 +3511,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.vsync,
|
||||
&settings->bools.video_vsync,
|
||||
MENU_ENUM_LABEL_VIDEO_VSYNC,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC,
|
||||
vsync,
|
||||
@ -3560,7 +3560,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.hard_sync,
|
||||
&settings->bools.video_hard_sync,
|
||||
MENU_ENUM_LABEL_VIDEO_HARD_SYNC,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC,
|
||||
hard_sync,
|
||||
@ -3607,7 +3607,7 @@ static bool setting_append_list(
|
||||
#if !defined(RARCH_MOBILE)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.black_frame_insertion,
|
||||
&settings->bools.video_black_frame_insertion,
|
||||
MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION,
|
||||
black_frame_insertion,
|
||||
@ -3633,7 +3633,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.gpu_screenshot,
|
||||
&settings->bools.video_gpu_screenshot,
|
||||
MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT,
|
||||
gpu_screenshot,
|
||||
@ -3650,7 +3650,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.crop_overscan,
|
||||
&settings->bools.video_crop_overscan,
|
||||
MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
crop_overscan,
|
||||
@ -4354,7 +4354,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.post_filter_record,
|
||||
&settings->bools.video_post_filter_record,
|
||||
MENU_ENUM_LABEL_VIDEO_POST_FILTER_RECORD,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD,
|
||||
post_filter_record,
|
||||
@ -4370,7 +4370,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.gpu_record,
|
||||
&settings->bools.video_gpu_record,
|
||||
MENU_ENUM_LABEL_VIDEO_GPU_RECORD,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD,
|
||||
gpu_record,
|
||||
@ -4492,7 +4492,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.font_enable,
|
||||
&settings->bools.video_font_enable,
|
||||
MENU_ENUM_LABEL_VIDEO_FONT_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_ENABLE,
|
||||
font_enable,
|
||||
@ -5402,7 +5402,7 @@ static bool setting_append_list(
|
||||
#if !defined(RARCH_MOBILE)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->video.disable_composition,
|
||||
&settings->bools.video_disable_composition,
|
||||
MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
disable_composition,
|
||||
@ -5421,7 +5421,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->ui.companion_enable,
|
||||
&settings->bools.ui_companion_enable,
|
||||
MENU_ENUM_LABEL_UI_COMPANION_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE,
|
||||
ui_companion_enable,
|
||||
@ -5436,7 +5436,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->ui.companion_start_on_boot,
|
||||
&settings->bools.ui_companion_start_on_boot,
|
||||
MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT,
|
||||
MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT,
|
||||
ui_companion_start_on_boot,
|
||||
@ -5451,7 +5451,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->ui.menubar_enable,
|
||||
&settings->bools.ui_menubar_enable,
|
||||
MENU_ENUM_LABEL_UI_MENUBAR_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE,
|
||||
true,
|
||||
|
@ -259,7 +259,7 @@ void menu_shader_manager_set_preset(void *data,
|
||||
|
||||
if (!video_driver_set_shader((enum rarch_shader_type)type, preset_path))
|
||||
{
|
||||
configuration_set_bool(settings, settings->video.shader_enable, false);
|
||||
configuration_set_bool(settings, settings->bools.video_shader_enable, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ void menu_shader_manager_set_preset(void *data,
|
||||
strlcpy(settings->path.shader,
|
||||
preset_path ? preset_path : "",
|
||||
sizeof(settings->path.shader));
|
||||
configuration_set_bool(settings, settings->video.shader_enable, true);
|
||||
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
|
||||
|
||||
if (!preset_path || !shader)
|
||||
return;
|
||||
|
@ -326,7 +326,7 @@ bool recording_init(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!settings->video.gpu_record
|
||||
if (!settings->bools.video_gpu_record
|
||||
&& video_driver_is_hw_context())
|
||||
{
|
||||
RARCH_WARN("%s.\n",
|
||||
@ -387,7 +387,7 @@ bool recording_init(void)
|
||||
params.fb_width = next_pow2(vp.width);
|
||||
params.fb_height = next_pow2(vp.height);
|
||||
|
||||
if (settings->video.force_aspect &&
|
||||
if (settings->bools.video_force_aspect &&
|
||||
(video_driver_get_aspect_ratio() > 0.0f))
|
||||
params.aspect_ratio = video_driver_get_aspect_ratio();
|
||||
else
|
||||
@ -412,13 +412,13 @@ bool recording_init(void)
|
||||
params.out_height = recording_height;
|
||||
}
|
||||
|
||||
if (settings->video.force_aspect &&
|
||||
if (settings->bools.video_force_aspect &&
|
||||
(video_driver_get_aspect_ratio() > 0.0f))
|
||||
params.aspect_ratio = video_driver_get_aspect_ratio();
|
||||
else
|
||||
params.aspect_ratio = (float)params.out_width / params.out_height;
|
||||
|
||||
if (settings->video.post_filter_record
|
||||
if (settings->bools.video_post_filter_record
|
||||
&& video_driver_frame_filter_alive())
|
||||
{
|
||||
unsigned max_width = 0;
|
||||
|
@ -992,7 +992,7 @@ static enum runloop_state runloop_check_state(
|
||||
if (runloop_slowmotion)
|
||||
{
|
||||
/* Checks if slowmotion toggle/hold was being pressed and/or held. */
|
||||
if (settings->video.black_frame_insertion)
|
||||
if (settings->bools.video_black_frame_insertion)
|
||||
{
|
||||
if (!runloop_idle)
|
||||
video_driver_cached_frame();
|
||||
|
@ -399,7 +399,7 @@ enum
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
[self supportOtherAudioSessions];
|
||||
#endif
|
||||
if (settings->ui.companion_start_on_boot)
|
||||
if (settings->bools.ui_companion_start_on_boot)
|
||||
return;
|
||||
|
||||
[self showGameView];
|
||||
|
@ -130,7 +130,7 @@ void ui_companion_driver_init_first(void)
|
||||
|
||||
if (ui_companion && ui_companion->toggle)
|
||||
{
|
||||
if (settings->ui.companion_start_on_boot)
|
||||
if (settings->bools.ui_companion_start_on_boot)
|
||||
ui_companion->toggle(ui_companion_data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user