mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-25 04:45:00 +00:00
Devtools: PM4 Explorer (#1094)
* Devtools: Pause system * Devtools: pm4 viewer - new menu bar - refactored video_info layer - dump & inspect pm4 packets - removed dumpPM4 config - renamed System to DebugState - add docking space - simple video info constrained to window size * Devtools: pm4 viewer - add combo to select the queue * Devtools: pm4 viewer - add hex editor * Devtools: pm4 viewer - dump current cmd * add monospaced font to devtools * Devtools: pm4 viewer - use spec op name avoid some allocations
This commit is contained in:
parent
009f956d8d
commit
af398e3684
46 changed files with 19323 additions and 242 deletions
|
@ -10,6 +10,9 @@
|
|||
|
||||
#define IM_COL32_GRAY(x) IM_COL32(x, x, x, 0xFF)
|
||||
|
||||
#define IMGUI_FONT_TEXT 0
|
||||
#define IMGUI_FONT_MONO 1
|
||||
|
||||
namespace ImGui {
|
||||
|
||||
namespace Easing {
|
||||
|
@ -27,6 +30,20 @@ inline void CentralizeWindow() {
|
|||
SetNextWindowPos(display_size / 2.0f, ImGuiCond_Always, {0.5f});
|
||||
}
|
||||
|
||||
inline void KeepWindowInside(ImVec2 display_size = GetIO().DisplaySize) {
|
||||
const auto cur_pos = GetWindowPos();
|
||||
if (cur_pos.x < 0.0f || cur_pos.y < 0.0f) {
|
||||
SetWindowPos(ImMax(cur_pos, ImVec2(0.0f, 0.0f)));
|
||||
return;
|
||||
}
|
||||
const auto cur_size = GetWindowSize();
|
||||
const auto bottom_right = cur_pos + cur_size;
|
||||
if (bottom_right.x > display_size.x || bottom_right.y > display_size.y) {
|
||||
const auto max_pos = display_size - cur_size;
|
||||
SetWindowPos(ImMin(cur_pos, max_pos));
|
||||
}
|
||||
}
|
||||
|
||||
inline void KeepNavHighlight() {
|
||||
GetCurrentContext()->NavDisableHighlight = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue