auto detect aspect ratio of monitor, so that you don't have to know/use the cryptic...
[supertux.git] / src / gameconfig.cpp
index 5e83724..eedc884 100644 (file)
@@ -44,8 +44,7 @@ Config::Config()
 
   screenwidth = 800;
   screenheight = 600;
-  aspectwidth = 4;
-  aspectheight = 3;
+  aspect_ratio = -1;       // autodetect
 
   enable_script_debugger = false;
 }
@@ -72,8 +71,7 @@ Config::load()
     config_video_lisp->get("fullscreen", use_fullscreen);
     config_video_lisp->get("width", screenwidth);
     config_video_lisp->get("height", screenheight);
-    config_video_lisp->get("aspectwidth", aspectwidth);
-    config_video_lisp->get("aspectheight", aspectheight);
+    config_video_lisp->get("aspect_ratio", aspect_ratio);
   }
 
   const lisp::Lisp* config_audio_lisp = config_lisp->get_lisp("audio");
@@ -102,8 +100,7 @@ Config::save()
   writer.write_bool("fullscreen", use_fullscreen);
   writer.write_int("width", screenwidth);
   writer.write_int("height", screenheight);
-  writer.write_int("aspectwidth", aspectwidth);
-  writer.write_int("aspectheight", aspectheight);
+  writer.write_float("aspect_ratio", aspect_ratio);
   writer.end_list("video");
 
   writer.start_list("audio");