From 0561b7fabde7a4e2a32437217f8dd85912c89c05 Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 12 Mar 2022 13:24:01 +0100 Subject: use int2f to detect fullscreen dosboxes in protected mode --- vbox.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'vbox.c') diff --git a/vbox.c b/vbox.c index 6278d6b..38673e0 100644 --- a/vbox.c +++ b/vbox.c @@ -270,8 +270,26 @@ int vbox_get_mouse(bool *abs, uint16_t *xpos, uint16_t *ypos) #pragma code_seg ( "CALLBACKS" ) -/** This is a version of vbox_get_mouse() that does not call any other functions, +/** This is a version of vbox_set_mouse() that does not call any other functions, * and may be called inside an interrupt handler. */ +int vbox_set_mouse_locked(bool enable) +{ + VMMDevReqMouseStatus *req = pBuf; + + req->header.size = sizeof(VMMDevReqMouseStatus); + req->header.version = VMMDEV_REQUEST_HEADER_VERSION; + req->header.requestType = VMMDevReq_SetMouseStatus; + req->header.rc = -1; + req->mouseFeatures = enable ? VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE : 0; + req->pointerXPos = 0; + req->pointerYPos = 0; + + vbox_send_request(bufdds.physicalAddress); + + return req->header.rc; +} + +/** Likewise for vbox_get_mouse() */ int vbox_get_mouse_locked(bool *abs, uint16_t *xpos, uint16_t *ypos) { VMMDevReqMouseStatus *req = pBuf; -- cgit v1.2.3