From 7ada2625fe78b7bb75232282ead77786ca215d6e Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 5 Aug 2014 23:29:38 -0400 Subject: GPU: Updated horizontal sync line counter to use framebuffer height. --- src/core/hw/gpu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/hw') diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 93b871470..7fb208e57 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp @@ -252,17 +252,18 @@ template void Write(u32 addr, const u8 data); /// Update hardware void Update() { + auto& framebuffer_top = g_regs.Get(); u64 current_ticks = Core::g_app_core->GetTicks(); // Synchronize line... - if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / 400) { + if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / framebuffer_top.height) { GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0); g_cur_line++; g_last_ticks = current_ticks; } // Synchronize frame... - if (g_cur_line >= 400) { + if (g_cur_line >= framebuffer_top.height) { g_cur_line = 0; GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1); VideoCore::g_renderer->SwapBuffers(); -- cgit v1.2.3