diff options
| author | uvok | 2026-01-11 16:30:27 +0100 |
|---|---|---|
| committer | uvok | 2026-01-11 16:30:27 +0100 |
| commit | 8bf039847599dd0828b42a83bd2addb6d0b28cf1 (patch) | |
| tree | f7dba3e941e4b0725f8e752a09db13a8d5d33ea7 | |
| parent | ab2df93f57b1f8439c8ac821ae7f9c3e64caeeed (diff) | |
Add resize handler
| -rw-r--r-- | nandgame/cpp/simpc_ui.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nandgame/cpp/simpc_ui.cpp b/nandgame/cpp/simpc_ui.cpp index cc44bc9..1c749b3 100644 --- a/nandgame/cpp/simpc_ui.cpp +++ b/nandgame/cpp/simpc_ui.cpp @@ -7,12 +7,18 @@ #include <ncurses.h> +static bool resized = false; + #define PRINT_ME(y, x, ...) \ { mvprintw(y, x, __VA_ARGS__); } #define PRINT_ME_W(w, y, x, ...) \ { mvwprintw(w, y, x, __VA_ARGS__); } #define PRINT_NEXT(dly) \ { \ + if (resized) { \ + /* ????*/ \ + resized = 0; \ + } \ refresh(); \ wrefresh(status_top); \ wrefresh(clock_regs); \ @@ -229,6 +235,10 @@ static void handle_key() { case 's': block_here = false; break; + + case KEY_RESIZE: + resized = 1; + break; } } while (block_here); } |
