mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Add an ImDebugger window for PPSSPP internals, right now just for sysdirs
This commit is contained in:
1 parent
493367c89f
commit
366fb9834e
2 files changed
+50
No files matched your search
@@ -18,6 +18,7 @@
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/SocketManager.h"
|
||||
#include "Core/HLE/NetInetConstants.h"
|
||||
@@ -546,6 +547,48 @@ static void DrawApctl(ImConfig &cfg) {
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
static void DrawInternals(ImConfig &cfg) {
|
||||
if (!ImGui::Begin("PPSSPP Internals", &cfg.internalsOpen)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
|
||||
struct entry {
|
||||
PSPDirectories dir;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
static const entry dirs[] = {
|
||||
{DIRECTORY_PSP, "PSP"},
|
||||
{DIRECTORY_CHEATS, "CHEATS"},
|
||||
{DIRECTORY_SCREENSHOT, "SCREENSHOT"},
|
||||
{DIRECTORY_SYSTEM, "SYSTEM"},
|
||||
{DIRECTORY_GAME, "GAME"},
|
||||
{DIRECTORY_SAVEDATA, "SAVEDATA"},
|
||||
{DIRECTORY_PAUTH, "PAUTH"},
|
||||
{DIRECTORY_DUMP, "DUMP"},
|
||||
{DIRECTORY_SAVESTATE, "SAVESTATE"},
|
||||
{DIRECTORY_CACHE, "CACHE"},
|
||||
{DIRECTORY_TEXTURES, "TEXTURES"},
|
||||
{DIRECTORY_PLUGINS, "PLUGINS"},
|
||||
{DIRECTORY_APP_CACHE, "APP_CACHE"},
|
||||
{DIRECTORY_VIDEO, "VIDEO"},
|
||||
{DIRECTORY_AUDIO, "AUDIO"},
|
||||
{DIRECTORY_MEMSTICK_ROOT, "MEMSTICK_ROOT"},
|
||||
{DIRECTORY_EXDATA, "EXDATA"},
|
||||
{DIRECTORY_CUSTOM_SHADERS, "CUSTOM_SHADERS"},
|
||||
{DIRECTORY_CUSTOM_THEMES, "CUSTOM_THEMES"},
|
||||
};
|
||||
|
||||
if (ImGui::CollapsingHeader("Directories", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
for (auto &dir : dirs) {
|
||||
ImGui::Text("%s: %s", dir.name, GetSysDirectory(dir.dir).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
static void DrawAdhoc(ImConfig &cfg) {
|
||||
if (!ImGui::Begin("AdHoc", &cfg.adhocOpen)) {
|
||||
ImGui::End();
|
||||
@@ -1281,6 +1324,7 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu
|
||||
if (ImGui::MenuItem("Close Debugger")) {
|
||||
g_Config.bShowImDebugger = false;
|
||||
}
|
||||
ImGui::MenuItem("PPSSPP Internals", nullptr, &cfg_.internalsOpen);
|
||||
ImGui::MenuItem("Dear ImGui Demo", nullptr, &cfg_.demoOpen);
|
||||
ImGui::MenuItem("Dear ImGui Style editor", nullptr, &cfg_.styleEditorOpen);
|
||||
ImGui::EndMenu();
|
||||
@@ -1410,6 +1454,10 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu
|
||||
DrawApctl(cfg_);
|
||||
}
|
||||
|
||||
if (cfg_.internalsOpen) {
|
||||
DrawInternals(cfg_);
|
||||
}
|
||||
|
||||
// Process UI commands
|
||||
switch (control.command.cmd) {
|
||||
case ImCmd::SHOW_IN_CPU_DISASM:
|
||||
@@ -1777,6 +1825,7 @@ void ImConfig::SyncConfig(IniFile *ini, bool save) {
|
||||
sync.Sync("adhocOpen", &adhocOpen, false);
|
||||
sync.Sync("apctlOpen", &apctlOpen, false);
|
||||
sync.Sync("pixelViewerOpen", &pixelViewerOpen, false);
|
||||
sync.Sync("internalsOpen", &internalsOpen, false);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
char name[64];
|
||||
snprintf(name, sizeof(name), "memory%dOpen", i + 1);
|
||||
|
||||
Reference in new issue
Block a user