mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-05 18:23:16 +00:00
core: Fix some missing uses of ExecuteGuest. (#1214)
This commit is contained in:
parent
388d717205
commit
1a34c2a189
6 changed files with 30 additions and 19 deletions
|
@ -91,7 +91,7 @@ void PS4_SYSV_ABI AvPlayerState::AutoPlayEventCallback(void* opaque, SceAvPlayer
|
|||
const auto callback = self->m_event_replacement.event_callback;
|
||||
const auto ptr = self->m_event_replacement.object_ptr;
|
||||
if (callback != nullptr) {
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
const auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
linker->ExecuteGuest(callback, ptr, event_id, 0, event_data);
|
||||
}
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ void AvPlayerState::EmitEvent(SceAvPlayerEvents event_id, void* event_data) {
|
|||
const auto callback = m_init_data.event_replacement.event_callback;
|
||||
if (callback) {
|
||||
const auto ptr = m_init_data.event_replacement.object_ptr;
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
const auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
linker->ExecuteGuest(callback, ptr, event_id, 0, event_data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -993,7 +993,7 @@ static void cleanup_thread(void* arg) {
|
|||
static void* run_thread(void* arg) {
|
||||
auto* thread = static_cast<ScePthread>(arg);
|
||||
Common::SetCurrentThreadName(thread->name.c_str());
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
const auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
void* ret = nullptr;
|
||||
g_pthread_self = thread;
|
||||
pthread_cleanup_push(cleanup_thread, thread);
|
||||
|
|
|
@ -59,7 +59,7 @@ s32 Libraries::NetCtl::NetCtlInternal::registerNpToolkitCallback(
|
|||
|
||||
void Libraries::NetCtl::NetCtlInternal::checkCallback() {
|
||||
std::unique_lock lock{m_mutex};
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
const auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
for (auto& callback : callbacks) {
|
||||
if (callback.func != nullptr) {
|
||||
linker->ExecuteGuest(callback.func, ORBIS_NET_CTL_EVENT_TYPE_DISCONNECTED,
|
||||
|
@ -70,7 +70,7 @@ void Libraries::NetCtl::NetCtlInternal::checkCallback() {
|
|||
|
||||
void Libraries::NetCtl::NetCtlInternal::checkNpToolkitCallback() {
|
||||
std::unique_lock lock{m_mutex};
|
||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
const auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||
for (auto& callback : nptoolCallbacks) {
|
||||
if (callback.func != nullptr) {
|
||||
linker->ExecuteGuest(callback.func, ORBIS_NET_CTL_EVENT_TYPE_DISCONNECTED,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue