Fixed compilation of USB debugger if the win32 gui is not present.

This commit is contained in:
Volker Ruppert 2024-03-13 17:03:21 +01:00
parent fe7b4b4fcb
commit 7d037af569
2 changed files with 4 additions and 16 deletions

View File

@ -1218,13 +1218,6 @@ void SetMouseCapture()
SetMouseToggleInfo();
}
#if BX_USE_WIN32USBDEBUG
BOOL GetMouseCaptureMode()
{
return mouseCaptureMode;
}
#endif
LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
HDC hdc, hdcMem;

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023 Benjamin David Lunt
// Copyright (C) 2003-2023 The Bochs Project
// Copyright (C) 2003-2024 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -73,8 +73,6 @@ HFONT hTreeViewFont;
///////////////////////////////////////////////////////////////////////////////////////////////
// Common to all HC types
//
void SetMouseCapture();
BOOL GetMouseCaptureMode();
// return 0 to continue with emulation
// return -1 to quit emulation
@ -119,11 +117,9 @@ int win32_usb_start(HWND hwnd, int break_type, int wParam, int lParam)
}
// if the mouse is currently being captured, we need to pause capture mode
// (This is Win32 specific, though we are already Win32 specific, so it shouldn't matter)
BOOL capture = GetMouseCaptureMode();
BOOL capture = SIM->get_param_bool(BXPN_MOUSE_ENABLED)->get();
if (capture) {
bx_gui->mouse_enabled_changed_specific(0);
SetMouseCapture();
SIM->get_param_bool(BXPN_MOUSE_ENABLED)->set(0);
}
// create the dialog and wait for it to return
@ -138,8 +134,7 @@ int win32_usb_start(HWND hwnd, int break_type, int wParam, int lParam)
// re-capture the mouse?
if (capture) {
bx_gui->mouse_enabled_changed_specific(1);
SetMouseCapture();
SIM->get_param_bool(BXPN_MOUSE_ENABLED)->set(1);
}
return ret;