aboutsummaryrefslogtreecommitdiffstats
path: root/src/mouse.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-29 19:39:31 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-09-30 14:19:29 -0400
commit80568256057827956abfd6254a78f11d818ab344 (patch)
treee0d462f0c8899d5d4f0c575c3f33be13bb90e938 /src/mouse.c
parent7e1baf2775160404fa29e6b1cd517ae92b6ceebf (diff)
downloadseabios-80568256057827956abfd6254a78f11d818ab344.tar.gz
Update stack_hop_back() to jump to 16bit mode if called in 32bit mode.
Also, update callers to rely on this feature. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/mouse.c')
-rw-r--r--src/mouse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mouse.c b/src/mouse.c
index 466f55a2..6d1f5b77 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -274,13 +274,17 @@ handle_15c2(struct bregs *regs)
}
}
-static void
+void VISIBLE16
invoke_mouse_handler(void)
{
+ if (!CONFIG_MOUSE)
+ return;
if (need_hop_back()) {
- stack_hop_back(0, 0, invoke_mouse_handler);
+ extern void _cfunc16_invoke_mouse_handler(void);
+ stack_hop_back(0, 0, _cfunc16_invoke_mouse_handler);
return;
}
+ ASSERT16();
u16 ebda_seg = get_ebda_seg();
u16 status = GET_EBDA(ebda_seg, mouse_data[0]);
u16 X = GET_EBDA(ebda_seg, mouse_data[1]);