From dfae69834ac87d79b12d6aba38c5ecef281b8eb3 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 12 Oct 2018 20:02:54 -0700 Subject: [PATCH] Fix misleading debug print --- app/streaming/session.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 73f7ff19..a9ad035e 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -703,9 +703,13 @@ void Session::updateOptimalWindowDisplayMode() bestMode = desktopMode; } - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, - "Chosen best display mode: %dx%dx%d", - bestMode.w, bestMode.h, bestMode.refresh_rate); + if ((SDL_GetWindowFlags(m_Window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN) { + // Only print when the window is actually in full-screen exclusive mode, + // otherwise we're not actually using the mode we've set here + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Chosen best display mode: %dx%dx%d", + bestMode.w, bestMode.h, bestMode.refresh_rate); + } SDL_SetWindowDisplayMode(m_Window, &bestMode); }