Port yuzu-emu/yuzu#4437: "core_timing: Make use of uintptr_t to represent user_data" (#5499)

Co-authored-by: LC <lioncash@users.noreply.github.com>
This commit is contained in:
Tobias 2022-11-06 02:24:45 +01:00 committed by GitHub
parent 7801907288
commit 3201943423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 62 additions and 58 deletions

View file

@ -66,7 +66,7 @@ void IR_RST::UnloadInputDevices() {
c_stick = nullptr;
}
void IR_RST::UpdateCallback(u64 userdata, s64 cycles_late) {
void IR_RST::UpdateCallback(std::uintptr_t user_data, s64 cycles_late) {
SharedMem* mem = reinterpret_cast<SharedMem*>(shared_memory->GetPointer());
if (is_device_reload_pending.exchange(false))
@ -175,8 +175,9 @@ IR_RST::IR_RST(Core::System& system) : ServiceFramework("ir:rst", 1), system(sys
update_event = system.Kernel().CreateEvent(ResetType::OneShot, "IRRST:UpdateEvent");
update_callback_id = system.CoreTiming().RegisterEvent(
"IRRST:UpdateCallBack",
[this](u64 userdata, s64 cycles_late) { UpdateCallback(userdata, cycles_late); });
"IRRST:UpdateCallBack", [this](std::uintptr_t user_data, s64 cycles_late) {
UpdateCallback(user_data, cycles_late);
});
static const FunctionInfo functions[] = {
{0x00010000, &IR_RST::GetHandles, "GetHandles"},

View file

@ -74,7 +74,7 @@ private:
void LoadInputDevices();
void UnloadInputDevices();
void UpdateCallback(u64 userdata, s64 cycles_late);
void UpdateCallback(std::uintptr_t user_data, s64 cycles_late);
Core::System& system;
std::shared_ptr<Kernel::Event> update_event;