From d0e0e35fb5d2c46b5b9494bd7a3717633f4c8158 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 9 Oct 2024 14:25:28 -0700 Subject: [PATCH] fix first-time startup not being parameterized by startup window --- src/mule/mule_main.cpp | 11 +++++++++++ src/raddbg/raddbg_core.c | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/mule/mule_main.cpp b/src/mule/mule_main.cpp index 2b44ada4..4a4d1390 100644 --- a/src/mule/mule_main.cpp +++ b/src/mule/mule_main.cpp @@ -401,6 +401,17 @@ type_coverage_eval_tests(void){ TestFunction *function = mule_get_module_function("dll_type_eval_tests"); function(); + int abc = 0; + for(int i = 0; i < 1000; i += 1) + { + if(i == 500) + { + abc+= 1; + } + int a = i + abc; + int b = a*5; + } + int x = (int)(Anonymous_D); } diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 1ab05a75..7258766b 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -12716,11 +12716,11 @@ rd_frame(void) RD_Window *ws = rd_window_open(window_dim, preferred_monitor, RD_CfgSrc_User); if(monitor_dim.x < 1920) { - rd_cmd(RD_CmdKind_ResetToCompactPanels); + rd_cmd(RD_CmdKind_ResetToCompactPanels, .window = rd_handle_from_window(ws)); } else { - rd_cmd(RD_CmdKind_ResetToDefaultPanels); + rd_cmd(RD_CmdKind_ResetToDefaultPanels, .window = rd_handle_from_window(ws)); } } @@ -14463,6 +14463,13 @@ rd_frame(void) rd_cmd(RD_CmdKind_CancelQuery); } + // rjf: unset command register slot, if we keep old input (and thus need + // to re-query user) + if(info->query.flags & RD_QueryFlag_KeepOldInput) + { + ws->query_cmd_regs_mask[slot/64] &= ~(1ull<<(slot%64)); + } + // rjf: push command if possible if(command_ready) {