aboutsummaryrefslogtreecommitdiff
path: root/src/mouse.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-29 19:23:45 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-09-30 09:42:55 -0400
commit7e1baf2775160404fa29e6b1cd517ae92b6ceebf (patch)
treebf9d97e42de187e7cb2ca237b20e19dd50207966 /src/mouse.c
parentfabc1b51451b466bc11c9f90814961666a265df8 (diff)
downloadseabios-hppa-7e1baf2775160404fa29e6b1cd517ae92b6ceebf.zip
seabios-hppa-7e1baf2775160404fa29e6b1cd517ae92b6ceebf.tar.gz
seabios-hppa-7e1baf2775160404fa29e6b1cd517ae92b6ceebf.tar.bz2
Update invoke_mouse_handler() to use need_hop_back()
Make the mouse handler stack_hop_back() code similar to the other users that use need_stack_hop(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/mouse.c')
-rw-r--r--src/mouse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mouse.c b/src/mouse.c
index 100255d..466f55a 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -275,8 +275,13 @@ handle_15c2(struct bregs *regs)
}
static void
-invoke_mouse_handler(u16 ebda_seg)
+invoke_mouse_handler(void)
{
+ if (need_hop_back()) {
+ stack_hop_back(0, 0, invoke_mouse_handler);
+ return;
+ }
+ u16 ebda_seg = get_ebda_seg();
u16 status = GET_EBDA(ebda_seg, mouse_data[0]);
u16 X = GET_EBDA(ebda_seg, mouse_data[1]);
u16 Y = GET_EBDA(ebda_seg, mouse_data[2]);
@@ -330,5 +335,5 @@ process_mouse(u8 data)
}
SET_EBDA(ebda_seg, mouse_flag1, 0);
- stack_hop_back(ebda_seg, 0, invoke_mouse_handler);
+ invoke_mouse_handler();
}