Platform (Windows): don't error out on i686

This commit is contained in:
李通洲
2026-03-02 14:41:47 +08:00
parent 70fa1341a8
commit 75f4a3d92d
+2
View File
@@ -315,9 +315,11 @@ static void getSystemArchitecture(FFPlatformSysinfo* info)
static void getCwd(FFPlatform* platform)
{
#if _WIN64
static_assert(
offsetof(RTL_USER_PROCESS_PARAMETERS, Reserved2[5]) == 0x38,
"CurrentDirectory should be at offset 0x38 in RTL_USER_PROCESS_PARAMETERS. Structure layout mismatch detected.");
#endif
PCURDIR cwd = (PCURDIR) &NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->Reserved2[5];
ffStrbufSetNWS(&platform->cwd, cwd->DosPath.Length / sizeof(WCHAR), cwd->DosPath.Buffer);
ffStrbufReplaceAllC(&platform->cwd, '\\', '/');