make item batch count a define instead of being as hard-coded
This commit is contained in:
@@ -417,8 +417,8 @@ UINT CalculateGroupMemory(_In_ PGROUP pGroup, _In_ UINT cItems)
|
|||||||
// have some memory ready
|
// have some memory ready
|
||||||
cItemBlock = pGroup->cItemArray + cItems;
|
cItemBlock = pGroup->cItemArray + cItems;
|
||||||
|
|
||||||
// round the amount of items to the nearest but highest 16
|
// round the amount of items to the nearest but highest ITEM_BATCH_COUNT
|
||||||
cItemBlock = ((cItemBlock + 16) / 16) * 16;
|
cItemBlock = ((cItemBlock + ITEM_BATCH_COUNT) / ITEM_BATCH_COUNT) * ITEM_BATCH_COUNT;
|
||||||
|
|
||||||
// finally calculate the total group size
|
// finally calculate the total group size
|
||||||
cbGroupSize += cItemBlock * sizeof(ITEM);
|
cbGroupSize += cItemBlock * sizeof(ITEM);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#define MAX_GROUPS 512
|
#define MAX_GROUPS 512
|
||||||
#define MAX_ITEMS 512
|
#define MAX_ITEMS 512
|
||||||
#define MAX_TITLE_LENGTH 255 // Same as the registry key name max length
|
#define MAX_TITLE_LENGTH 255 // Same as the registry key name max length
|
||||||
|
#define ITEM_BATCH_COUNT 8
|
||||||
// Group Format Definitions
|
// Group Format Definitions
|
||||||
#define GRP_SIGNATURE 0x47324D50L // PM2G
|
#define GRP_SIGNATURE 0x47324D50L // PM2G
|
||||||
#define GRP_VERSION 2 // Increment for breaking changes, format version
|
#define GRP_VERSION 2 // Increment for breaking changes, format version
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
// Item Flag Values (DWORD)
|
// Item Flag Values (DWORD)
|
||||||
#define ITM_FLAG_MINIMIZED 0x00000001
|
#define ITM_FLAG_MINIMIZED 0x00000001
|
||||||
#define ITM_FLAG_MAXIMIZED 0x00000002
|
#define ITM_FLAG_MAXIMIZED 0x00000002
|
||||||
|
#define ITM_FLAG_PRIVILEGE 0x00000004
|
||||||
|
|
||||||
/* Structures */
|
/* Structures */
|
||||||
// Item Structure
|
// Item Structure
|
||||||
|
|||||||
Reference in New Issue
Block a user