mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
rsx: Add some sensible fallbacks (#11219)
* rsx: Add some sensible fallbacks * Update GLPresent.cpp * Update VKPresent.cpp * Update rsx_utils.h * Update rsx_utils.cpp
This commit is contained in:
parent
0ab36ef44d
commit
02832d9623
@ -131,6 +131,12 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
|
|||||||
u32 av_format;
|
u32 av_format;
|
||||||
const auto& avconfig = g_fxo->get<rsx::avconf>();
|
const auto& avconfig = g_fxo->get<rsx::avconf>();
|
||||||
|
|
||||||
|
if (!buffer_width)
|
||||||
|
{
|
||||||
|
buffer_width = avconfig.resolution_x;
|
||||||
|
buffer_height = avconfig.resolution_y;
|
||||||
|
}
|
||||||
|
|
||||||
if (avconfig.state)
|
if (avconfig.state)
|
||||||
{
|
{
|
||||||
av_format = avconfig.get_compatible_gcm_format();
|
av_format = avconfig.get_compatible_gcm_format();
|
||||||
|
@ -448,6 +448,12 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
|
|||||||
u32 av_format;
|
u32 av_format;
|
||||||
const auto& avconfig = g_fxo->get<rsx::avconf>();
|
const auto& avconfig = g_fxo->get<rsx::avconf>();
|
||||||
|
|
||||||
|
if (!buffer_width)
|
||||||
|
{
|
||||||
|
buffer_width = avconfig.resolution_x;
|
||||||
|
buffer_height = avconfig.resolution_y;
|
||||||
|
}
|
||||||
|
|
||||||
if (avconfig.state)
|
if (avconfig.state)
|
||||||
{
|
{
|
||||||
av_format = avconfig.get_compatible_gcm_format();
|
av_format = avconfig.get_compatible_gcm_format();
|
||||||
|
@ -135,6 +135,20 @@ namespace rsx
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avconf::avconf() noexcept
|
||||||
|
{
|
||||||
|
switch (g_cfg.video.aspect_ratio)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case video_aspect::_16_9:
|
||||||
|
aspect = CELL_VIDEO_OUT_ASPECT_16_9;
|
||||||
|
break;
|
||||||
|
case video_aspect::_4_3:
|
||||||
|
aspect = CELL_VIDEO_OUT_ASPECT_4_3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
u32 avconf::get_compatible_gcm_format() const
|
u32 avconf::get_compatible_gcm_format() const
|
||||||
{
|
{
|
||||||
switch (format)
|
switch (format)
|
||||||
|
@ -161,6 +161,9 @@ namespace rsx
|
|||||||
u32 resolution_y = 720; // Y RES
|
u32 resolution_y = 720; // Y RES
|
||||||
atomic_t<u32> state = 0; // 1 after cellVideoOutConfigure was called
|
atomic_t<u32> state = 0; // 1 after cellVideoOutConfigure was called
|
||||||
|
|
||||||
|
avconf() noexcept;
|
||||||
|
~avconf() = default;
|
||||||
|
|
||||||
u32 get_compatible_gcm_format() const;
|
u32 get_compatible_gcm_format() const;
|
||||||
u8 get_bpp() const;
|
u8 get_bpp() const;
|
||||||
double get_aspect_ratio() const;
|
double get_aspect_ratio() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user