From c8da8d7e787f9d2801c8c5f08dbb4b9373a424c8 Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Mon, 31 Aug 2020 22:38:46 -0300 Subject: [PATCH] Add integer scaling support. Disabled by default. --- SourceX/display.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SourceX/display.cpp b/SourceX/display.cpp index 653787743..f36c21a11 100644 --- a/SourceX/display.cpp +++ b/SourceX/display.cpp @@ -126,6 +126,12 @@ bool SpawnWindow(const char *lpWindowName, int nWidth, int nHeight) ErrSdl(); } + int integerScalingEnabled = 0; + DvlIntSetting("integer scaling", &integerScalingEnabled); + if (integerScalingEnabled && SDL_RenderSetIntegerScale(renderer, SDL_TRUE) < 0) { + ErrSdl(); + } + if (SDL_RenderSetLogicalSize(renderer, nWidth, nHeight) <= -1) { ErrSdl(); }