summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-08-06 05:33:26 +0200
committerbunnei <bunneidev@gmail.com>2014-08-07 00:20:02 +0200
commit0805ecbaca70159ccc3d43c643b4ade7168795bc (patch)
treea2e85ca4b091042e2e45446fda5b36bf6f62d2b3 /src
parentGPU: Updated horizontal sync line counter to use framebuffer height. (diff)
downloadyuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.gz
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.bz2
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.lz
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.xz
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.zst
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hw/gpu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 7fb208e57..d94c2329b 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -21,8 +21,8 @@ namespace GPU {
RegisterSet<u32, Regs> g_regs;
-u32 g_cur_line = 0; ///< Current vertical screen line
-u64 g_last_ticks = 0; ///< Last CPU ticks
+u32 g_cur_line = 0; ///< Current vertical screen line
+u64 g_last_line_ticks = 0; ///< CPU tick count from last vertical screen line
/**
* Sets whether the framebuffers are in the GSP heap (FCRAM) or VRAM
@@ -256,10 +256,10 @@ void Update() {
u64 current_ticks = Core::g_app_core->GetTicks();
// Synchronize line...
- if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / framebuffer_top.height) {
+ if ((current_ticks - g_last_line_ticks) >= GPU::kFrameTicks / framebuffer_top.height) {
GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0);
g_cur_line++;
- g_last_ticks = current_ticks;
+ g_last_line_ticks = current_ticks;
}
// Synchronize frame...
@@ -275,7 +275,7 @@ void Update() {
/// Initialize hardware
void Init() {
g_cur_line = 0;
- g_last_ticks = Core::g_app_core->GetTicks();
+ g_last_line_ticks = Core::g_app_core->GetTicks();
// SetFramebufferLocation(FRAMEBUFFER_LOCATION_FCRAM);
SetFramebufferLocation(FRAMEBUFFER_LOCATION_VRAM);