diff options
| author | bunnei <bunneidev@gmail.com> | 2014-07-22 19:20:57 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2014-07-22 19:20:57 -0400 |
| commit | daa924b906ff3a6f54d00c5d19874c2f839af0a3 (patch) | |
| tree | 127b4998ece87140690b7e74853215522d57ecaa /src/video_core/gpu_debugger.h | |
| parent | 97d47d55f3a47f29856e48e611846021fde1c850 (diff) | |
| parent | 9fd2537e933b5d36c898d662e29ea57f7ce61e49 (diff) | |
Merge pull request #31 from neobrain/gpu_framebuffer
GPU framebuffer emulation improvements
Diffstat (limited to 'src/video_core/gpu_debugger.h')
| -rw-r--r-- | src/video_core/gpu_debugger.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/gpu_debugger.h b/src/video_core/gpu_debugger.h index 5d909beba..d92ceaa72 100644 --- a/src/video_core/gpu_debugger.h +++ b/src/video_core/gpu_debugger.h @@ -50,7 +50,7 @@ public: virtual void GXCommandProcessed(int total_command_count) { const GSP_GPU::GXCommand& cmd = observed->ReadGXCommandHistory(total_command_count-1); - ERROR_LOG(GSP, "Received command: id=%x", cmd.id); + ERROR_LOG(GSP, "Received command: id=%x", (int)cmd.id.Value()); } /** @@ -78,11 +78,13 @@ public: void GXCommandProcessed(u8* command_data) { + if (observers.empty()) + return; + gx_command_history.push_back(GSP_GPU::GXCommand()); GSP_GPU::GXCommand& cmd = gx_command_history[gx_command_history.size()-1]; - const int cmd_length = sizeof(GSP_GPU::GXCommand); - memcpy(cmd.data, command_data, cmd_length); + memcpy(&cmd, command_data, sizeof(GSP_GPU::GXCommand)); ForEachObserver([this](DebuggerObserver* observer) { observer->GXCommandProcessed(this->gx_command_history.size()); @@ -91,6 +93,9 @@ public: void CommandListCalled(u32 address, u32* command_list, u32 size_in_words) { + if (observers.empty()) + return; + PicaCommandList cmdlist; for (u32* parse_pointer = command_list; parse_pointer < command_list + size_in_words;) { |
