aboutsummaryrefslogtreecommitdiff
path: root/int2fwin.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-12-31 15:24:54 +0100
committerJavier <dev.git@javispedro.com>2022-12-31 15:26:56 +0100
commitea30df89b6fa62874b82cd75e6cf81a089ee2d25 (patch)
tree50ba771aef093b849411fcb2cee5f90dcc668597 /int2fwin.h
parent831d16b852dc13a9f5ff7a1b56302f94ed193565 (diff)
downloadvbados-ea30df89b6fa62874b82cd75e6cf81a089ee2d25.tar.gz
vbados-ea30df89b6fa62874b82cd75e6cf81a089ee2d25.zip
restore int33 callback+window when windows goes foreground
Even though it should not be necessary, this should help some cases where mouse control is lost when returning from a fullscreen DOS box.
Diffstat (limited to 'int2fwin.h')
-rw-r--r--int2fwin.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/int2fwin.h b/int2fwin.h
index abd5f2e..d3bd969 100644
--- a/int2fwin.h
+++ b/int2fwin.h
@@ -59,8 +59,8 @@ enum vxd_device_ids
VMD_DEVICE_ID = 0xC
};
-static bool windows_386_enhanced_mode(void);
-#pragma aux windows_386_enhanced_mode = \
+static bool is_windows_386_enhanced_mode(void);
+#pragma aux is_windows_386_enhanced_mode = \
"mov ax, 0x1600" \
"int 0x2F" \
"test al, 0x7F" /* return value is either 0x80 or 0x00 if win386 is not running */ \
@@ -83,8 +83,7 @@ enum vmd_apis {
VMD_SET_MOUSE_TYPE = 0x100,
};
-enum vmd_callouts
-{
+enum vmd_callouts {
/** VMD emits this to know if there is a "win386 aware" DOS mouse driver installed.
* If there is, and the driver responds with CX!=0, VMD will assume
* the driver is taking care of its own instancing
@@ -96,8 +95,7 @@ enum vmd_callouts
VMD_CALLOUT_GET_DOS_MOUSE_API = 0x1
};
-enum vmd_dos_mouse_api_actions
-{
+enum vmd_dos_mouse_api_actions {
VMD_ACTION_MOUSE_EVENT = 1,
VMD_ACTION_HIDE_CURSOR = 2,
VMD_ACTION_SHOW_CURSOR = 3
@@ -129,17 +127,4 @@ static inline bool vmd_set_mouse_type(LPFN *vmd_entry, uint8_t mousetype, int8_t
__value [al] \
__modify [ax]
-/* Miscelaneous helpers. */
-
-static inline void hook_int2f(LPFN *prev, LPFN new)
-{
- *prev = _dos_getvect(0x2F);
- _dos_setvect(0x2F, new);
-}
-
-static inline void unhook_int2f(LPFN prev)
-{
- _dos_setvect(0x2F, prev);
-}
-
#endif