diff --git a/source/Irrlicht/CIrrDeviceWin32.cpp b/source/Irrlicht/CIrrDeviceWin32.cpp index 88ecc26d..29dcdf91 100644 --- a/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/source/Irrlicht/CIrrDeviceWin32.cpp @@ -435,8 +435,9 @@ irr::core::stringc SJoystickWin32Control::findJoystickName(int index, const JOYC RegCloseKey(hKey); return result; -#endif +#else return ""; +#endif } bool SJoystickWin32Control::activateJoysticks(core::array & joystickInfo) diff --git a/source/Irrlicht/CWGLManager.cpp b/source/Irrlicht/CWGLManager.cpp index 1368c3d7..b7372121 100644 --- a/source/Irrlicht/CWGLManager.cpp +++ b/source/Irrlicht/CWGLManager.cpp @@ -297,7 +297,8 @@ bool CWGLManager::initialize(const SIrrlichtCreationParameters& params, const SE // now get new window CurrentContext.OpenGLWin32.HWnd=videodata.OpenGLWin32.HWnd; // get hdc - if (!(CurrentContext.OpenGLWin32.HDc=GetDC((HWND)videodata.OpenGLWin32.HWnd))) + CurrentContext.OpenGLWin32.HDc=GetDC((HWND)videodata.OpenGLWin32.HWnd); + if (!CurrentContext.OpenGLWin32.HDc) { os::Printer::log("Cannot create a GL device context.", ELL_ERROR); return false;