diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-02-23 17:11:27 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-02-23 17:11:27 +0000 |
commit | e0193a9425807cc61779c3b8680c5b551685ba65 (patch) | |
tree | b3dacd48e37032f60b2b450a68d406d9deee2e1e /src/glut/dos/PC_HW | |
parent | c7a3356746b8751fa0f04c8c0b674e26d73fdb76 (diff) |
DOS updates from Daniel Borca
Diffstat (limited to 'src/glut/dos/PC_HW')
-rw-r--r-- | src/glut/dos/PC_HW/pc_irq.S | 6 | ||||
-rw-r--r-- | src/glut/dos/PC_HW/pc_mouse.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/glut/dos/PC_HW/pc_irq.S b/src/glut/dos/PC_HW/pc_irq.S index 2a6302f71a..8f19f8eb9f 100644 --- a/src/glut/dos/PC_HW/pc_irq.S +++ b/src/glut/dos/PC_HW/pc_irq.S @@ -1,5 +1,5 @@ /*
- * PC/HW routine collection v0.1 for DOS/DJGPP
+ * PC/HW routine collection v0.2 for DOS/DJGPP
*
* Copyright (C) 2002 - Borca Daniel
* Email : dborca@yahoo.com
@@ -129,7 +129,7 @@ __irq_wrapper_##x: ; \ pushl %es ; \
pushl %fs ; \
pushl %gs ; \
- movw %ss, %bx ; \
+ movl %ss, %ebx ; \
movl %esp, %esi ; \
movl %cs:___djgpp_ds_alias, %ss ; \
movl %cs:__irq_stack_##x, %esp ; \
@@ -141,7 +141,7 @@ __irq_wrapper_##x: ; \ pushl %fs ; \
popl %gs ; \
call *__irq_hook_##x ; \
- movw %bx, %ss ; \
+ movl %ebx, %ss ; \
movl %esi, %esp ; \
testl %eax, %eax ; \
popl %gs ; \
diff --git a/src/glut/dos/PC_HW/pc_mouse.c b/src/glut/dos/PC_HW/pc_mouse.c index cc3396cb21..2a692eceb6 100644 --- a/src/glut/dos/PC_HW/pc_mouse.c +++ b/src/glut/dos/PC_HW/pc_mouse.c @@ -1,5 +1,5 @@ /*
- * PC/HW routine collection v0.1 for DOS/DJGPP
+ * PC/HW routine collection v0.2 for DOS/DJGPP
*
* Copyright (C) 2002 - Borca Daniel
* Email : dborca@yahoo.com
@@ -15,6 +15,12 @@ #define MOUSE_STACK_SIZE 16384
+#define CLEAR_MICKEYS() \
+ do { \
+ __asm__ __volatile__ ("movw $0xb, %%ax; int $0x33":::"%eax", "%ecx", "%edx"); \
+ ox = oy = 0; \
+ } while (0)
+
extern void mouse_wrapper (void);
extern void mouse_wrapper_end (void);
@@ -161,6 +167,8 @@ int pc_install_mouse (void) mouse_regs.x.es = mouse_callback>>16;
__dpmi_int(0x33, &mouse_regs);
+ CLEAR_MICKEYS();
+
emulat3 = buttons<3;
pc_atexit(pc_remove_mouse);
return buttons;
|