From 67468cce344dd5e503aaa1063845f34720563f79 Mon Sep 17 00:00:00 2001 From: Conrad Poelman Date: Mon, 3 Aug 2020 18:26:24 -0400 Subject: [PATCH] Declare "result" as LONG for Mingw build Win32's ChangeDisplaySettingsEx() API function is documented as returning `LONG`, which evidently is not always the same as `unsigned int` (Mingw64.) This cause a compile error on Mingw with clang10. --- src/osgViewer/GraphicsWindowWin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index 7e32bf335..7bf55c5f6 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -846,7 +846,7 @@ bool Win32WindowingSystem::changeScreenSettings( const osg::GraphicsContext::Scr // Start by testing if the change would be successful (without applying it) // - unsigned int result = ::ChangeDisplaySettingsEx(displayDevice.DeviceName, &deviceMode, NULL, CDS_TEST, NULL); + LONG result = ::ChangeDisplaySettingsEx(displayDevice.DeviceName, &deviceMode, NULL, CDS_TEST, NULL); if (result==DISP_CHANGE_SUCCESSFUL) { result = ::ChangeDisplaySettingsEx(displayDevice.DeviceName, &deviceMode, NULL, 0, NULL);