Skip to content

Commit

Permalink
Add extended ImGui debug panels
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHelmut committed Sep 13, 2024
1 parent c25e42d commit a19b197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/core/Core/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ExitStatus App::Application::run() {
if (ImGui::BeginMenu("View")) {
ImGui::MenuItem("Some Panel", nullptr, &m_show_some_panel);
ImGui::MenuItem("ImGui Demo Panel", nullptr, &m_show_demo_panel);
ImGui::MenuItem("Debug Panel", nullptr, &m_show_debug_panel);
ImGui::MenuItem("Debug Panels", nullptr, &m_show_debug_panel);
ImGui::EndMenu();
}

Expand All @@ -133,7 +133,10 @@ ExitStatus App::Application::run() {

// Debug panel
if (m_show_debug_panel) {
ImGui::Begin("Debug panel", &m_show_debug_panel);
ImGui::ShowMetricsWindow();
ImGui::ShowDebugLogWindow();

ImGui::Begin("App debug panel", &m_show_debug_panel);
ImGui::Text("User config path: %s", user_config_path.c_str());
ImGui::Separator();
ImGui::Text("Font path: %s", font_path.c_str());
Expand Down
3 changes: 1 addition & 2 deletions src/core/Core/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Window::Window(const Settings& settings) {
size.height,
window_flags);

auto renderer_flags{
static_cast<SDL_RendererFlags>(SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED)};
Uint32 renderer_flags{SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED};
m_renderer = SDL_CreateRenderer(m_window, -1, renderer_flags);

if (m_renderer == nullptr) {
Expand Down

0 comments on commit a19b197

Please sign in to comment.