mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +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 */
|
/* Context reset is called on launch or when a core is launched */
|
||||||
static void materialui_context_reset(void *data, bool is_threaded)
|
static void materialui_context_reset(void *data, bool is_threaded)
|
||||||
{
|
{
|
||||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
const char *path_menu_wallpaper = settings ? settings->paths.path_menu_wallpaper : NULL;
|
||||||
|
|
||||||
if (!mui || !settings)
|
if (!mui || !settings)
|
||||||
return;
|
return;
|
||||||
@ -6257,18 +6258,16 @@ static void materialui_context_reset(void *data, bool is_threaded)
|
|||||||
gfx_display_allocate_white_texture();
|
gfx_display_allocate_white_texture();
|
||||||
materialui_context_reset_textures(mui);
|
materialui_context_reset_textures(mui);
|
||||||
|
|
||||||
{
|
if (path_is_valid(path_menu_wallpaper))
|
||||||
const char *path_menu_wallpaper = settings->paths.path_menu_wallpaper;
|
task_push_image_load(path_menu_wallpaper,
|
||||||
if (path_is_valid(path_menu_wallpaper))
|
video_driver_supports_rgba(), 0,
|
||||||
task_push_image_load(path_menu_wallpaper,
|
menu_display_handle_wallpaper_upload, NULL);
|
||||||
video_driver_supports_rgba(), 0,
|
|
||||||
menu_display_handle_wallpaper_upload, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
video_driver_monitor_reset();
|
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;
|
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 */
|
/* Update setting based upon current display orientation */
|
||||||
if (mui->is_portrait)
|
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 >=
|
if (settings->uints.menu_materialui_thumbnail_view_portrait >=
|
||||||
MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LAST)
|
MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LAST)
|
||||||
@ -7247,7 +7249,9 @@ static void materialui_switch_list_view(materialui_handle_t *mui)
|
|||||||
}
|
}
|
||||||
else
|
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 >=
|
if (settings->uints.menu_materialui_thumbnail_view_landscape >=
|
||||||
MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LAST)
|
MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LAST)
|
||||||
@ -7486,6 +7490,7 @@ static void materialui_list_insert(
|
|||||||
materialui_node_t *node = NULL;
|
materialui_node_t *node = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
materialui_handle_t *mui = (materialui_handle_t*)userdata;
|
||||||
|
bool menu_materialui_icons_enable = settings->bools.menu_materialui_icons_enable;
|
||||||
bool thumbnail_reset = false;
|
bool thumbnail_reset = false;
|
||||||
|
|
||||||
if (!mui || !list)
|
if (!mui || !list)
|
||||||
@ -7523,7 +7528,7 @@ static void materialui_list_insert(
|
|||||||
gfx_thumbnail_reset(&node->thumbnails.secondary);
|
gfx_thumbnail_reset(&node->thumbnails.secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->bools.menu_materialui_icons_enable)
|
if (menu_materialui_icons_enable)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -4533,8 +4533,9 @@ static void rgui_set_texture(void)
|
|||||||
/* Uh oh... This could mean we don't have enough
|
/* Uh oh... This could mean we don't have enough
|
||||||
* memory, so disable upscaling and draw the usual
|
* memory, so disable upscaling and draw the usual
|
||||||
* framebuffer... */
|
* framebuffer... */
|
||||||
settings->uints.menu_rgui_internal_upscale_level =
|
configuration_set_uint(settings,
|
||||||
RGUI_UPSCALE_NONE;
|
settings->uints.menu_rgui_internal_upscale_level,
|
||||||
|
RGUI_UPSCALE_NONE);
|
||||||
video_driver_set_texture_frame(rgui_frame_buf.data,
|
video_driver_set_texture_frame(rgui_frame_buf.data,
|
||||||
false, fb_width, fb_height, 1.0f);
|
false, fb_width, fb_height, 1.0f);
|
||||||
return;
|
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)
|
if (settings->uints.menu_rgui_color_theme != rgui->color_theme)
|
||||||
{
|
|
||||||
prepare_rgui_colors(rgui, settings);
|
prepare_rgui_colors(rgui, settings);
|
||||||
}
|
|
||||||
else if (settings->uints.menu_rgui_color_theme == RGUI_THEME_CUSTOM)
|
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)))
|
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);
|
prepare_rgui_colors(rgui, settings);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: both rgui_set_aspect_ratio() and rgui_set_video_config()
|
/* Note: both rgui_set_aspect_ratio() and rgui_set_video_config()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user