Author: cwittich
Date: Sat May 30 16:05:10 2015
New Revision: 67971
URL:
http://svn.reactos.org/svn/reactos?rev=67971&view=rev
Log:
[NTVDM]
adjust VdmMenuPos in case the menu already exists
CORE-9487
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/ntvd…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c [iso-8859-1] Sat May 30 16:05:10 2015
@@ -126,7 +126,11 @@
for (i = 0; i <= MenuPos; i++)
{
if (GetMenuItemID(hConsoleMenu, i) == ID_SHOWHIDE_MOUSE)
+ {
+ /* set VdmMenuPos to the position of the existing menu */
+ VdmMenuPos = i - 1;
return TRUE;
+ }
}
return FALSE;
}
@@ -141,8 +145,6 @@
/* Get the position where we are going to insert our menu items */
VdmMenuPos = GetMenuItemCount(hConsoleMenu);
- // FIXME: What happens if the menu already exist?
- // VdmMenuPos points *after* the already existing menu!
/* Really add the menu if it doesn't already exist (in case eg. NTVDM crashed)
*/
if (!VdmMenuExists(hConsoleMenu))