Skip to content

Commit f1868d7

Browse files
committed
fix(sync-merge): Correct post-merge issues and ensure both games build
Fixes applied after thesuperhackers sync merge: 1. Registry type fixes (DWORD vs unsigned long) - registry.cpp used unsigned long for type params - Linux compat stub expects DWORD (unsigned int) - Convert to DWORD for consistency across all platforms 2. Generals dx8wrapper frame stats incompatibility - Upstream PR TheSuperHackers#2507 refactored to struct-based frame statistics - GeneralsMD (Zero Hour) uses single pointers: compatible - Generals base game uses MAX_VERTEX_STREAMS arrays: incompatible - Solution: Keep Generals on main version, accept struct for Zero Hour only - Rationale: Generators is secondary target; avoid risky refactors Build results (macOS validation): - CMake configure: ✓ SUCCESS - GeneralsXZH (Zero Hour): ✓ SUCCESS - GeneralsX (Generals): ✓ SUCCESS All binaries generated. Cross-platform stack (SDL3/DXVK/OpenAL) functional.
1 parent 929bcf7 commit f1868d7

3 files changed

Lines changed: 527 additions & 147 deletions

File tree

Core/Libraries/Source/WWVegas/WWDownload/registry.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ bool getStringFromRegistry(HKEY root, std::string path, std::string key, std::s
2828
{
2929
HKEY handle;
3030
unsigned char buffer[256];
31-
unsigned long size = 256;
32-
unsigned long type;
31+
DWORD size = 256;
32+
DWORD type;
3333
int returnValue;
3434

3535
if ((returnValue = RegOpenKeyEx( root, path.c_str(), 0, KEY_READ, &handle )) == ERROR_SUCCESS)
@@ -51,8 +51,8 @@ bool getUnsignedIntFromRegistry(HKEY root, std::string path, std::string key, un
5151
{
5252
HKEY handle;
5353
unsigned long buffer;
54-
unsigned long size = sizeof(buffer);
55-
unsigned long type;
54+
DWORD size = sizeof(buffer);
55+
DWORD type;
5656
int returnValue;
5757

5858
if ((returnValue = RegOpenKeyEx( root, path.c_str(), 0, KEY_READ, &handle )) == ERROR_SUCCESS)
@@ -73,8 +73,8 @@ bool getUnsignedIntFromRegistry(HKEY root, std::string path, std::string key, un
7373
bool setStringInRegistry( HKEY root, std::string path, std::string key, std::string val)
7474
{
7575
HKEY handle;
76-
unsigned long type;
77-
unsigned long returnValue;
76+
DWORD type;
77+
int returnValue;
7878
int size;
7979
char lpClass[] = "REG_NONE";
8080

@@ -88,12 +88,13 @@ bool setStringInRegistry( HKEY root, std::string path, std::string key, std::str
8888

8989
return (returnValue == ERROR_SUCCESS);
9090
}
91+
}
9192

9293
bool setUnsignedIntInRegistry( HKEY root, std::string path, std::string key, unsigned int val)
9394
{
9495
HKEY handle;
95-
unsigned long type;
96-
unsigned long returnValue;
96+
DWORD type;
97+
int returnValue;
9798
int size;
9899
char lpClass[] = "REG_NONE";
99100

0 commit comments

Comments
 (0)