--- a/src/Application.cc Tue Jan 13 21:14:12 2009 +0200
+++ b/src/Application.cc Tue Jan 13 21:36:43 2009 +0200
@@ -56,7 +56,7 @@
arg_resolution = PixelCoordinate(GRAPHICS_RESOLUTION_WIDTH, GRAPHICS_RESOLUTION_HEIGHT);
// extra state
- bool graphics_default = true;
+ bool resolution_default = true;
try {
// parse args
@@ -90,10 +90,20 @@
case ARG_FULLSCREEN:
arg_fullscreen = true;
+
+ // choose best resolution unless explicitly set
+ if (resolution_default) {
+ const CL_DisplayMode best_mode = Graphics::getBestMode();
+ const CL_Size best_resolution = best_mode.get_resolution();
+
+ arg_resolution = PixelCoordinate(best_resolution.width, best_resolution.height);
+ }
+
break;
case ARG_RESOLUTION:
parse_arg_resolution(args.get_argument());
+ resolution_default = false;
break;
case ARG_LIST_MODES:
@@ -114,7 +124,7 @@
throw ArgumentError("cannot be both server and client");
// enable graphics by default unless server
- if (!arg_server && graphics_default)
+ if (!arg_server)
arg_graphics = true;
// continue