From 317a27aa4082504022139281cc9b3fde5695e5f1 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 21 Jan 2023 19:45:28 +0100 Subject: [PATCH] mockui.c: fix Open_window() / Close_window() Windows_open needs to have a consistent value --- src/tests/mockui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/mockui.c b/src/tests/mockui.c index 3f0a9010..6b23e790 100644 --- a/src/tests/mockui.c +++ b/src/tests/mockui.c @@ -24,6 +24,7 @@ #include #include #include "../struct.h" +#include "../global.h" void Warning_message(const char * message) { @@ -57,11 +58,14 @@ void Window_help(int section, const char * sub_section) void Open_window(word width, word height, const char * title) { - printf("Open_window() %hux%hu : %s\n", width, height, title); + Windows_open++; + printf("Open_window() #%hhu %hux%hu : %s\n", Windows_open, width, height, title); } void Close_window() { + printf("Close_window() #%hhu\n", Windows_open); + Windows_open--; } void Print_in_window(short x,short y,const char * str,byte text_color,byte background_color)