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:
Ryan Foster 2016-11-07 15:43:05 -05:00 committed by jp9000
parent 85243139d9
commit 788a1e22b7
3 changed files with 11 additions and 10 deletions

View file

@ -172,16 +172,6 @@ static void log_available_memory(void)
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)
{
struct win_version_info ver;

View file

@ -757,6 +757,16 @@ bool get_dll_ver(const wchar_t *lib, struct win_version_info *ver_info)
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"
void get_win_ver(struct win_version_info *info)

View file

@ -29,6 +29,7 @@ struct win_version_info {
int revis;
};
EXPORT bool is_64_bit_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);