diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core_timing.cpp | 2 | ||||
| -rw-r--r-- | src/core/core_timing.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 6 | ||||
| -rw-r--r-- | src/core/hw/gpu.cpp | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index a437d0823..276ecfdf6 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include "core/core.h" | 13 | #include "core/core.h" |
| 14 | #include "core/core_timing.h" | 14 | #include "core/core_timing.h" |
| 15 | 15 | ||
| 16 | int g_clock_rate_arm11 = 268123480; | 16 | int g_clock_rate_arm11 = BASE_CLOCK_RATE_ARM11; |
| 17 | 17 | ||
| 18 | // is this really necessary? | 18 | // is this really necessary? |
| 19 | #define INITIAL_SLICE_LENGTH 20000 | 19 | #define INITIAL_SLICE_LENGTH 20000 |
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index b72a1b500..d2f85cd4d 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | // inside callback: | 21 | // inside callback: |
| 22 | // ScheduleEvent(periodInCycles - cycles_late, callback, "whatever") | 22 | // ScheduleEvent(periodInCycles - cycles_late, callback, "whatever") |
| 23 | 23 | ||
| 24 | constexpr int BASE_CLOCK_RATE_ARM11 = 268123480; | ||
| 24 | extern int g_clock_rate_arm11; | 25 | extern int g_clock_rate_arm11; |
| 25 | 26 | ||
| 26 | inline s64 msToCycles(int ms) { | 27 | inline s64 msToCycles(int ms) { |
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 9e4a7f888..9bca97c1c 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -40,9 +40,9 @@ static int accelerometer_update_event; | |||
| 40 | static int gyroscope_update_event; | 40 | static int gyroscope_update_event; |
| 41 | 41 | ||
| 42 | // Updating period for each HID device. These empirical values are measured from a 11.2 3DS. | 42 | // Updating period for each HID device. These empirical values are measured from a 11.2 3DS. |
| 43 | constexpr u64 pad_update_ticks = 268123480ull / 234; | 43 | constexpr u64 pad_update_ticks = BASE_CLOCK_RATE_ARM11 / 234; |
| 44 | constexpr u64 accelerometer_update_ticks = 268123480ull / 104; | 44 | constexpr u64 accelerometer_update_ticks = BASE_CLOCK_RATE_ARM11 / 104; |
| 45 | constexpr u64 gyroscope_update_ticks = 268123480ull / 101; | 45 | constexpr u64 gyroscope_update_ticks = BASE_CLOCK_RATE_ARM11 / 101; |
| 46 | 46 | ||
| 47 | static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { | 47 | static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { |
| 48 | // 30 degree and 60 degree are angular thresholds for directions | 48 | // 30 degree and 60 degree are angular thresholds for directions |
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 58c0d9908..fa8c13d36 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -32,7 +32,7 @@ namespace GPU { | |||
| 32 | Regs g_regs; | 32 | Regs g_regs; |
| 33 | 33 | ||
| 34 | /// 268MHz CPU clocks / 60Hz frames per second | 34 | /// 268MHz CPU clocks / 60Hz frames per second |
| 35 | const u64 frame_ticks = 268123480ull / 60; | 35 | const u64 frame_ticks = BASE_CLOCK_RATE_ARM11 / 60; |
| 36 | /// Event id for CoreTiming | 36 | /// Event id for CoreTiming |
| 37 | static int vblank_event; | 37 | static int vblank_event; |
| 38 | /// Total number of frames drawn | 38 | /// Total number of frames drawn |