# HG changeset patch # User koda # Date 1357265601 -3600 # Node ID 274afc318dca5bae562bcc48baae7abe60f17d14 # Parent d7bef04c99d4e679a429a647157858d891a86e8d have the default window size to 5/6, save fullscreen resolution on 'fullscreenResolution' instead of 'resolution', make sure cFullscreenStuff is initialised diff -r d7bef04c99d4 -r 274afc318dca QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Fri Jan 04 02:58:19 2013 +0100 +++ b/QTfrontend/gameuiconfig.cpp Fri Jan 04 03:13:21 2013 +0100 @@ -74,7 +74,7 @@ { Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltips", true).toBool()); - int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString()); + int t = Form->ui.pageOptions->CBResolution->findText(value("video/fullscreenResolution").toString()); if (t < 0) { if (Form->ui.pageOptions->CBResolution->count() > 1) @@ -84,9 +84,9 @@ } else Form->ui.pageOptions->CBResolution->setCurrentIndex(t); - // Default the windowed resolution to 2/3 of the screen size - int screenWidth = SDL_GetVideoInfo()->current_w * 2 / 3; - int screenHeight = SDL_GetVideoInfo()->current_h * 2 / 3; + // Default the windowed resolution to 5/6 of the screen size + int screenWidth = SDL_GetVideoInfo()->current_w * 5 / 6; + int screenHeight = SDL_GetVideoInfo()->current_h * 5 / 6; QString widthStr; widthStr.setNum(screenWidth); QString heightStr; heightStr.setNum(screenHeight); QString wWidth = value("video/windowedWidth", widthStr).toString(); @@ -231,7 +231,7 @@ void GameUIConfig::SaveOptions() { - setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); + setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText()); setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->text()); setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->text()); setValue("video/fullscreen", vid_Fullscreen()); diff -r d7bef04c99d4 -r 274afc318dca hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Fri Jan 04 02:58:19 2013 +0100 +++ b/hedgewars/uVariables.pas Fri Jan 04 03:13:21 2013 +0100 @@ -2326,12 +2326,13 @@ begin // initialisation flags - they are going to be overwritten by program args - cScreenWidth := 1024; - cScreenHeight := 768; - cFullscreenWidth := 1024; - cFullscreenHeight := 768; + cFullscreenWidth := 0; + cFullscreenHeight := 0; cWindowedWidth := 1024; cWindowedHeight := 768; + cScreenWidth := cWindowedWidth; + cScreenHeight := cWindowedHeight; + cShowFPS := false; cAltDamage := true; cTimerInterval := 8; @@ -2512,13 +2513,20 @@ vobSDVelocity:= 15; vobSDFallSpeed:= 250; - cMinScreenWidth:= min(cScreenWidth, 640); - cMinScreenHeight:= min(cScreenHeight, 480); + cMinScreenWidth := min(cScreenWidth, 640); + cMinScreenHeight := min(cScreenHeight, 480); cNewScreenWidth := cScreenWidth; cNewScreenHeight := cScreenHeight; cScreenResizeDelay := 0; + // make sure fullscreen resolution is always initialised somehow + if cFullscreenWidth = 0 then + cFullscreenWidth:= min(cWindowedWidth, 640); + if cFullscreenHeight = 0 then + cFullscreenHeight:= min(cWindowedHeight, 480); + + LuaGoals:= ''; cMapName:= '';