From b12bc9f2c6756b1fa5af24e3d1bdecd690a44fac Mon Sep 17 00:00:00 2001 From: pk-2000 <63214388+pk-2000@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:22:32 +0000 Subject: [PATCH] Update glstate.cpp Modify the texture size for higher resolution games The code //Set max texture size to 16384 if conf.maxTextureSize is 0 ...... ..... was forked from joiplay/mkxp --- src/glstate.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glstate.cpp b/src/glstate.cpp index ff88de7..5370619 100644 --- a/src/glstate.cpp +++ b/src/glstate.cpp @@ -120,9 +120,16 @@ GLState::GLState(const Config &conf) blendMode.init(BlendNormal); blend.init(true); scissorTest.init(false); - scissorBox.init(IntRect(0, 0, 640, 480)); + scissorBox.init(IntRect(0, 0, conf.defScreenW, conf.defScreenH)); program.init(0); if (conf.maxTextureSize > 0) caps.maxTexSize = conf.maxTextureSize; + + //Set max texture size to 16384 if conf.maxTextureSize is 0 + if (conf.maxTextureSize > 0){ + caps.maxTexSize = conf.maxTextureSize; + } else { + caps.maxTexSize = 16384; + } }