Jens Beyer (Qcumber-some) has proposed merging 
lp:~qcumber-some/widelands/bug704637 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #704637 in widelands: "Does not start (could not set video mode) using 
too large resolution in fullscreen mode"
  https://bugs.launchpad.net/widelands/+bug/704637

For more details, see:
https://code.launchpad.net/~qcumber-some/widelands/bug704637/+merge/150915

Just as hjd proposed in the bug, simply try to fall back to default settings if 
the other two tries fail.

Interesting "feature" is, that the setting from .config file is still visible 
in the config screen, while the window is in tiny 640x480. I don't think this 
is a bug, but you may comment on that.

I don't know if we should tell the user that something's wrong, this could be 
quite difficult this early in the game. On the other hand, if I am faced by 
this tiny window, I am definitely looking for the graphics configuration ingame 
to fix it, so I will see my mistake.
-- 
https://code.launchpad.net/~qcumber-some/widelands/bug704637/+merge/150915
Your team Widelands Developers is requested to review the proposed merge of 
lp:~qcumber-some/widelands/bug704637 into lp:widelands.
=== modified file 'src/graphic/graphic.cc'
--- src/graphic/graphic.cc	2013-02-10 16:08:37 +0000
+++ src/graphic/graphic.cc	2013-02-27 21:36:23 +0000
@@ -125,6 +125,13 @@
 #endif
 
 	if (!sdlsurface)
+	{
+		log("Graphics: Could not set videomode: %s\n", SDL_GetError());
+		log("Falling back to default (minimum) graphics settings as last resort\n");
+		flags &= ~SDL_FULLSCREEN;
+		sdlsurface = SDL_SetVideoMode(640, 480, 16, flags);
+	}
+	if (!sdlsurface)
 		throw wexception
 			("Graphics: could not set video mode: %s", SDL_GetError());
 

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to