summaryrefslogtreecommitdiff
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-08-05 23:33:26 -0400
committerGravatar bunnei2014-08-06 18:20:02 -0400
commit0805ecbaca70159ccc3d43c643b4ade7168795bc (patch)
treea2e85ca4b091042e2e45446fda5b36bf6f62d2b3 /src/core/hw/gpu.cpp
parentGPU: Updated horizontal sync line counter to use framebuffer height. (diff)
downloadyuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.gz
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.tar.xz
yuzu-0805ecbaca70159ccc3d43c643b4ade7168795bc.zip
GPU: Updated g_last_ticks variable to be more descriptive (represents CPU tick count of last vertical line).
Diffstat (limited to 'src/core/hw/gpu.cpp')
-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 {
21 21
22RegisterSet<u32, Regs> g_regs; 22RegisterSet<u32, Regs> g_regs;
23 23
24u32 g_cur_line = 0; ///< Current vertical screen line 24u32 g_cur_line = 0; ///< Current vertical screen line
25u64 g_last_ticks = 0; ///< Last CPU ticks 25u64 g_last_line_ticks = 0; ///< CPU tick count from last vertical screen line
26 26
27/** 27/**
28 * Sets whether the framebuffers are in the GSP heap (FCRAM) or VRAM 28 * Sets whether the framebuffers are in the GSP heap (FCRAM) or VRAM
@@ -256,10 +256,10 @@ void Update() {
256 u64 current_ticks = Core::g_app_core->GetTicks(); 256 u64 current_ticks = Core::g_app_core->GetTicks();
257 257
258 // Synchronize line... 258 // Synchronize line...
259 if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / framebuffer_top.height) { 259 if ((current_ticks - g_last_line_ticks) >= GPU::kFrameTicks / framebuffer_top.height) {
260 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0); 260 GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0);
261 g_cur_line++; 261 g_cur_line++;
262 g_last_ticks = current_ticks; 262 g_last_line_ticks = current_ticks;
263 } 263 }
264 264
265 // Synchronize frame... 265 // Synchronize frame...
@@ -275,7 +275,7 @@ void Update() {
275/// Initialize hardware 275/// Initialize hardware
276void Init() { 276void Init() {
277 g_cur_line = 0; 277 g_cur_line = 0;
278 g_last_ticks = Core::g_app_core->GetTicks(); 278 g_last_line_ticks = Core::g_app_core->GetTicks();
279 279
280// SetFramebufferLocation(FRAMEBUFFER_LOCATION_FCRAM); 280// SetFramebufferLocation(FRAMEBUFFER_LOCATION_FCRAM);
281 SetFramebufferLocation(FRAMEBUFFER_LOCATION_VRAM); 281 SetFramebufferLocation(FRAMEBUFFER_LOCATION_VRAM);