From de43afbb54d317bf4c88ff8ea444c50347a548f3 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 25 Aug 2018 14:23:09 -0500 Subject: [PATCH] Fix warnings when building on newer Windows 10 SDK versions. --- src/xenia/hid/xinput/xinput_input_driver.cc | 10 +++++++++- src/xenia/ui/file_picker_win.cc | 6 ++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/xenia/hid/xinput/xinput_input_driver.cc b/src/xenia/hid/xinput/xinput_input_driver.cc index 9e3b95eaa..b0c748e20 100644 --- a/src/xenia/hid/xinput/xinput_input_driver.cc +++ b/src/xenia/hid/xinput/xinput_input_driver.cc @@ -22,10 +22,18 @@ namespace xinput { XInputInputDriver::XInputInputDriver(xe::ui::Window* window) : InputDriver(window) { +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8 && _WIN32_WINNT < _WIN32_WINNT_WIN10) + // TODO(gibbed): Is this necessary? XInputEnable(TRUE); +#endif } -XInputInputDriver::~XInputInputDriver() { XInputEnable(FALSE); } +XInputInputDriver::~XInputInputDriver() { +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8 && _WIN32_WINNT < _WIN32_WINNT_WIN10) + // TODO(gibbed): Is this necessary? + XInputEnable(FALSE); +#endif +} X_STATUS XInputInputDriver::Setup() { return X_STATUS_SUCCESS; } diff --git a/src/xenia/ui/file_picker_win.cc b/src/xenia/ui/file_picker_win.cc index 9014b60cb..f97c828cd 100644 --- a/src/xenia/ui/file_picker_win.cc +++ b/src/xenia/ui/file_picker_win.cc @@ -36,11 +36,9 @@ class CDialogEventHandler : public IFileDialogEvents, IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) { static const QITAB qit[] = { {&__uuidof(IFileDialogEvents), - static_cast( - OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler))}, + OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler)}, {&__uuidof(IFileDialogControlEvents), - static_cast( - OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler))}, + OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler)}, {0}, }; return QISearch(this, qit, riid, ppv);