mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Sort the modules in the HLE module viewer
This commit is contained in:
parent
0776ee01a8
commit
5a0d6f7a15
1 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
#include "ext/imgui/imgui_internal.h"
|
#include "ext/imgui/imgui_internal.h"
|
||||||
|
|
||||||
|
@ -241,11 +243,20 @@ void DrawHLEModules(ImConfig &config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const int moduleCount = GetNumRegisteredModules();
|
const int moduleCount = GetNumRegisteredModules();
|
||||||
|
std::vector<const HLEModule *> modules;
|
||||||
|
modules.reserve(moduleCount);
|
||||||
for (int i = 0; i < moduleCount; i++) {
|
for (int i = 0; i < moduleCount; i++) {
|
||||||
const HLEModule *module = GetModuleByIndex(i);
|
modules.push_back(GetModuleByIndex(i));
|
||||||
if (ImGui::TreeNode(module->name)) {
|
}
|
||||||
for (int j = 0; j < module->numFunctions; j++) {
|
|
||||||
auto &func = module->funcTable[j];
|
std::sort(modules.begin(), modules.end(), [](const HLEModule* a, const HLEModule* b) {
|
||||||
|
return std::strcmp(a->name, b->name) < 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (auto mod : modules) {
|
||||||
|
if (ImGui::TreeNode(mod->name)) {
|
||||||
|
for (int j = 0; j < mod->numFunctions; j++) {
|
||||||
|
auto &func = mod->funcTable[j];
|
||||||
ImGui::Text("%s(%s)", func.name, func.argmask);
|
ImGui::Text("%s(%s)", func.name, func.argmask);
|
||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
|
|
Loading…
Add table
Reference in a new issue