summaryrefslogtreecommitdiff
path: root/src/video/dedicated_v.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-01-14 21:53:06 +0100
committerGitHub <noreply@github.com>2021-01-14 21:53:06 +0100
commitfa60c1f8b94dd5584a5d5331de277ca23a203422 (patch)
tree7849166d1c2ee40f4d48f4fc4442af1ee24b3b2f /src/video/dedicated_v.cpp
parent711723d7387df67b1abe98ca9ed4d7f2bd7de57d (diff)
downloadopenttd-fa60c1f8b94dd5584a5d5331de277ca23a203422.tar.xz
Feature: Choose a sensible window size on a fresh OTTD config file. (#8536)
Diffstat (limited to 'src/video/dedicated_v.cpp')
-rw-r--r--src/video/dedicated_v.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index 7efd417ce..d237e2d9e 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -135,6 +135,8 @@ static FVideoDriver_Dedicated iFVideoDriver_Dedicated;
const char *VideoDriver_Dedicated::Start(const StringList &parm)
{
+ this->UpdateAutoResolution();
+
int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
_dedicated_video_mem = (bpp == 0) ? nullptr : MallocT<byte>(_cur_resolution.width * _cur_resolution.height * (bpp / 8));