From 4a89e2e74f922e51f427b76996f826a51f17b1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 15 Nov 2013 16:49:13 +0100 Subject: [PATCH] Add "Dump frame GPU commands" to the "in-game" dev menu too. --- Core/HW/SasAudio.cpp | 5 ++++- UI/DevScreens.cpp | 8 ++++++++ UI/DevScreens.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Core/HW/SasAudio.cpp b/Core/HW/SasAudio.cpp index 28556e4e81..0d026f7cb1 100644 --- a/Core/HW/SasAudio.cpp +++ b/Core/HW/SasAudio.cpp @@ -840,13 +840,16 @@ void ADSREnvelope::KeyOn() { void ADSREnvelope::KeyOff() { SetState(STATE_RELEASE); + // Does this really make sense? I don't think so, the release-decay should happen + // from whatever level we are at, although the weirdo exponentials we have start at a fixed state :( height_ = sustainLevel; } void ADSREnvelope::DoState(PointerWrap &p) { auto s = p.Section("ADSREnvelope", 1); - if (!s) + if (!s) { return; + } p.Do(attackRate); p.Do(decayRate); diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 01b1f15c38..ea23cacbb3 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -32,6 +32,8 @@ #include "Core/CoreParameter.h" #include "Core/MIPS/MIPSTables.h" #include "Core/MIPS/JitCommon/JitCommon.h" +#include "GPU/GPUInterface.h" +#include "GPU/GPUState.h" #include "ext/disarm.h" #include "Common/CPUDetect.h" @@ -51,6 +53,7 @@ void DevMenu::CreatePopupContents(UI::ViewGroup *parent) { parent->Add(new Choice("Developer Tools"))->OnClick.Handle(this, &DevMenu::OnDeveloperTools); parent->Add(new Choice("Jit Compare"))->OnClick.Handle(this, &DevMenu::OnJitCompare); parent->Add(new Choice("Toggle Freeze"))->OnClick.Handle(this, &DevMenu::OnFreezeFrame); + parent->Add(new Choice("Dump Frame GPU Commands"))->OnClick.Handle(this, &DevMenu::OnDumpFrame); } UI::EventReturn DevMenu::OnLogConfig(UI::EventParams &e) { @@ -77,6 +80,11 @@ UI::EventReturn DevMenu::OnFreezeFrame(UI::EventParams &e) { return UI::EVENT_DONE; } +UI::EventReturn DevMenu::OnDumpFrame(UI::EventParams &e) { + gpu->DumpNextFrame(); + return UI::EVENT_DONE; +} + void DevMenu::dialogFinished(const Screen *dialog, DialogResult result) { // Close when a subscreen got closed. // TODO: a bug in screenmanager causes this not to work here. diff --git a/UI/DevScreens.h b/UI/DevScreens.h index 487b3f445b..225b2efc4c 100644 --- a/UI/DevScreens.h +++ b/UI/DevScreens.h @@ -39,6 +39,7 @@ protected: UI::EventReturn OnLogConfig(UI::EventParams &e); UI::EventReturn OnJitCompare(UI::EventParams &e); UI::EventReturn OnFreezeFrame(UI::EventParams &e); + UI::EventReturn OnDumpFrame(UI::EventParams &e); UI::EventReturn OnDeveloperTools(UI::EventParams &e); };