cmake, libobs, win-capture: Fix VS2017 warnings

This commit is contained in:
jp9000
2018-03-12 16:16:38 -07:00
parent 1d391166d0
commit 4b54bde426
5 changed files with 14 additions and 6 deletions

View File

@@ -456,7 +456,7 @@ static bool hotkey_start(void *data, obs_hotkey_pair_id id,
if (pressed && gc->config.mode == CAPTURE_MODE_HOTKEY) {
info("Activate hotkey pressed");
os_atomic_set_long(&gc->hotkey_window,
(long)GetForegroundWindow());
(long)(uintptr_t)GetForegroundWindow());
os_atomic_set_bool(&gc->deactivate_hook, true);
os_atomic_set_bool(&gc->activate_hook_now, true);
}
@@ -1582,7 +1582,8 @@ static void game_capture_tick(void *data, float seconds)
bool activate_now = os_atomic_set_bool(&gc->activate_hook_now, false);
if (activate_now) {
HWND hwnd = (HWND)os_atomic_load_long(&gc->hotkey_window);
HWND hwnd = (HWND)(uintptr_t)os_atomic_load_long(
&gc->hotkey_window);
if (is_uwp_window(hwnd))
hwnd = get_uwp_actual_window(hwnd);