From 309447f2f51e31c46cbf4a7f7def7f7179e68cd4 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 5 Sep 2012 23:13:52 +0200 Subject: base/config: add graphics.fullscreen option --- src/base/config.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/base/config.cpp') diff --git a/src/base/config.cpp b/src/base/config.cpp index 0bcac232..630ac3b6 100644 --- a/src/base/config.cpp +++ b/src/base/config.cpp @@ -31,12 +31,13 @@ namespace usdx log4cpp::Category::getInstance("usdx.base.config"); Config::Config() - : graphics_resolution(800,600) + : graphics_fullscreen(false), graphics_resolution(800,600) { try { // TODO: handling different paths read_ini("config.ini", this->pt); + graphics_fullscreen = pt.get("graphics.fullscreen", graphics_fullscreen); graphics_resolution = pt.get("graphics.resolution", graphics_resolution); } catch(...) { @@ -60,6 +61,17 @@ namespace usdx } } + void Config::set_graphics_fullscreen(bool value) + { + graphics_fullscreen = value; + pt.put("graphics.fullscreen", value); + } + + bool Config::get_graphics_fullscreen(void) const + { + return graphics_fullscreen; + } + void Config::set_graphics_resolution(Dimension value) { graphics_resolution = value; -- cgit v1.2.3