From 0482ffad5a00207cb2e468ca9daf8988a3ab8ba8 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 30 Dec 2015 10:49:01 -0800 Subject: [PATCH] Allow XMA decoder to be suspended. --- src/xenia/apu/xma_decoder.cc | 1 + src/xenia/debug/ui/debug_window.cc | 2 +- src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/apu/xma_decoder.cc b/src/xenia/apu/xma_decoder.cc index 411ab812b..15fc85f78 100644 --- a/src/xenia/apu/xma_decoder.cc +++ b/src/xenia/apu/xma_decoder.cc @@ -123,6 +123,7 @@ X_STATUS XmaDecoder::Setup(kernel::KernelState* kernel_state) { return 0; })); worker_thread_->set_name("XMA Decoder Worker"); + worker_thread_->set_can_debugger_suspend(true); worker_thread_->Create(); return X_STATUS_SUCCESS; diff --git a/src/xenia/debug/ui/debug_window.cc b/src/xenia/debug/ui/debug_window.cc index 1b07b2bd7..a06443609 100644 --- a/src/xenia/debug/ui/debug_window.cc +++ b/src/xenia/debug/ui/debug_window.cc @@ -994,8 +994,8 @@ void DebugWindow::DrawThreadsPane() { auto thread_info = cache_.thread_execution_infos[i]; auto thread = thread_info->thread; bool is_current_thread = thread == state_.thread; - assert_not_null(thread); // TODO(benvanik): zombie thread states. if (!thread) { + // TODO(benvanik): better display of zombie thread states. continue; } if (is_current_thread && state_.has_changed_thread) { diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc index bbbd77ff0..342730be9 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_io.cc @@ -201,7 +201,7 @@ dword_result_t NtReadFile(dword_t file_handle, dword_t event_handle, apc_context); if (io_status_block) { io_status_block->status = result; - io_status_block->information = (uint32_t)bytes_read; + io_status_block->information = static_cast(bytes_read); } // Queue the APC callback. It must be delivered via the APC mechanism even