summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/kernel.cpp3
-rw-r--r--src/core/hle/service/hid/hid.cpp7
-rw-r--r--src/core/hle/service/hid/hidbus.cpp2
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp6
4 files changed, 8 insertions, 10 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index ee91a9b68..7307cf262 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -245,8 +245,7 @@ struct KernelCore::Impl {
245 }); 245 });
246 246
247 const auto time_interval = std::chrono::nanoseconds{std::chrono::milliseconds(10)}; 247 const auto time_interval = std::chrono::nanoseconds{std::chrono::milliseconds(10)};
248 system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), time_interval, 248 system.CoreTiming().ScheduleLoopingEvent(time_interval, time_interval, preemption_event);
249 preemption_event);
250 } 249 }
251 250
252 void InitializeShutdownThreads() { 251 void InitializeShutdownThreads() {
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 88fcd53ec..89bb12442 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -97,11 +97,10 @@ IAppletResource::IAppletResource(Core::System& system_,
97 return std::nullopt; 97 return std::nullopt;
98 }); 98 });
99 99
100 system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), pad_update_ns, 100 system.CoreTiming().ScheduleLoopingEvent(pad_update_ns, pad_update_ns, pad_update_event);
101 pad_update_event); 101 system.CoreTiming().ScheduleLoopingEvent(mouse_keyboard_update_ns, mouse_keyboard_update_ns,
102 system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), mouse_keyboard_update_ns,
103 mouse_keyboard_update_event); 102 mouse_keyboard_update_event);
104 system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), motion_update_ns, 103 system.CoreTiming().ScheduleLoopingEvent(motion_update_ns, motion_update_ns,
105 motion_update_event); 104 motion_update_event);
106 105
107 system.HIDCore().ReloadInputDevices(); 106 system.HIDCore().ReloadInputDevices();
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp
index 5e20e6830..e5e50845f 100644
--- a/src/core/hle/service/hid/hidbus.cpp
+++ b/src/core/hle/service/hid/hidbus.cpp
@@ -57,7 +57,7 @@ HidBus::HidBus(Core::System& system_)
57 return std::nullopt; 57 return std::nullopt;
58 }); 58 });
59 59
60 system_.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), hidbus_update_ns, 60 system_.CoreTiming().ScheduleLoopingEvent(hidbus_update_ns, hidbus_update_ns,
61 hidbus_update_event); 61 hidbus_update_event);
62} 62}
63 63
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 600b19b3f..5f69c8c2c 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -73,14 +73,14 @@ NVFlinger::NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_dr
73 const auto lock_guard = Lock(); 73 const auto lock_guard = Lock();
74 Compose(); 74 Compose();
75 75
76 return std::chrono::nanoseconds(GetNextTicks()) - ns_late; 76 return std::max(std::chrono::nanoseconds::zero(),
77 std::chrono::nanoseconds(GetNextTicks()) - ns_late);
77 }); 78 });
78 79
79 if (system.IsMulticore()) { 80 if (system.IsMulticore()) {
80 vsync_thread = std::jthread([this](std::stop_token token) { SplitVSync(token); }); 81 vsync_thread = std::jthread([this](std::stop_token token) { SplitVSync(token); });
81 } else { 82 } else {
82 system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), frame_ns, 83 system.CoreTiming().ScheduleLoopingEvent(frame_ns, frame_ns, composition_event);
83 composition_event);
84 } 84 }
85} 85}
86 86