diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-28 04:29:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 04:29:22 +0200 |
commit | 05781ce8c4dd4d4150185effac56ef9a71ae2705 (patch) | |
tree | 12d41a29b43577b95b158bc033aadc3957bde3d7 /src/core/hle | |
parent | Merge pull request #4420 from lat9nq/fix-themed-label-bg (diff) | |
parent | core_timing: Make use of uintptr_t to represent user_data (diff) | |
download | yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar.gz yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar.bz2 yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar.lz yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar.xz yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.tar.zst yuzu-05781ce8c4dd4d4150185effac56ef9a71ae2705.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/server_session.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/kernel/time_manager.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 2 |
6 files changed, 17 insertions, 13 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 8dd4a2637..cabe8d418 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -145,7 +145,7 @@ struct KernelCore::Impl { void InitializePreemption(KernelCore& kernel) { preemption_event = Core::Timing::CreateEvent( - "PreemptionCallback", [this, &kernel](u64, std::chrono::nanoseconds) { + "PreemptionCallback", [this, &kernel](std::uintptr_t, std::chrono::nanoseconds) { { SchedulerLock lock(kernel); global_scheduler.PreemptThreads(); diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index af22f4c33..7e6391c6c 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -33,8 +33,10 @@ ResultVal<std::shared_ptr<ServerSession>> ServerSession::Create(KernelCore& kern std::string name) { std::shared_ptr<ServerSession> session{std::make_shared<ServerSession>(kernel)}; - session->request_event = Core::Timing::CreateEvent( - name, [session](u64, std::chrono::nanoseconds) { session->CompleteSyncRequest(); }); + session->request_event = + Core::Timing::CreateEvent(name, [session](std::uintptr_t, std::chrono::nanoseconds) { + session->CompleteSyncRequest(); + }); session->name = std::move(name); session->parent = std::move(parent); diff --git a/src/core/hle/kernel/time_manager.cpp b/src/core/hle/kernel/time_manager.cpp index 88b01b751..95f2446c9 100644 --- a/src/core/hle/kernel/time_manager.cpp +++ b/src/core/hle/kernel/time_manager.cpp @@ -16,14 +16,14 @@ namespace Kernel { TimeManager::TimeManager(Core::System& system_) : system{system_} { time_manager_event_type = Core::Timing::CreateEvent( - "Kernel::TimeManagerCallback", [this](u64 thread_handle, std::chrono::nanoseconds) { - SchedulerLock lock(system.Kernel()); - Handle proper_handle = static_cast<Handle>(thread_handle); + "Kernel::TimeManagerCallback", + [this](std::uintptr_t thread_handle, std::chrono::nanoseconds) { + const SchedulerLock lock(system.Kernel()); + const auto proper_handle = static_cast<Handle>(thread_handle); if (cancelled_events[proper_handle]) { return; } - std::shared_ptr<Thread> thread = - this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); + auto thread = this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); thread->OnWakeUp(); }); } diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 680290cbd..1e95b7580 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -77,8 +77,9 @@ IAppletResource::IAppletResource(Core::System& system) // Register update callbacks pad_update_event = Core::Timing::CreateEvent( - "HID::UpdatePadCallback", [this](u64 userdata, std::chrono::nanoseconds ns_late) { - UpdateControllers(userdata, ns_late); + "HID::UpdatePadCallback", + [this](std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { + UpdateControllers(user_data, ns_late); }); // TODO(shinyquagsire23): Other update callbacks? (accel, gyro?) @@ -108,7 +109,8 @@ void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { rb.PushCopyObjects(shared_mem); } -void IAppletResource::UpdateControllers(u64 userdata, std::chrono::nanoseconds ns_late) { +void IAppletResource::UpdateControllers(std::uintptr_t user_data, + std::chrono::nanoseconds ns_late) { auto& core_timing = system.CoreTiming(); const bool should_reload = Settings::values.is_device_reload_pending.exchange(false); diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index c6f0a2584..efb07547f 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -64,7 +64,7 @@ private: } void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); - void UpdateControllers(u64 userdata, std::chrono::nanoseconds ns_late); + void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); std::shared_ptr<Kernel::SharedMemory> shared_mem; diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index e561bf654..f644a460d 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -67,7 +67,7 @@ NVFlinger::NVFlinger(Core::System& system) : system(system) { // Schedule the screen composition events composition_event = Core::Timing::CreateEvent( - "ScreenComposition", [this](u64, std::chrono::nanoseconds ns_late) { + "ScreenComposition", [this](std::uintptr_t, std::chrono::nanoseconds ns_late) { const auto guard = Lock(); Compose(); |