From f89b525b2a4215a8b09e21b8bc669ab10963b268 Mon Sep 17 00:00:00 2001 From: Roy Falk Date: Sun, 24 Nov 2024 17:06:26 +0200 Subject: [PATCH] Fix game scaling issue (#910) --- engine/objconv/basemaker/base_maker.cpp | 4 ++-- engine/src/main.cpp | 4 ++-- engine/src/options.cpp | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/engine/objconv/basemaker/base_maker.cpp b/engine/objconv/basemaker/base_maker.cpp index 693d3b2eba..0b449932ea 100644 --- a/engine/objconv/basemaker/base_maker.cpp +++ b/engine/objconv/basemaker/base_maker.cpp @@ -2166,8 +2166,8 @@ int main(int argc, char **argv) { Base::CurrentBase = NULL; glutInit(&argc, argv); glutInitWindowSize(800, 600); - g_game.x_resolution = 800; - g_game.y_resolution = 600; + g_game.x_resolution = 1920; + g_game.y_resolution = 1080; glutInitWindowPosition(0, 0); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); glutCreateWindow("Vega Strike Base Maker"); diff --git a/engine/src/main.cpp b/engine/src/main.cpp index 94d27443d5..bb505ab6b2 100644 --- a/engine/src/main.cpp +++ b/engine/src/main.cpp @@ -121,8 +121,8 @@ void setup_game_data() { g_game.music_volume = 1; g_game.warning_level = 20; g_game.capture_mouse = GFXFALSE; - g_game.y_resolution = 768; - g_game.x_resolution = 1024; + g_game.y_resolution = 1080; + g_game.x_resolution = 1920; g_game.fov = 78; g_game.MouseSensitivityX = 2; g_game.MouseSensitivityY = 4; diff --git a/engine/src/options.cpp b/engine/src/options.cpp index ebff525fd9..efe411ff9b 100644 --- a/engine/src/options.cpp +++ b/engine/src/options.cpp @@ -22,6 +22,7 @@ #include "options.h" #include "configxml.h" +#include "configuration/configuration.h" extern VegaConfig *vs_config; @@ -189,8 +190,8 @@ void vs_options::init() { rgb_pixel_format = vs_config->getVariable("graphics", "rgb_pixel_format", "undefined"); gl_accelerated_visual = XMLSupport::parse_bool(vs_config->getVariable("graphics", "gl_accelerated_visual", "true")); z_pixel_format = XMLSupport::parse_int(vs_config->getVariable("graphics", "z_pixel_format", "24")); - x_resolution = XMLSupport::parse_int(vs_config->getVariable("graphics", "x_resolution", "1024")); - y_resolution = XMLSupport::parse_int(vs_config->getVariable("graphics", "y_resolution", "768")); + x_resolution = configuration()->graphics2_config.resolution_x; + y_resolution = configuration()->graphics2_config.resolution_y; fullscreen = XMLSupport::parse_bool(vs_config->getVariable("graphics", "fullscreen", "false")); colordepth = XMLSupport::parse_int(vs_config->getVariable("graphics", "colordepth", "32")); glut_stencil = XMLSupport::parse_bool(vs_config->getVariable("graphics", "glut_stencil", "true"));