mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 06:00:05 +00:00
CoreTiming: use named constant for ARM11 clock rate
This commit is contained in:
parent
3c333c53f1
commit
47960b0659
@ -13,7 +13,7 @@
|
|||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
|
|
||||||
int g_clock_rate_arm11 = 268123480;
|
int g_clock_rate_arm11 = BASE_CLOCK_RATE_ARM11;
|
||||||
|
|
||||||
// is this really necessary?
|
// is this really necessary?
|
||||||
#define INITIAL_SLICE_LENGTH 20000
|
#define INITIAL_SLICE_LENGTH 20000
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
// inside callback:
|
// inside callback:
|
||||||
// ScheduleEvent(periodInCycles - cycles_late, callback, "whatever")
|
// ScheduleEvent(periodInCycles - cycles_late, callback, "whatever")
|
||||||
|
|
||||||
|
constexpr int BASE_CLOCK_RATE_ARM11 = 268123480;
|
||||||
extern int g_clock_rate_arm11;
|
extern int g_clock_rate_arm11;
|
||||||
|
|
||||||
inline s64 msToCycles(int ms) {
|
inline s64 msToCycles(int ms) {
|
||||||
|
@ -40,9 +40,9 @@ static int accelerometer_update_event;
|
|||||||
static int gyroscope_update_event;
|
static int gyroscope_update_event;
|
||||||
|
|
||||||
// Updating period for each HID device. These empirical values are measured from a 11.2 3DS.
|
// Updating period for each HID device. These empirical values are measured from a 11.2 3DS.
|
||||||
constexpr u64 pad_update_ticks = 268123480ull / 234;
|
constexpr u64 pad_update_ticks = BASE_CLOCK_RATE_ARM11 / 234;
|
||||||
constexpr u64 accelerometer_update_ticks = 268123480ull / 104;
|
constexpr u64 accelerometer_update_ticks = BASE_CLOCK_RATE_ARM11 / 104;
|
||||||
constexpr u64 gyroscope_update_ticks = 268123480ull / 101;
|
constexpr u64 gyroscope_update_ticks = BASE_CLOCK_RATE_ARM11 / 101;
|
||||||
|
|
||||||
static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) {
|
static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) {
|
||||||
// 30 degree and 60 degree are angular thresholds for directions
|
// 30 degree and 60 degree are angular thresholds for directions
|
||||||
|
@ -32,7 +32,7 @@ namespace GPU {
|
|||||||
Regs g_regs;
|
Regs g_regs;
|
||||||
|
|
||||||
/// 268MHz CPU clocks / 60Hz frames per second
|
/// 268MHz CPU clocks / 60Hz frames per second
|
||||||
const u64 frame_ticks = 268123480ull / 60;
|
const u64 frame_ticks = BASE_CLOCK_RATE_ARM11 / 60;
|
||||||
/// Event id for CoreTiming
|
/// Event id for CoreTiming
|
||||||
static int vblank_event;
|
static int vblank_event;
|
||||||
/// Total number of frames drawn
|
/// Total number of frames drawn
|
||||||
|
Loading…
Reference in New Issue
Block a user