From 6a4925172246fde2ec4dc58e32d24693fb29b2b0 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 25 Jul 2017 06:55:20 -0400 Subject: [PATCH] - ported Linux crash fix to Mac --- src/menu/videomenu.cpp | 4 ++-- src/posix/cocoa/i_video.mm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/menu/videomenu.cpp b/src/menu/videomenu.cpp index dcf594f96..5fa2b08ec 100644 --- a/src/menu/videomenu.cpp +++ b/src/menu/videomenu.cpp @@ -141,7 +141,7 @@ int ViewportScaledWidth(int width) switch (vid_scalemode) { default: - case 0: return width; + case 0: return (width==0)?vid_defwidth:width; case 1: return 320; case 2: return 640; case 3: return (int)roundf(width * 0.5f); @@ -155,7 +155,7 @@ int ViewportScaledHeight(int height) switch (vid_scalemode) { default: - case 0: return height; + case 0: return (height==0)?vid_defheight:height; case 1: return 200; case 2: return 400; case 3: return (int)roundf(height * 0.5f); diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index e0f1e6c68..7a9222cd3 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -147,7 +147,7 @@ CUSTOM_CVAR(Bool, swtruecolor, TRUECOLOR_DEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONF } } -CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { extern int NewWidth, NewHeight, NewBits, DisplayBits;