mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Merge pull request #12287 from LazyFunker/master
Some fixes for UWP/XBox
This commit is contained in:
commit
89391ccf9a
@ -225,6 +225,9 @@
|
|||||||
#define DEFAULT_FULLSCREEN_Y 0
|
#define DEFAULT_FULLSCREEN_Y 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Force 4k resolution */
|
||||||
|
#define DEFAULT_FORCE_RESOLUTION false
|
||||||
|
|
||||||
/* Number of threads to use for video recording */
|
/* Number of threads to use for video recording */
|
||||||
#define DEFAULT_VIDEO_RECORD_THREADS 2
|
#define DEFAULT_VIDEO_RECORD_THREADS 2
|
||||||
|
|
||||||
|
@ -1532,6 +1532,9 @@ static struct config_bool_setting *populate_settings_bool(
|
|||||||
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, DEFAULT_AUTO_SCREENSHOT_FILENAME, false);
|
SETTING_BOOL("auto_screenshot_filename", &settings->bools.auto_screenshot_filename, true, DEFAULT_AUTO_SCREENSHOT_FILENAME, false);
|
||||||
SETTING_BOOL("video_force_srgb_disable", &settings->bools.video_force_srgb_disable, true, false, 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, DEFAULT_FULLSCREEN, false);
|
SETTING_BOOL("video_fullscreen", &settings->bools.video_fullscreen, true, DEFAULT_FULLSCREEN, false);
|
||||||
|
#ifdef __WINRT__
|
||||||
|
SETTING_BOOL("video_force_resolution", &settings->bools.video_force_resolution, true, DEFAULT_FORCE_RESOLUTION, false);
|
||||||
|
#endif
|
||||||
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE, false);
|
SETTING_BOOL("bundle_assets_extract_enable", &settings->bools.bundle_assets_extract_enable, true, DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE, false);
|
||||||
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, DEFAULT_VSYNC, false);
|
SETTING_BOOL("video_vsync", &settings->bools.video_vsync, true, DEFAULT_VSYNC, false);
|
||||||
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, DEFAULT_ADAPTIVE_VSYNC, false);
|
SETTING_BOOL("video_adaptive_vsync", &settings->bools.video_adaptive_vsync, true, DEFAULT_ADAPTIVE_VSYNC, false);
|
||||||
|
@ -516,6 +516,7 @@ typedef struct settings
|
|||||||
#ifdef HAVE_VIDEO_LAYOUT
|
#ifdef HAVE_VIDEO_LAYOUT
|
||||||
bool video_layout_enable;
|
bool video_layout_enable;
|
||||||
#endif
|
#endif
|
||||||
|
bool video_force_resolution;
|
||||||
|
|
||||||
/* Accessibility */
|
/* Accessibility */
|
||||||
bool accessibility_enable;
|
bool accessibility_enable;
|
||||||
|
@ -1811,13 +1811,17 @@ static uintptr_t d3d11_gfx_load_texture(
|
|||||||
switch (filter_type)
|
switch (filter_type)
|
||||||
{
|
{
|
||||||
case TEXTURE_FILTER_MIPMAP_LINEAR:
|
case TEXTURE_FILTER_MIPMAP_LINEAR:
|
||||||
|
#ifdef __WINRT__
|
||||||
texture->desc.MiscFlags = D3D11_RESOURCE_MISC_GENERATE_MIPS;
|
texture->desc.MiscFlags = D3D11_RESOURCE_MISC_GENERATE_MIPS;
|
||||||
|
#endif
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case TEXTURE_FILTER_LINEAR:
|
case TEXTURE_FILTER_LINEAR:
|
||||||
texture->sampler = d3d11->samplers[RARCH_FILTER_LINEAR][RARCH_WRAP_EDGE];
|
texture->sampler = d3d11->samplers[RARCH_FILTER_LINEAR][RARCH_WRAP_EDGE];
|
||||||
break;
|
break;
|
||||||
case TEXTURE_FILTER_MIPMAP_NEAREST:
|
case TEXTURE_FILTER_MIPMAP_NEAREST:
|
||||||
|
#ifdef __WINRT__
|
||||||
texture->desc.MiscFlags = D3D11_RESOURCE_MISC_GENERATE_MIPS;
|
texture->desc.MiscFlags = D3D11_RESOURCE_MISC_GENERATE_MIPS;
|
||||||
|
#endif
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case TEXTURE_FILTER_NEAREST:
|
case TEXTURE_FILTER_NEAREST:
|
||||||
texture->sampler = d3d11->samplers[RARCH_FILTER_NEAREST][RARCH_WRAP_EDGE];
|
texture->sampler = d3d11->samplers[RARCH_FILTER_NEAREST][RARCH_WRAP_EDGE];
|
||||||
|
@ -3498,6 +3498,10 @@ MSG_HASH(
|
|||||||
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
|
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
|
||||||
"video_fullscreen_y"
|
"video_fullscreen_y"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VIDEO_FORCE_RESOLUTION,
|
||||||
|
"video_force_resolution"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VIDEO_LAYOUT_ENABLE,
|
MENU_ENUM_LABEL_VIDEO_LAYOUT_ENABLE,
|
||||||
"video_layout_enable"
|
"video_layout_enable"
|
||||||
|
@ -1561,6 +1561,14 @@ MSG_HASH(
|
|||||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_RESOLUTION,
|
||||||
|
"Force resolution on UWP"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_SUBLABEL_VIDEO_FORCE_RESOLUTION,
|
||||||
|
"Force the resolution to the fullscreen size, if set to 0, a fixed value of 3840 x 2160 will be used."
|
||||||
|
)
|
||||||
|
|
||||||
/* Settings > Video > Windowed Mode */
|
/* Settings > Video > Windowed Mode */
|
||||||
|
|
||||||
|
@ -432,6 +432,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_width, MENU_
|
|||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_fullscreen_y, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_fullscreen_y, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y)
|
||||||
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_force_resolution, MENU_ENUM_SUBLABEL_VIDEO_FORCE_RESOLUTION)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_save_window_position, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_save_window_position, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_message_pos_x, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_message_pos_x, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_message_pos_y, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_message_pos_y, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y)
|
||||||
@ -3272,6 +3273,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||||||
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y:
|
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_fullscreen_y);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_fullscreen_y);
|
||||||
break;
|
break;
|
||||||
|
case MENU_ENUM_LABEL_VIDEO_FORCE_RESOLUTION:
|
||||||
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_force_resolution);
|
||||||
|
break;
|
||||||
case MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION:
|
case MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_save_window_position);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_save_window_position);
|
||||||
break;
|
break;
|
||||||
|
@ -7456,6 +7456,12 @@ unsigned menu_displaylist_build_list(
|
|||||||
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
|
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
|
||||||
PARSE_ONLY_UINT, false) == 0)
|
PARSE_ONLY_UINT, false) == 0)
|
||||||
count++;
|
count++;
|
||||||
|
#ifdef __WINRT__
|
||||||
|
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_FORCE_RESOLUTION,
|
||||||
|
PARSE_ONLY_BOOL, false) == 0)
|
||||||
|
count++;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_VIDEO_OUTPUT_SETTINGS_LIST:
|
case DISPLAYLIST_VIDEO_OUTPUT_SETTINGS_LIST:
|
||||||
{
|
{
|
||||||
|
@ -10703,6 +10703,23 @@ static bool setting_append_list(
|
|||||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
|
||||||
menu_settings_list_current_add_range(list, list_info, 0, 4320, 8, true, true);
|
menu_settings_list_current_add_range(list, list_info, 0, 4320, 8, true, true);
|
||||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
|
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
|
||||||
|
|
||||||
|
CONFIG_BOOL(
|
||||||
|
list, list_info,
|
||||||
|
&settings->bools.video_force_resolution,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_FORCE_RESOLUTION,
|
||||||
|
MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_RESOLUTION,
|
||||||
|
DEFAULT_FORCE_RESOLUTION,
|
||||||
|
MENU_ENUM_LABEL_VALUE_OFF,
|
||||||
|
MENU_ENUM_LABEL_VALUE_ON,
|
||||||
|
&group_info,
|
||||||
|
&subgroup_info,
|
||||||
|
parent_group,
|
||||||
|
general_write_handler,
|
||||||
|
general_read_handler,
|
||||||
|
SD_FLAG_CMD_APPLY_AUTO);
|
||||||
|
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_REINIT_FROM_TOGGLE);
|
||||||
|
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(DINGUX_BETA)
|
#if defined(DINGUX) && defined(DINGUX_BETA)
|
||||||
|
@ -1033,6 +1033,7 @@ enum msg_hash_enums
|
|||||||
MENU_LABEL(VIDEO_WINDOW_OPACITY),
|
MENU_LABEL(VIDEO_WINDOW_OPACITY),
|
||||||
MENU_LABEL(VIDEO_FULLSCREEN_X),
|
MENU_LABEL(VIDEO_FULLSCREEN_X),
|
||||||
MENU_LABEL(VIDEO_FULLSCREEN_Y),
|
MENU_LABEL(VIDEO_FULLSCREEN_Y),
|
||||||
|
MENU_LABEL(VIDEO_FORCE_RESOLUTION),
|
||||||
MENU_LABEL(VIDEO_FORCE_SRGB_DISABLE),
|
MENU_LABEL(VIDEO_FORCE_SRGB_DISABLE),
|
||||||
MENU_LABEL(VIDEO_ROTATION),
|
MENU_LABEL(VIDEO_ROTATION),
|
||||||
MENU_LABEL(SCREEN_ORIENTATION),
|
MENU_LABEL(SCREEN_ORIENTATION),
|
||||||
|
@ -30273,6 +30273,14 @@ static bool video_driver_init_internal(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WINRT__
|
||||||
|
if (settings->bools.video_force_resolution)
|
||||||
|
{
|
||||||
|
width = settings->uints.video_fullscreen_x != 0 ? settings->uints.video_fullscreen_x : 3840;
|
||||||
|
height = settings->uints.video_fullscreen_y != 0 ? settings->uints.video_fullscreen_y : 2160;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (width && height)
|
if (width && height)
|
||||||
RARCH_LOG("[Video]: Video @ %ux%u\n", width, height);
|
RARCH_LOG("[Video]: Video @ %ux%u\n", width, height);
|
||||||
else
|
else
|
||||||
|
@ -669,6 +669,14 @@ extern "C" {
|
|||||||
bool *quit, bool *resize, unsigned *width, unsigned *height)
|
bool *quit, bool *resize, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
*quit = App::GetInstance()->IsWindowClosed();
|
*quit = App::GetInstance()->IsWindowClosed();
|
||||||
|
settings_t* settings = config_get_ptr();
|
||||||
|
if (settings->bools.video_force_resolution)
|
||||||
|
{
|
||||||
|
*width = settings->uints.video_fullscreen_x != 0 ? settings->uints.video_fullscreen_x : 3840;
|
||||||
|
*height = settings->uints.video_fullscreen_y != 0 ? settings->uints.video_fullscreen_y : 2160;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
*resize = App::GetInstance()->CheckWindowResized();
|
*resize = App::GetInstance()->CheckWindowResized();
|
||||||
if (*resize)
|
if (*resize)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user