mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Settings cleanups
This commit is contained in:
parent
bdc999ca45
commit
69b84d9d02
@ -6246,8 +6246,9 @@ static void materialui_populate_entries(
|
||||
/* Context reset is called on launch or when a core is launched */
|
||||
static void materialui_context_reset(void *data, bool is_threaded)
|
||||
{
|
||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *path_menu_wallpaper = settings ? settings->paths.path_menu_wallpaper : NULL;
|
||||
|
||||
if (!mui || !settings)
|
||||
return;
|
||||
@ -6257,18 +6258,16 @@ static void materialui_context_reset(void *data, bool is_threaded)
|
||||
gfx_display_allocate_white_texture();
|
||||
materialui_context_reset_textures(mui);
|
||||
|
||||
{
|
||||
const char *path_menu_wallpaper = settings->paths.path_menu_wallpaper;
|
||||
if (path_is_valid(path_menu_wallpaper))
|
||||
task_push_image_load(path_menu_wallpaper,
|
||||
video_driver_supports_rgba(), 0,
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
if (path_is_valid(path_menu_wallpaper))
|
||||
task_push_image_load(path_menu_wallpaper,
|
||||
video_driver_supports_rgba(), 0,
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
|
||||
video_driver_monitor_reset();
|
||||
}
|
||||
|
||||
static int materialui_environ(enum menu_environ_cb type, void *data, void *userdata)
|
||||
static int materialui_environ(enum menu_environ_cb type,
|
||||
void *data, void *userdata)
|
||||
{
|
||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||
|
||||
@ -7238,7 +7237,10 @@ static void materialui_switch_list_view(materialui_handle_t *mui)
|
||||
/* Update setting based upon current display orientation */
|
||||
if (mui->is_portrait)
|
||||
{
|
||||
settings->uints.menu_materialui_thumbnail_view_portrait++;
|
||||
configuration_set_uint(
|
||||
settings,
|
||||
settings->uints.menu_materialui_thumbnail_view_portrait,
|
||||
settings->uints.menu_materialui_thumbnail_view_portrait + 1);
|
||||
|
||||
if (settings->uints.menu_materialui_thumbnail_view_portrait >=
|
||||
MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LAST)
|
||||
@ -7247,7 +7249,9 @@ static void materialui_switch_list_view(materialui_handle_t *mui)
|
||||
}
|
||||
else
|
||||
{
|
||||
settings->uints.menu_materialui_thumbnail_view_landscape++;
|
||||
configuration_set_uint(settings,
|
||||
settings->uints.menu_materialui_thumbnail_view_landscape,
|
||||
settings->uints.menu_materialui_thumbnail_view_landscape + 1);
|
||||
|
||||
if (settings->uints.menu_materialui_thumbnail_view_landscape >=
|
||||
MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LAST)
|
||||
@ -7486,6 +7490,7 @@ static void materialui_list_insert(
|
||||
materialui_node_t *node = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||
bool menu_materialui_icons_enable = settings->bools.menu_materialui_icons_enable;
|
||||
bool thumbnail_reset = false;
|
||||
|
||||
if (!mui || !list)
|
||||
@ -7523,7 +7528,7 @@ static void materialui_list_insert(
|
||||
gfx_thumbnail_reset(&node->thumbnails.secondary);
|
||||
}
|
||||
|
||||
if (settings->bools.menu_materialui_icons_enable)
|
||||
if (menu_materialui_icons_enable)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
@ -4533,8 +4533,9 @@ static void rgui_set_texture(void)
|
||||
/* Uh oh... This could mean we don't have enough
|
||||
* memory, so disable upscaling and draw the usual
|
||||
* framebuffer... */
|
||||
settings->uints.menu_rgui_internal_upscale_level =
|
||||
RGUI_UPSCALE_NONE;
|
||||
configuration_set_uint(settings,
|
||||
settings->uints.menu_rgui_internal_upscale_level,
|
||||
RGUI_UPSCALE_NONE);
|
||||
video_driver_set_texture_frame(rgui_frame_buf.data,
|
||||
false, fb_width, fb_height, 1.0f);
|
||||
return;
|
||||
@ -5090,15 +5091,11 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
|
||||
}
|
||||
|
||||
if (settings->uints.menu_rgui_color_theme != rgui->color_theme)
|
||||
{
|
||||
prepare_rgui_colors(rgui, settings);
|
||||
}
|
||||
else if (settings->uints.menu_rgui_color_theme == RGUI_THEME_CUSTOM)
|
||||
{
|
||||
if (string_is_not_equal_fast(settings->paths.path_rgui_theme_preset, rgui->theme_preset_path, sizeof(rgui->theme_preset_path)))
|
||||
{
|
||||
prepare_rgui_colors(rgui, settings);
|
||||
}
|
||||
}
|
||||
|
||||
/* Note: both rgui_set_aspect_ratio() and rgui_set_video_config()
|
||||
|
Loading…
Reference in New Issue
Block a user