mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
gui: add asserts to guarantee behaviour
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
parent
b38dce4ef1
commit
36bce8fa0a
1 changed files with 8 additions and 1 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
#include "panels.h"
|
#include "panels.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "ARM/cpu.h"
|
#include "Base/Assert.h"
|
||||||
|
#include "aarch64/isa.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
|
||||||
int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* panel, performance_data_t* data,
|
int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* panel, performance_data_t* data,
|
||||||
std::chrono::steady_clock::time_point* last_render)
|
std::chrono::steady_clock::time_point* last_render)
|
||||||
{
|
{
|
||||||
|
ASSERT(nullptr != panel);
|
||||||
|
ASSERT(nullptr != data);
|
||||||
|
ASSERT(nullptr != last_render);
|
||||||
|
|
||||||
bool is_visible = true;
|
bool is_visible = true;
|
||||||
(void)::ImGui::Begin(PANEL_NAME_PERFORMANCE, &is_visible);
|
(void)::ImGui::Begin(PANEL_NAME_PERFORMANCE, &is_visible);
|
||||||
if (false == is_visible)
|
if (false == is_visible)
|
||||||
|
|
@ -77,6 +82,8 @@ int8_t gui::panel::render_performance_panel(gui::panel::performance_panel_t* pan
|
||||||
|
|
||||||
int8_t gui::panel::render_cpu_panel(bool* show_cpu_result_popup)
|
int8_t gui::panel::render_cpu_panel(bool* show_cpu_result_popup)
|
||||||
{
|
{
|
||||||
|
ASSERT(nullptr != show_cpu_result_popup);
|
||||||
|
|
||||||
bool is_visible = true;
|
bool is_visible = true;
|
||||||
(void)::ImGui::Begin(PANEL_NAME_CPU, &is_visible, ImGuiWindowFlags_NoCollapse);
|
(void)::ImGui::Begin(PANEL_NAME_CPU, &is_visible, ImGuiWindowFlags_NoCollapse);
|
||||||
if (false == is_visible)
|
if (false == is_visible)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue