diff options
author | Javier <dev.git@javispedro.com> | 2022-03-12 13:24:01 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-03-12 13:24:01 +0100 |
commit | 0561b7fabde7a4e2a32437217f8dd85912c89c05 (patch) | |
tree | edfc9f1388c4fb5560291027dfdeacfd57d2d46c /vbox.c | |
parent | a5ae81421c666fe55bbd8c6272cc94da9acd830b (diff) | |
download | vbados-0561b7fabde7a4e2a32437217f8dd85912c89c05.tar.gz vbados-0561b7fabde7a4e2a32437217f8dd85912c89c05.zip |
use int2f to detect fullscreen dosboxes in protected mode
Diffstat (limited to 'vbox.c')
-rw-r--r-- | vbox.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -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; |