mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Run the imgui processing early in the frame, only do the rendering late
This commit is contained in:
+14
-1
@@ -1539,6 +1539,11 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
}
|
||||
}
|
||||
|
||||
// Running it early allows things like direct readbacks of buffers, things we can't do
|
||||
// when we have started the final render pass. Well, technically we probably could with some manipulation
|
||||
// of pass order in the render managers..
|
||||
runImDebugger();
|
||||
|
||||
bool blockedExecution = Achievements::IsBlockingExecution();
|
||||
uint32_t clearColor = 0;
|
||||
if (!blockedExecution) {
|
||||
@@ -1655,7 +1660,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
return flags;
|
||||
}
|
||||
|
||||
void EmuScreen::renderImDebugger() {
|
||||
void EmuScreen::runImDebugger() {
|
||||
if (g_Config.bShowImDebugger) {
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
if (!imguiInited_) {
|
||||
@@ -1691,6 +1696,14 @@ void EmuScreen::renderImDebugger() {
|
||||
imDebugger_->Frame(currentDebugMIPS, gpuDebug);
|
||||
|
||||
ImGui::Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EmuScreen::renderImDebugger() {
|
||||
if (g_Config.bShowImDebugger) {
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
if (PSP_IsInited()) {
|
||||
ImGui_ImplThin3d_RenderDrawData(ImGui::GetDrawData(), draw);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ private:
|
||||
void bootComplete();
|
||||
bool hasVisibleUI();
|
||||
void renderUI();
|
||||
void runImDebugger();
|
||||
void renderImDebugger();
|
||||
|
||||
void onVKey(int virtualKeyCode, bool down);
|
||||
|
||||
@@ -65,6 +65,9 @@ void ShowInWindowMenuItems(uint32_t addr, ImControl &control) {
|
||||
}
|
||||
|
||||
void StatusBar(std::string_view status) {
|
||||
if (!status.size()) {
|
||||
return;
|
||||
}
|
||||
ImGui::TextUnformatted(status.data(), status.data() + status.length());
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Copy")) {
|
||||
|
||||
Reference in New Issue
Block a user