Author: hbelusca Date: Sat Mar 1 20:52:46 2014 New Revision: 62370
URL: http://svn.reactos.org/svn/reactos?rev=62370&view=rev Log: [NTVDM]: Rework the code template to be used when we will support mice in ntvdm.
Modified: branches/ntvdm/subsystems/ntvdm/hardware/ps2.c
Modified: branches/ntvdm/subsystems/ntvdm/hardware/ps2.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware/... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/hardware/ps2.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/hardware/ps2.c [iso-8859-1] Sat Mar 1 20:52:46 2014 @@ -337,17 +337,20 @@ RegisterIoPort(PS2_DATA_PORT , PS2ReadPort, PS2WritePort);
#if 0 - if (MousePresent) - { - /* Support mouse input events if there is a mouse on the system */ - if (GetConsoleMode(ConsoleInput, &ConInMode)) - SetConsoleMode(ConsoleInput, ConInMode | ENABLE_MOUSE_INPUT); - } - else - { - /* Do not support mouse input events if there is no mouse on the system */ - if (GetConsoleMode(ConsoleInput, &ConInMode)) - SetConsoleMode(ConsoleInput, ConInMode & ~ENABLE_MOUSE_INPUT); + if (GetConsoleMode(ConsoleInput, &ConInMode)) + { + if (MousePresent) + { + /* Support mouse input events if there is a mouse on the system */ + ConInMode |= ENABLE_MOUSE_INPUT; + } + else + { + /* Do not support mouse input events if there is no mouse on the system */ + ConInMode &= ~ENABLE_MOUSE_INPUT; + } + + SetConsoleMode(ConsoleInput, ConInMode); } #endif