summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-08-06 05:29:38 +0200
committerbunnei <bunneidev@gmail.com>2014-08-07 00:20:01 +0200
commit7ada2625fe78b7bb75232282ead77786ca215d6e (patch)
treed5727af668a1f8b5311b898feda7ab705ee8cc81 /src/core
parentThread: Added more descriptive comment to WaitCurrentThread. (diff)
downloadyuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar.gz
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar.bz2
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar.lz
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar.xz
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.tar.zst
yuzu-7ada2625fe78b7bb75232282ead77786ca215d6e.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hw/gpu.cpp5
1 files changed, 3 insertions, 2 deletions
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<u8>(u32 addr, const u8 data);
/// Update hardware
void Update() {
+ auto& framebuffer_top = g_regs.Get<Regs::FramebufferTop>();
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();