Add non-debug checks

This commit is contained in:
blankie 2023-01-18 23:37:37 +07:00
parent 0132b3ca1d
commit be07a6b3aa
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
2 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,7 @@ static inline void main_window(bool latest_log_entries_read, bool* show_settings
ImGui::End();
}
#ifndef NDEBUG
static inline void debug_window() {
static bool show_demo_window = false;
static size_t add_log_entry_presses = 1;
@ -148,6 +149,7 @@ static inline void debug_window() {
ImGui::End();
}
#endif
void event_loop(ImFont* monospace_font, Config& config, float* config_write_timer, LogcatThread& logcat_thread, bool* run_event_loop) {
static bool show_settings_window = false;
@ -156,7 +158,9 @@ void event_loop(ImFont* monospace_font, Config& config, float* config_write_time
check_for_logcat_items(logcat_thread);
#ifndef NDEBUG
debug_window();
#endif
if (show_settings_window) {
settings_window(config, config_write_timer, &show_settings_window);

View File

@ -4,4 +4,6 @@
#define IM_ASSERT_USER_ERROR(expr,msg) do { if (!(expr)) { log(msg); } } while (0);
#ifndef NDEBUG
#define IMGUI_DEBUG_PARANOID
#endif