diff --git a/progmgr/group.c b/progmgr/group.c index 4717aca..93f91c4 100644 --- a/progmgr/group.c +++ b/progmgr/group.c @@ -417,8 +417,8 @@ UINT CalculateGroupMemory(_In_ PGROUP pGroup, _In_ UINT cItems) // have some memory ready cItemBlock = pGroup->cItemArray + cItems; - // round the amount of items to the nearest but highest 16 - cItemBlock = ((cItemBlock + 16) / 16) * 16; + // round the amount of items to the nearest but highest ITEM_BATCH_COUNT + cItemBlock = ((cItemBlock + ITEM_BATCH_COUNT) / ITEM_BATCH_COUNT) * ITEM_BATCH_COUNT; // finally calculate the total group size cbGroupSize += cItemBlock * sizeof(ITEM); diff --git a/progmgr/group.h b/progmgr/group.h index 1415b85..31c6f73 100644 --- a/progmgr/group.h +++ b/progmgr/group.h @@ -17,6 +17,7 @@ #define MAX_GROUPS 512 #define MAX_ITEMS 512 #define MAX_TITLE_LENGTH 255 // Same as the registry key name max length +#define ITEM_BATCH_COUNT 8 // Group Format Definitions #define GRP_SIGNATURE 0x47324D50L // PM2G #define GRP_VERSION 2 // Increment for breaking changes, format version @@ -28,6 +29,7 @@ // Item Flag Values (DWORD) #define ITM_FLAG_MINIMIZED 0x00000001 #define ITM_FLAG_MAXIMIZED 0x00000002 +#define ITM_FLAG_PRIVILEGE 0x00000004 /* Structures */ // Item Structure