aboutsummaryrefslogtreecommitdiff
path: root/mousew16.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-02-28 02:37:56 +0000
committerJavier <dev.git@javispedro.com>2022-02-28 02:37:56 +0000
commitb649293e1f0b8ad13aeb4c662a4eeae78634c129 (patch)
tree06ac8552550341b1b03c297111104aee7c70b033 /mousew16.c
parentdee9ca901fd3f2edec7af8f82300257b285067b0 (diff)
downloadvbados-b649293e1f0b8ad13aeb4c662a4eeae78634c129.tar.gz
vbados-b649293e1f0b8ad13aeb4c662a4eeae78634c129.zip
use virtual DMA service on windows with paging enabled
Diffstat (limited to 'mousew16.c')
-rw-r--r--mousew16.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mousew16.c b/mousew16.c
index 94bd309..c017133 100644
--- a/mousew16.c
+++ b/mousew16.c
@@ -123,7 +123,6 @@ BOOL FAR PASCAL LibMain(HINSTANCE hInstance, WORD wDataSegment,
// However we will check whether VirtualBox exists:
if (vbox_init() == 0) {
vbox_logs("VirtualBox found\n");
- vbox_report_guest_info(VBOXOSTYPE_Win31);
// VirtualBox connection was succesful, remember that
mouseflags |= MOUSEFLAGS_HAS_VBOX;
@@ -171,11 +170,16 @@ VOID FAR PASCAL Enable(LPFN_MOUSEEVENT lpEventProc)
#if ENABLE_VBOX
if (mouseflags & MOUSEFLAGS_HAS_VBOX) {
- vbox_init_callbacks();
+ if ((err = vbox_alloc_buffers())) {
+ vbox_logs("VBox alloc failure\n");
+ return;
+ }
+
+ vbox_report_guest_info(VBOXOSTYPE_Win31);
if ((err = vbox_set_mouse(true))) {
vbox_logs("VBox enable failure\n");
- vbox_deinit_callbacks();
+ vbox_free_buffers();
return;
}
@@ -199,7 +203,7 @@ VOID FAR PASCAL Disable(VOID)
#if ENABLE_VBOX
if (mouseflags & MOUSEFLAGS_VBOX_ENABLED) {
vbox_set_mouse(false);
- vbox_deinit_callbacks();
+ vbox_free_buffers();
vbox_logs("VBOX Disabled!\n");
mouseflags &= ~MOUSEFLAGS_VBOX_ENABLED;
}