Skip to content

Commit ced9c94

Browse files
committed
Always set a sane default size for game window. Patch by glogow@fbihome.de, closes ticket:2822
1 parent b04a07c commit ced9c94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/configuration.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ bool loadConfig()
118118
war_SetTrapCursor(ini.value("trapCursor", false).toBool());
119119
war_SetVsync(ini.value("vsync", true).toBool());
120120

121-
int width = ini.value("width", 0).toInt();
122-
int height = ini.value("height", 0).toInt();
121+
int width = ini.value("width", 800).toInt();
122+
int height = ini.value("height", 600).toInt();
123123
if (width < 640 || height < 480) // sanity check
124124
{
125-
height = width = 0;
125+
width = 640;
126+
height = 480;
126127
}
127128
pie_SetVideoBufferWidth(width);
128129
pie_SetVideoBufferHeight(height);

0 commit comments

Comments
 (0)