Skip to content

Commit 93eed65

Browse files
Disable mouse moved input events to guest while debugger is active
1 parent b9d9d23 commit 93eed65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ints/mouse.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,12 +816,18 @@ static bool AllowINT33RMAccess() {
816816
return false;
817817
}
818818

819+
bool IsDebuggerActive(void);
820+
819821
/* FIXME: Re-test this code */
820822
void Mouse_CursorMoved(float xrel,float yrel,float x,float y,bool emulate) {
821823
extern bool Mouse_Vertical;
822824
float dx = xrel * mouse.pixelPerMickey_x;
823825
float dy = (Mouse_Vertical?-yrel:yrel) * mouse.pixelPerMickey_y;
824826

827+
/* if debugging the code don't let mouse movement over the emulator window cause problems */
828+
if (IsDebuggerActive())
829+
return;
830+
825831
if (!IS_PC98_ARCH && KEYBOARD_AUX_Active()) {
826832
KEYBOARD_AUX_Event(xrel,yrel,mouse.buttons,mouse.scrollwheel);
827833
mouse.scrollwheel = 0;

0 commit comments

Comments
 (0)