From 14f18bfc0d79bd66111c96d3dfc56e55b842d9cd Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Thu, 25 Mar 1999 16:41:35 +0000 Subject: [PATCH] Implemented Get Shift Flags function. --- msdos/int16.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/msdos/int16.c b/msdos/int16.c index 1de9f1962f1..8875ab550ba 100644 --- a/msdos/int16.c +++ b/msdos/int16.c @@ -11,6 +11,7 @@ #include "console.h" #include "wincon.h" #include "debug.h" +#include "winuser.h" /********************************************************************** * INT_Int16Handler @@ -50,7 +51,25 @@ void WINAPI INT_Int16Handler( CONTEXT *context ) break; case 0x02: /* Get Shift Flags */ - FIXME(int16, "Get Shift Flags - Not Supported\n"); + AL_reg(context) = 0; + + if (GetAsyncKeyState(VK_RSHIFT)) + AL_reg(context) |= 0x01; + if (GetAsyncKeyState(VK_LSHIFT)) + AL_reg(context) |= 0x02; + if (GetAsyncKeyState(VK_LCONTROL) || GetAsyncKeyState(VK_RCONTROL)) + AL_reg(context) |= 0x04; + if (GetAsyncKeyState(VK_LMENU) || GetAsyncKeyState(VK_RMENU)) + AL_reg(context) |= 0x08; + if (GetAsyncKeyState(VK_SCROLL)) + AL_reg(context) |= 0x10; + if (GetAsyncKeyState(VK_NUMLOCK)) + AL_reg(context) |= 0x20; + if (GetAsyncKeyState(VK_CAPITAL)) + AL_reg(context) |= 0x40; + if (GetAsyncKeyState(VK_INSERT)) + AL_reg(context) |= 0x80; + TRACE(int16, "Get Shift Flags: returning 0x%02x\n", AL_reg(context)); break; case 0x03: /* Set Typematic Rate and Delay */