mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
libobs: Refactor check for Windows bitness/arch
Commit aa899c2
(PR #603) added logging for Windows bitness/arch, but it
was a bit incomplete/short-sighted. It only added that information to
the regular logs. This commit makes it easier to retrieve that
information for other purposes, like the crash handler.
This commit is contained in:
parent
85243139d9
commit
788a1e22b7
|
@ -172,16 +172,6 @@ static void log_available_memory(void)
|
||||||
note);
|
note);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_64_bit_windows(void)
|
|
||||||
{
|
|
||||||
#if defined(_WIN64)
|
|
||||||
return true;
|
|
||||||
#elif defined(_WIN32)
|
|
||||||
BOOL b64 = false;
|
|
||||||
return IsWow64Process(GetCurrentProcess(), &b64) && b64;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void log_windows_version(void)
|
static void log_windows_version(void)
|
||||||
{
|
{
|
||||||
struct win_version_info ver;
|
struct win_version_info ver;
|
||||||
|
|
|
@ -757,6 +757,16 @@ bool get_dll_ver(const wchar_t *lib, struct win_version_info *ver_info)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_64_bit_windows(void)
|
||||||
|
{
|
||||||
|
#if defined(_WIN64)
|
||||||
|
return true;
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
BOOL b64 = false;
|
||||||
|
return IsWow64Process(GetCurrentProcess(), &b64) && b64;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#define WINVER_REG_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
|
#define WINVER_REG_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
|
||||||
|
|
||||||
void get_win_ver(struct win_version_info *info)
|
void get_win_ver(struct win_version_info *info)
|
||||||
|
|
|
@ -29,6 +29,7 @@ struct win_version_info {
|
||||||
int revis;
|
int revis;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EXPORT bool is_64_bit_windows(void);
|
||||||
EXPORT bool get_dll_ver(const wchar_t *lib, struct win_version_info *info);
|
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 void get_win_ver(struct win_version_info *info);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue