From: Matthias Braun Date: Fri, 25 May 2007 14:16:17 +0000 (+0000) Subject: add vsync option X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b25f7af383f89c081442725216f2eba38228a5e3;p=supertux.git add vsync option SVN-Revision: 5012 --- diff --git a/src/gameconfig.cpp b/src/gameconfig.cpp index eedc884b9..a1a8a3da4 100644 --- a/src/gameconfig.cpp +++ b/src/gameconfig.cpp @@ -36,6 +36,7 @@ Config* config = 0; Config::Config() { use_fullscreen = true; + try_vsync = true; show_fps = false; sound_enabled = true; music_enabled = true; @@ -69,6 +70,7 @@ Config::load() const lisp::Lisp* config_video_lisp = config_lisp->get_lisp("video"); if(config_video_lisp) { config_video_lisp->get("fullscreen", use_fullscreen); + config_video_lisp->get("vsync", try_vsync); config_video_lisp->get("width", screenwidth); config_video_lisp->get("height", screenheight); config_video_lisp->get("aspect_ratio", aspect_ratio); @@ -98,6 +100,7 @@ Config::save() writer.start_list("video"); writer.write_bool("fullscreen", use_fullscreen); + writer.write_bool("vsync", try_vsync); writer.write_int("width", screenwidth); writer.write_int("height", screenheight); writer.write_float("aspect_ratio", aspect_ratio); diff --git a/src/gameconfig.hpp b/src/gameconfig.hpp index be406bd2c..f4cb884c6 100644 --- a/src/gameconfig.hpp +++ b/src/gameconfig.hpp @@ -39,6 +39,7 @@ public: float aspect_ratio; bool use_fullscreen; + bool try_vsync; bool show_fps; bool sound_enabled; bool music_enabled;