mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs/util: Add function to get Windows x64 emulation status
This commit is contained in:
@@ -1088,9 +1088,26 @@ bool is_64_bit_windows(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool is_arm64_windows(void)
|
||||
{
|
||||
#if defined(_M_ARM64) || defined(_M_ARM64EC)
|
||||
return true;
|
||||
#else
|
||||
USHORT processMachine;
|
||||
USHORT nativeMachine;
|
||||
bool result = IsWow64Process2(GetCurrentProcess(), &processMachine,
|
||||
&nativeMachine);
|
||||
return (result && (nativeMachine == IMAGE_FILE_MACHINE_ARM64));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool os_get_emulation_status(void)
|
||||
{
|
||||
#if defined(_M_ARM64) || defined(_M_ARM64EC)
|
||||
return false;
|
||||
#else
|
||||
return is_arm64_windows();
|
||||
#endif
|
||||
}
|
||||
|
||||
void get_reg_dword(HKEY hkey, LPCWSTR sub_key, LPCWSTR value_name,
|
||||
|
||||
@@ -48,6 +48,7 @@ static inline int win_version_compare(const struct win_version_info *dst,
|
||||
}
|
||||
|
||||
EXPORT bool is_64_bit_windows(void);
|
||||
EXPORT bool is_arm64_windows(void);
|
||||
EXPORT bool get_dll_ver(const wchar_t *lib, struct win_version_info *info);
|
||||
EXPORT void get_win_ver(struct win_version_info *info);
|
||||
EXPORT uint32_t get_win_ver_int(void);
|
||||
|
||||
Reference in New Issue
Block a user