Moved declarations to fix MSVC2010 builds (C89 compliance) (#17768)

This commit is contained in:
odditude42 2025-04-03 18:42:02 -04:00 committed by GitHub
parent 7a5fcd460d
commit 9de225ed45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -283,7 +283,6 @@ static size_t frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
/* Windows 2000 and later */
SYSTEM_INFO si = {{0}};
OSVERSIONINFOEX vi = {0};
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
#if _WIN32_WINNT >= 0x0600
/* Vista and later*/
const char win_ver_reg_key[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
@ -300,7 +299,9 @@ static size_t frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
/* end Vista and later; still within Windows 2000 and later block */
#endif
GetSystemInfo(&si);
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetSystemInfo(&si);
switch (si.wProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_AMD64: