Skip to content

Commit

Permalink
enhancement: Debugger window focus update
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Feb 18, 2025
1 parent c827424 commit 0cff701
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7573,6 +7573,7 @@ void debug (void)
uae_ppc_pause(0);
#endif
setmouseactive(0, wasactive ? 2 : 0);
target_inputdevice_acquire();

last_cycles1 = get_cycles();
last_vpos1 = vpos;
Expand Down
8 changes: 6 additions & 2 deletions src/osdep/writelog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,19 @@ void deactivate_console(void)

void activate_console()
{
previousactivewindow = NULL;
if (!consoleopen)
if (!consoleopen) {
previousactivewindow = NULL;
return;
}
previousactivewindow = SDL_GetWindowFromID(SDL_GetWindowID(SDL_GetKeyboardFocus()));
//SetForegroundWindow(GetConsoleWindow());
}

static void open_console_window()
{
if (!consoleopen) {
previousactivewindow = SDL_GetWindowFromID(SDL_GetWindowID(SDL_GetKeyboardFocus()));
}
//AllocConsole();
getconsole();
consoleopen = -1;
Expand Down

0 comments on commit 0cff701

Please sign in to comment.