Author: ekohl
Date: Thu Apr 17 20:56:12 2014
New Revision: 62767
URL:
http://svn.reactos.org/svn/reactos?rev=62767&view=rev
Log:
[SYSDM]
Bugfix: Enable the user to set a system managed paging file size if no paging file was set
before. The user does not need to set a custom paging file size before setting the system
managed paging file size.
Modified:
trunk/reactos/dll/cpl/sysdm/virtmem.c
Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/virtmem.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/sysdm/virtmem.c [iso-8859-1] Thu Apr 17 20:56:12 2014
@@ -465,10 +465,6 @@
return;
}
- if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) &&
- (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize))
- pVirtMem->bModified = TRUE;
-
pVirtMem->Pagefile[DriveIndex].NewMinSize = MinSize;
pVirtMem->Pagefile[DriveIndex].NewMaxSize = MaxSize;
pVirtMem->Pagefile[DriveIndex].bUsed = TRUE;
@@ -476,25 +472,23 @@
else if (IsDlgButtonChecked(pVirtMem->hSelf,
IDC_NOPAGEFILE) == BST_CHECKED)
{
- if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) &&
- (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize))
- pVirtMem->bModified = TRUE;
-
- /* Set sizes to -1 */
+ /* No pagefile */
pVirtMem->Pagefile[DriveIndex].NewMinSize = -1;
pVirtMem->Pagefile[DriveIndex].NewMaxSize = -1;
pVirtMem->Pagefile[DriveIndex].bUsed = TRUE;
}
else
{
- if ((pVirtMem->Pagefile[DriveIndex].NewMinSize != MinSize) &&
- (pVirtMem->Pagefile[DriveIndex].NewMaxSize != MaxSize))
- pVirtMem->bModified = TRUE;
-
+ /* System managed size*/
pVirtMem->Pagefile[DriveIndex].NewMinSize = 0;
pVirtMem->Pagefile[DriveIndex].NewMaxSize = 0;
pVirtMem->Pagefile[DriveIndex].bUsed = TRUE;
}
+
+ /* Set the modified flag if min or max size has changed */
+ if ((pVirtMem->Pagefile[DriveIndex].OldMinSize !=
pVirtMem->Pagefile[DriveIndex].NewMinSize) ||
+ (pVirtMem->Pagefile[DriveIndex].OldMaxSize !=
pVirtMem->Pagefile[DriveIndex].NewMaxSize))
+ pVirtMem->bModified = TRUE;
UpdatePagefileEntry(pVirtMem, Index, DriveIndex);
}