summaryrefslogtreecommitdiff
path: root/src/core/hw
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hw')
-rw-r--r--src/core/hw/gpu.cpp4
-rw-r--r--src/core/hw/gpu.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index fa8c13d36..7cf081aad 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -32,7 +32,7 @@ namespace GPU {
32Regs g_regs; 32Regs g_regs;
33 33
34/// 268MHz CPU clocks / 60Hz frames per second 34/// 268MHz CPU clocks / 60Hz frames per second
35const u64 frame_ticks = BASE_CLOCK_RATE_ARM11 / 60; 35const u64 frame_ticks = BASE_CLOCK_RATE_ARM11 / SCREEN_REFRESH_RATE;
36/// Event id for CoreTiming 36/// Event id for CoreTiming
37static int vblank_event; 37static int vblank_event;
38/// Total number of frames drawn 38/// Total number of frames drawn
@@ -41,7 +41,7 @@ static u64 frame_count;
41static u32 time_point; 41static u32 time_point;
42/// Total delay caused by slow frames 42/// Total delay caused by slow frames
43static float time_delay; 43static float time_delay;
44constexpr float FIXED_FRAME_TIME = 1000.0f / 60; 44constexpr float FIXED_FRAME_TIME = 1000.0f / SCREEN_REFRESH_RATE;
45// Max lag caused by slow frames. Can be adjusted to compensate for too many slow frames. Higher 45// Max lag caused by slow frames. Can be adjusted to compensate for too many slow frames. Higher
46// values increases time needed to limit frame rate after spikes 46// values increases time needed to limit frame rate after spikes
47constexpr float MAX_LAG_TIME = 18; 47constexpr float MAX_LAG_TIME = 18;
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index d53381216..bdd997b2a 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -13,6 +13,8 @@
13 13
14namespace GPU { 14namespace GPU {
15 15
16constexpr float SCREEN_REFRESH_RATE = 60;
17
16// Returns index corresponding to the Regs member labeled by field_name 18// Returns index corresponding to the Regs member labeled by field_name
17// TODO: Due to Visual studio bug 209229, offsetof does not return constant expressions 19// TODO: Due to Visual studio bug 209229, offsetof does not return constant expressions
18// when used with array elements (e.g. GPU_REG_INDEX(memory_fill_config[0])). 20// when used with array elements (e.g. GPU_REG_INDEX(memory_fill_config[0])).