Skip to content

Commit

Permalink
GPU: Fix 480i resolution display in OSD
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 21, 2024
1 parent 0aa89ec commit ad980a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ static TimingEvent s_command_tick_event(
"GPU Command Tick", 1, 1, [](void* param, TickCount ticks, TickCount ticks_late) { g_gpu.CommandTickEvent(ticks); },
nullptr);
static TimingEvent s_frame_done_event(
"Frame Done", 1, 1, [](void* param, TickCount ticks, TickCount ticks_late) { g_gpu.FrameDoneEvent(ticks); },
nullptr);
"Frame Done", 1, 1, [](void* param, TickCount ticks, TickCount ticks_late) { g_gpu.FrameDoneEvent(ticks); }, nullptr);

// #define PSX_GPU_STATS
#ifdef PSX_GPU_STATS
Expand Down Expand Up @@ -160,8 +159,10 @@ std::tuple<u32, u32> GPU::GetFullDisplayResolution() const
std::clamp<s32>(m_crtc_state.regs.X1, xmin, xmax),
0) /
m_crtc_state.dot_clock_divider);
height = static_cast<u32>(std::max<s32>(
std::clamp<s32>(m_crtc_state.regs.Y2, ymin, ymax) - std::clamp<s32>(m_crtc_state.regs.Y1, ymin, ymax), 0));
height =
static_cast<u32>(std::max<s32>(
std::clamp<s32>(m_crtc_state.regs.Y2, ymin, ymax) - std::clamp<s32>(m_crtc_state.regs.Y1, ymin, ymax), 0))
<< BoolToUInt8(m_GPUSTAT.vertical_interlace && m_GPUSTAT.vertical_resolution);
}

return std::tie(width, height);
Expand Down

0 comments on commit ad980a7

Please sign in to comment.