Disable decoding on dedicated thread

This commit is contained in:
Gliniak 2023-06-02 21:33:29 +02:00
parent 1ff3dc4d10
commit b694820c90
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,7 @@ X_STATUS XmaDecoder::Setup(kernel::KernelState* kernel_state) {
assert_not_null(work_event_); assert_not_null(work_event_);
worker_thread_ = kernel::object_ref<kernel::XHostThread>( worker_thread_ = kernel::object_ref<kernel::XHostThread>(
new kernel::XHostThread(kernel_state, 128 * 1024, 0, [this]() { new kernel::XHostThread(kernel_state, 128 * 1024, 0, [this]() {
WorkerThreadMain(); //WorkerThreadMain();
return 0; return 0;
}, kernel_state->GetIdleProcess()));//this one doesnt need any process actually. never calls any guest code }, kernel_state->GetIdleProcess()));//this one doesnt need any process actually. never calls any guest code
worker_thread_->set_name("XMA Decoder"); worker_thread_->set_name("XMA Decoder");
@ -307,6 +307,7 @@ void XmaDecoder::WriteRegister(uint32_t addr, uint32_t value) {
uint32_t context_id = base_context_id + i; uint32_t context_id = base_context_id + i;
auto& context = contexts_[context_id]; auto& context = contexts_[context_id];
context.Enable(); context.Enable();
context.Work();
} }
} }
// Signal the decoder thread to start processing. // Signal the decoder thread to start processing.