]> xenbits.xensource.com Git - seabios.git/commitdiff
Update invoke_mouse_handler() to use need_hop_back()
authorKevin O'Connor <kevin@koconnor.net>
Mon, 29 Sep 2014 23:23:45 +0000 (19:23 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 30 Sep 2014 13:42:55 +0000 (09:42 -0400)
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>
src/mouse.c

index 100255d60cfbb95f1562f632d13c30f1877453a9..466f55a2296e340050616e8c9f93e84378c1b195 100644 (file)
@@ -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();
 }