mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 13:33:42 +00:00
[NTVDM]
adjust VdmMenuPos in case the menu already exists CORE-9487 svn path=/trunk/; revision=67971
This commit is contained in:
parent
9565c83981
commit
b1e5b0ed46
1 changed files with 4 additions and 2 deletions
|
@ -126,8 +126,12 @@ VdmMenuExists(HMENU hConsoleMenu)
|
|||
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 @@ CreateVdmMenu(HANDLE ConOutHandle)
|
|||
|
||||
/* 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))
|
||||
|
|
Loading…
Reference in a new issue