Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-05-29 06:23:19 +0300
committerCampbell Barton <campbell@blender.org>2022-05-29 06:25:58 +0300
commit93e4b15767cf958d5a07ba6acce25438f244bf22 (patch)
tree3e00d28afcf4f4e2b2c952458feb9ac0b1350553 /intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
parent13373a6ccd5e44d14cd57374820b895bbd0898f3 (diff)
Cleanup: clang-tidy for GHOST X11/SDL/Wayland/NULL backends
Also early exit in some functions.
Diffstat (limited to 'intern/ghost/intern/GHOST_DisplayManagerSDL.cpp')
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerSDL.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
index 740fcc2ef1d..a2fe6a41fb4 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
@@ -109,7 +109,7 @@ GHOST_TSuccess GHOST_DisplayManagerSDL::setCurrentDisplaySetting(
SDL_GetDisplayMode(display, i, &mode);
- if (setting.xPixels > mode.w || setting.yPixels > mode.h) {
+ if ((int)setting.xPixels > mode.w || (int)setting.yPixels > mode.h) {
continue;
}
@@ -122,9 +122,9 @@ GHOST_TSuccess GHOST_DisplayManagerSDL::setCurrentDisplaySetting(
}
}
- if (best_fit == -1)
+ if (best_fit == -1) {
return GHOST_kFailure;
-
+ }
SDL_GetDisplayMode(display, best_fit, &mode);
}
@@ -142,12 +142,10 @@ GHOST_TSuccess GHOST_DisplayManagerSDL::setCurrentDisplaySetting(
return GHOST_kSuccess;
}
- else {
- /* this is a problem for the BGE player :S, perhaps SDL2 will resolve at some point.
- * we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
- printf("no windows available, can't fullscreen\n");
+ /* This is a problem for the BGE player :S, perhaps SDL2 will resolve at some point.
+ * we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell. */
+ printf("no windows available, can't fullscreen\n");
- /* do not fail, we will try again later when the window is created - wander */
- return GHOST_kSuccess;
- }
+ /* do not fail, we will try again later when the window is created - wander */
+ return GHOST_kSuccess;
}