Dear ImGui Implementation (#598)

* added imgui as dependency

* imgui renderer/basic input implementation

* imgui: add layers system

Add video info layer to show fps. Press F10 to toggle it.

* imgui: add custom imgui config

* imgui: gamepad capture, stopping propagation

* imgui: changed config & log file path to use portable dir

* videoout: render blank frame when video output is closed

required to render imgui even when game has no video output

- fixed merge compile-error
This commit is contained in:
Vinicius Rangel 2024-09-08 16:50:32 -03:00 committed by GitHub
parent f1becb2507
commit 035cb3eeaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 2386 additions and 8 deletions

View file

@ -9,6 +9,7 @@
#include "common/config.h"
#include "common/version.h"
#include "core/libraries/pad/pad.h"
#include "imgui/renderer/imgui_core.h"
#include "input/controller.h"
#include "sdl_window.h"
#include "video_core/renderdoc.h"
@ -80,6 +81,10 @@ void WindowSDL::waitEvent() {
return;
}
if (ImGui::Core::ProcessEvent(&event)) {
return;
}
switch (event.type) {
case SDL_EVENT_WINDOW_RESIZED:
case SDL_EVENT_WINDOW_MAXIMIZED:
@ -115,6 +120,7 @@ void WindowSDL::waitEvent() {
void WindowSDL::onResize() {
SDL_GetWindowSizeInPixels(window, &width, &height);
ImGui::Core::OnResize();
}
void WindowSDL::onKeyPress(const SDL_Event* event) {