mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 17:50:56 +00:00
RGUI integer scale fix (#17099)
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
This commit is contained in:
parent
73b9a5e899
commit
73fc26c132
@ -2367,11 +2367,14 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
||||
#if defined(RARCH_MOBILE)
|
||||
if (width < height)
|
||||
{
|
||||
viewport_bias_x = settings->floats.video_viewport_bias_portrait_x;
|
||||
viewport_bias_y = settings->floats.video_viewport_bias_portrait_y;
|
||||
viewport_bias_x = settings->floats.video_viewport_bias_portrait_x;
|
||||
viewport_bias_y = settings->floats.video_viewport_bias_portrait_y;
|
||||
}
|
||||
#endif
|
||||
|
||||
content_width = (content_width == 4) ? video_st->av_info.geometry.base_width : content_width;
|
||||
content_height = (content_height == 4) ? video_st->av_info.geometry.base_height : content_height;
|
||||
|
||||
if (!ydown)
|
||||
viewport_bias_y = 1.0 - viewport_bias_y;
|
||||
|
||||
@ -2389,7 +2392,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
||||
if (content_width < 2 || content_height < 2)
|
||||
return;
|
||||
|
||||
content_width = (content_width > width) ? width : content_width;
|
||||
content_width = (content_width > width) ? width : content_width;
|
||||
content_height = (content_height > height) ? height : content_height;
|
||||
|
||||
if (video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
@ -2481,7 +2484,10 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
||||
uint8_t i = 0;
|
||||
|
||||
/* Reset width to exact width */
|
||||
content_width = (rotation % 2) ? video_st->frame_cache_height : video_st->frame_cache_width;
|
||||
content_width = (rotation % 2)
|
||||
? ((video_st->frame_cache_height == 4) ? video_st->av_info.geometry.base_height : video_st->frame_cache_height)
|
||||
: ((video_st->frame_cache_width == 4) ? video_st->av_info.geometry.base_width : video_st->frame_cache_width);
|
||||
|
||||
overscale_w = (width / content_width) + !!(width % content_width);
|
||||
|
||||
/* Populate the ratios */
|
||||
|
Loading…
Reference in New Issue
Block a user