aboutsummaryrefslogtreecommitdiff
path: root/dostsr.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-09 00:04:39 +0200
committerJavier <dev.git@javispedro.com>2022-04-09 00:04:39 +0200
commit90cecec048ee29a4971b8bda571da2a2b9613024 (patch)
tree5aa8e9c6a8f8694f12972ab89e215dfcfed65db2 /dostsr.h
parent0f6414cb3f8afa2012f6567e2fbfe844b8bd4b78 (diff)
downloadvbados-90cecec048ee29a4971b8bda571da2a2b9613024.tar.gz
vbados-90cecec048ee29a4971b8bda571da2a2b9613024.zip
support generating a keystroke on wheel movement
Diffstat (limited to 'dostsr.h')
-rw-r--r--dostsr.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/dostsr.h b/dostsr.h
index b3a5b3c..a025c92 100644
--- a/dostsr.h
+++ b/dostsr.h
@@ -71,8 +71,12 @@ typedef struct tsrdata {
#if USE_WIN386
void (__interrupt __far *prev_int2f_handler)();
#endif
+#if USE_WHEEL
/** Whether to enable & use wheel mouse. */
bool usewheel;
+ /** Key (scancode) to generate on wheel scroll up/down, or 0 for none. */
+ uint16_t wheel_up_key, wheel_down_key;
+#endif
// Video settings
/** Information of the current video mode. */
@@ -90,8 +94,10 @@ typedef struct tsrdata {
struct point screen_granularity;
// Detected mouse hardware
+#if USE_WHEEL
/** Whether the current mouse has a wheel (and support is enabled). */
bool haswheel;
+#endif
// Current mouse settings
/** Mouse sensitivity/speed. */
@@ -112,6 +118,11 @@ typedef struct tsrdata {
struct point cursor_hotspot;
/** Masks for the graphic cursor. */
uint16_t cursor_graphic[GRAPHIC_CURSOR_DATA_LEN/sizeof(uint16_t)];
+#if USE_WHEEL
+ /** Whether someone asked for the int33 wheel API, in which case we
+ * should send them wheel movement rather than fake keypresses. */
+ bool usewheelapi;
+#endif
// Current mouse status
/** Current cursor position (in pixels). */