aboutsummaryrefslogtreecommitdiff
path: root/mousetsr.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-20 02:45:41 +0200
committerJavier <dev.git@javispedro.com>2022-04-20 02:45:41 +0200
commita2aaf8a11f318f4f1dda9c5f15cf2257a3c73f9a (patch)
treec4f13ff3834cd1057f458a314c6f01769d3aeef8 /mousetsr.h
parent83b640d102b22e543ff924c443e0d2c9ab33d2ed (diff)
downloadvbados-a2aaf8a11f318f4f1dda9c5f15cf2257a3c73f9a.tar.gz
vbados-a2aaf8a11f318f4f1dda9c5f15cf2257a3c73f9a.zip
add back support for using ps/2 bios with 3-byte packets
apparently some BIOSes and DOSBox don't support 1-byte streaming mode, and neither does win386 without a special vkd
Diffstat (limited to 'mousetsr.h')
-rw-r--r--mousetsr.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/mousetsr.h b/mousetsr.h
index 5e10afa..68377ab 100644
--- a/mousetsr.h
+++ b/mousetsr.h
@@ -110,9 +110,11 @@ typedef struct tsrdata {
/** Whether the current mouse has a wheel (and support is enabled). */
bool haswheel;
#endif
- /** Packet size that we are currently using. */
+ /** Packet size that the BIOS is currently using. Either 1 (streaming) or 3 (plain). */
+ uint8_t bios_packet_size;
+ /** Packet size that we are currently expecting internally. Usually 3 (plain) or 4 (with wheel). */
uint8_t packet_size;
- /** Number of bytes received so far (< packet_size). */
+ /** For streaming mode: number of bytes received so far (< packet_size). */
uint8_t cur_packet_bytes;
/** Stores the bytes received so far (cur_bytes). */
uint8_t ps2_packet[MAX_PS2_PACKET_SIZE];
@@ -195,6 +197,8 @@ typedef struct tsrdata {
/** Information that we pass to Windows 386 on startup. */
win386_startup_info w386_startup;
win386_instance_item w386_instance[2];
+ /** Whether Windows 386 is running. */
+ bool haswin386 : 1;
/** Whether Windows 386 is rendering the cursor for us,
* and therefore we should hide our own. */
bool w386cursor : 1;