mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 20:14:17 +01:00
Services/GSP: Mark the thread ids as unused when a GSP session is destroyed.
This fixes the games that call RegisterInterruptRelayQueue and UnregisterInterruptRelayQueue frequently.
This commit is contained in:
parent
d17f148e48
commit
75f68c4860
@ -362,12 +362,9 @@ void GSP_GPU::UnregisterInterruptRelayQueue(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x14, 0, 0);
|
||||
|
||||
SessionData* session_data = GetSessionData(ctx.Session());
|
||||
session_data->thread_id = 0;
|
||||
session_data->interrupt_event = nullptr;
|
||||
session_data->registered = false;
|
||||
|
||||
// TODO(Subv): Reset next_thread_id so that it doesn't go past the maximum of 4.
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
|
||||
@ -768,5 +765,10 @@ SessionData::SessionData() {
|
||||
used_thread_ids[thread_id] = true;
|
||||
}
|
||||
|
||||
SessionData::~SessionData() {
|
||||
// Free the thread id slot so that other sessions can use it.
|
||||
used_thread_ids[thread_id] = false;
|
||||
}
|
||||
|
||||
} // namespace GSP
|
||||
} // namespace Service
|
||||
|
@ -181,6 +181,7 @@ static_assert(sizeof(CommandBuffer) == 0x200, "CommandBuffer struct has incorrec
|
||||
|
||||
struct SessionData : public Kernel::SessionRequestHandler::SessionDataBase {
|
||||
SessionData();
|
||||
~SessionData();
|
||||
|
||||
/// Event triggered when GSP interrupt has been signalled
|
||||
Kernel::SharedPtr<Kernel::Event> interrupt_event;
|
||||
|
Loading…
Reference in New Issue
Block a user