[Scummvm-git-logs] scummvm master -> 8f6620b84fdb1f1efb65adfd2edd87709f32fb39

digitall 547637+digitall at users.noreply.github.com
Sat May 9 04:47:08 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8f6620b84f SDL2: Fix GCC Compiler Warning about Enum vs. Non-Enum Type in Conditional


Commit: 8f6620b84fdb1f1efb65adfd2edd87709f32fb39
    https://github.com/scummvm/scummvm/commit/8f6620b84fdb1f1efb65adfd2edd87709f32fb39
Author: D G Turner (digitall at scummvm.org)
Date: 2020-05-09T05:41:20+01:00

Commit Message:
SDL2: Fix GCC Compiler Warning about Enum vs. Non-Enum Type in Conditional

The issue is that SDL_GetWindowWMInfo returns a SDL_bool enumeration type
rather than a standard bool. It should be noted that SDL_GetWMInfo used
later in this function returns a int type instead and thus will cast to
bool without warning.

Changed paths:
    backends/platform/sdl/sdl-window.cpp


diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index cb473ea819..fbb2499ab0 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -186,7 +186,7 @@ void SdlWindow::iconifyWindow() {
 bool SdlWindow::getSDLWMInformation(SDL_SysWMinfo *info) const {
 	SDL_VERSION(&info->version);
 #if SDL_VERSION_ATLEAST(2, 0, 0)
-	return _window ? SDL_GetWindowWMInfo(_window, info) : false;
+	return _window ? (SDL_GetWindowWMInfo(_window, info) == SDL_TRUE) : false;
 #else
 	return SDL_GetWMInfo(info);
 #endif




More information about the Scummvm-git-logs mailing list