diff options
| author | 2023-03-10 13:55:11 -0500 | |
|---|---|---|
| committer | 2023-03-10 13:55:11 -0500 | |
| commit | 021af4fd0016c49009e3c1ff51ff73aba75b9eb4 (patch) | |
| tree | c589832d3b517d96dae79b7263b92fe69a3457ba /src/core | |
| parent | Merge pull request #9916 from liamwhite/fpu (diff) | |
| parent | perf_stats: Check multicore first (diff) | |
| download | yuzu-021af4fd0016c49009e3c1ff51ff73aba75b9eb4.tar.gz yuzu-021af4fd0016c49009e3c1ff51ff73aba75b9eb4.tar.xz yuzu-021af4fd0016c49009e3c1ff51ff73aba75b9eb4.zip | |
Merge pull request #9917 from Morph1984/the-real-time
native_clock: Re-adjust the RDTSC frequency to its real frequency
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core_timing.cpp | 2 | ||||
| -rw-r--r-- | src/core/cpu_manager.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/stubbed.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/touchscreen.cpp | 8 | ||||
| -rw-r--r-- | src/core/perf_stats.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 742cfb996..cd4df4522 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -53,7 +53,7 @@ void CoreTiming::ThreadEntry(CoreTiming& instance) { | |||
| 53 | static constexpr char name[] = "HostTiming"; | 53 | static constexpr char name[] = "HostTiming"; |
| 54 | MicroProfileOnThreadCreate(name); | 54 | MicroProfileOnThreadCreate(name); |
| 55 | Common::SetCurrentThreadName(name); | 55 | Common::SetCurrentThreadName(name); |
| 56 | Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); | 56 | Common::SetCurrentThreadPriority(Common::ThreadPriority::High); |
| 57 | instance.on_thread_init(); | 57 | instance.on_thread_init(); |
| 58 | instance.ThreadLoop(); | 58 | instance.ThreadLoop(); |
| 59 | MicroProfileOnThreadExit(); | 59 | MicroProfileOnThreadExit(); |
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index 04a11f444..980bb97f9 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -192,7 +192,7 @@ void CpuManager::RunThread(std::stop_token token, std::size_t core) { | |||
| 192 | } | 192 | } |
| 193 | MicroProfileOnThreadCreate(name.c_str()); | 193 | MicroProfileOnThreadCreate(name.c_str()); |
| 194 | Common::SetCurrentThreadName(name.c_str()); | 194 | Common::SetCurrentThreadName(name.c_str()); |
| 195 | Common::SetCurrentThreadPriority(Common::ThreadPriority::High); | 195 | Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); |
| 196 | auto& data = core_data[core]; | 196 | auto& data = core_data[core]; |
| 197 | data.host_context = Common::Fiber::ThreadToFiber(); | 197 | data.host_context = Common::Fiber::ThreadToFiber(); |
| 198 | 198 | ||
diff --git a/src/core/hle/service/hid/controllers/stubbed.cpp b/src/core/hle/service/hid/controllers/stubbed.cpp index df9ee0c3f..9e2f3ab21 100644 --- a/src/core/hle/service/hid/controllers/stubbed.cpp +++ b/src/core/hle/service/hid/controllers/stubbed.cpp | |||
| @@ -26,7 +26,7 @@ void Controller_Stubbed::OnUpdate(const Core::Timing::CoreTiming& core_timing) { | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | CommonHeader header{}; | 28 | CommonHeader header{}; |
| 29 | header.timestamp = core_timing.GetCPUTicks(); | 29 | header.timestamp = core_timing.GetGlobalTimeNs().count(); |
| 30 | header.total_entry_count = 17; | 30 | header.total_entry_count = 17; |
| 31 | header.entry_count = 0; | 31 | header.entry_count = 0; |
| 32 | header.last_entry_index = 0; | 32 | header.last_entry_index = 0; |
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index d90a4e732..3ef91df4b 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp | |||
| @@ -32,7 +32,7 @@ void Controller_Touchscreen::OnInit() {} | |||
| 32 | void Controller_Touchscreen::OnRelease() {} | 32 | void Controller_Touchscreen::OnRelease() {} |
| 33 | 33 | ||
| 34 | void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timing) { | 34 | void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timing) { |
| 35 | shared_memory->touch_screen_lifo.timestamp = core_timing.GetCPUTicks(); | 35 | shared_memory->touch_screen_lifo.timestamp = core_timing.GetGlobalTimeNs().count(); |
| 36 | 36 | ||
| 37 | if (!IsControllerActivated()) { | 37 | if (!IsControllerActivated()) { |
| 38 | shared_memory->touch_screen_lifo.buffer_count = 0; | 38 | shared_memory->touch_screen_lifo.buffer_count = 0; |
| @@ -85,7 +85,7 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin | |||
| 85 | const auto active_fingers_count = | 85 | const auto active_fingers_count = |
| 86 | static_cast<std::size_t>(std::distance(active_fingers.begin(), end_iter)); | 86 | static_cast<std::size_t>(std::distance(active_fingers.begin(), end_iter)); |
| 87 | 87 | ||
| 88 | const u64 tick = core_timing.GetCPUTicks(); | 88 | const u64 timestamp = static_cast<u64>(core_timing.GetGlobalTimeNs().count()); |
| 89 | const auto& last_entry = shared_memory->touch_screen_lifo.ReadCurrentEntry().state; | 89 | const auto& last_entry = shared_memory->touch_screen_lifo.ReadCurrentEntry().state; |
| 90 | 90 | ||
| 91 | next_state.sampling_number = last_entry.sampling_number + 1; | 91 | next_state.sampling_number = last_entry.sampling_number + 1; |
| @@ -102,8 +102,8 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin | |||
| 102 | touch_entry.diameter_x = Settings::values.touchscreen.diameter_x; | 102 | touch_entry.diameter_x = Settings::values.touchscreen.diameter_x; |
| 103 | touch_entry.diameter_y = Settings::values.touchscreen.diameter_y; | 103 | touch_entry.diameter_y = Settings::values.touchscreen.diameter_y; |
| 104 | touch_entry.rotation_angle = Settings::values.touchscreen.rotation_angle; | 104 | touch_entry.rotation_angle = Settings::values.touchscreen.rotation_angle; |
| 105 | touch_entry.delta_time = tick - active_fingers[id].last_touch; | 105 | touch_entry.delta_time = timestamp - active_fingers[id].last_touch; |
| 106 | fingers[active_fingers[id].id].last_touch = tick; | 106 | fingers[active_fingers[id].id].last_touch = timestamp; |
| 107 | touch_entry.finger = active_fingers[id].id; | 107 | touch_entry.finger = active_fingers[id].id; |
| 108 | touch_entry.attribute.raw = active_fingers[id].attribute.raw; | 108 | touch_entry.attribute.raw = active_fingers[id].attribute.raw; |
| 109 | } else { | 109 | } else { |
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp index f09c176f8..1231c0dc8 100644 --- a/src/core/perf_stats.cpp +++ b/src/core/perf_stats.cpp | |||
| @@ -126,8 +126,8 @@ double PerfStats::GetLastFrameTimeScale() const { | |||
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | void SpeedLimiter::DoSpeedLimiting(microseconds current_system_time_us) { | 128 | void SpeedLimiter::DoSpeedLimiting(microseconds current_system_time_us) { |
| 129 | if (!Settings::values.use_speed_limit.GetValue() || | 129 | if (Settings::values.use_multi_core.GetValue() || |
| 130 | Settings::values.use_multi_core.GetValue()) { | 130 | !Settings::values.use_speed_limit.GetValue()) { |
| 131 | return; | 131 | return; |
| 132 | } | 132 | } |
| 133 | 133 | ||