aboutsummaryrefslogtreecommitdiff
path: root/w16mouse.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-03 22:58:39 +0200
committerJavier <dev.git@javispedro.com>2022-04-03 22:58:39 +0200
commitf9b0699da8adb44fd91640180a7b70639a43449b (patch)
tree81fcbd285a306b85f21086d1c7d37e77af71ed12 /w16mouse.c
parent71f66c759930ce22f099ad1631f05ddb3e0ccd8a (diff)
downloadvbados-f9b0699da8adb44fd91640180a7b70639a43449b.tar.gz
vbados-f9b0699da8adb44fd91640180a7b70639a43449b.zip
replace some custom asm utils with watcom intrinsincs
Diffstat (limited to 'w16mouse.c')
-rw-r--r--w16mouse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/w16mouse.c b/w16mouse.c
index f4c16a9..5660b81 100644
--- a/w16mouse.c
+++ b/w16mouse.c
@@ -124,7 +124,8 @@ BOOL FAR PASCAL LibMain(HINSTANCE hInstance, WORD wDataSegment,
uint16_t version = int33_get_driver_version();
// For now we just check for the presence of any int33 driver version
- if (version <= 0) {
+ if (version == 0) {
+ // No one responded to our request, we can assume no driver
// This will cause a "can't load .drv" message from Windows
return 0;
}
@@ -147,9 +148,9 @@ WORD FAR PASCAL Inquire(LPMOUSEINFO lpMouseInfo)
VOID FAR PASCAL Enable(LPFN_MOUSEEVENT lpEventProc)
{
// Store the windows-given callback
- cli(); // Write to far pointer may not be atomic, and we could be interrupted mid-write
+ _disable(); // Write to far pointer may not be atomic, and we could be interrupted mid-write
eventproc = lpEventProc;
- sti();
+ _enable();
if (!enabled) {
int33_reset();