mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 19:02:45 -06:00
hle: kernel: KServerSession: Remove hack for CompleteSyncRequest.
- This does not appear to be necessary anymore.
This commit is contained in:
parent
ad53dc22fd
commit
384e24d3e9
1 changed files with 0 additions and 11 deletions
|
@ -8,7 +8,6 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/scope_exit.h"
|
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/kernel/hle_ipc.h"
|
#include "core/hle/kernel/hle_ipc.h"
|
||||||
|
@ -123,20 +122,10 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor
|
||||||
|
|
||||||
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
|
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
|
||||||
|
|
||||||
// In the event that something fails here, stub a result to prevent the game from crashing.
|
|
||||||
// This is a work-around in the event that somehow we process a service request after the
|
|
||||||
// session has been closed by the game. This has been observed to happen rarely in Pokemon
|
|
||||||
// Sword/Shield and is likely a result of us using host threads/scheduling for services.
|
|
||||||
// TODO(bunnei): Find a better solution here.
|
|
||||||
auto error_guard = SCOPE_GUARD({ CompleteSyncRequest(*context); });
|
|
||||||
|
|
||||||
// Ensure we have a session request handler
|
// Ensure we have a session request handler
|
||||||
if (manager->HasSessionRequestHandler(*context)) {
|
if (manager->HasSessionRequestHandler(*context)) {
|
||||||
if (auto strong_ptr = manager->GetServiceThread().lock()) {
|
if (auto strong_ptr = manager->GetServiceThread().lock()) {
|
||||||
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
||||||
|
|
||||||
// We succeeded.
|
|
||||||
error_guard.Cancel();
|
|
||||||
} else {
|
} else {
|
||||||
ASSERT_MSG(false, "strong_ptr is nullptr!");
|
ASSERT_MSG(false, "strong_ptr is nullptr!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue