From f098b2817f03866d062418da289f365826b79d74 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 9 Aug 2008 18:37:18 +0000 Subject: Updates to the recent OSystem API changes svn-id: r33719 --- backends/platform/wii/osystem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'backends/platform/wii/osystem.cpp') diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 9e708345c5..3ec32126f0 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -89,8 +89,12 @@ OSystem_Wii::~OSystem_Wii() { void OSystem_Wii::initBackend() { _startup_time = gettime(); + + char buf[MAXPATHLEN]; + if (!getcwd(buf, MAXPATHLEN)) + strcpy(buf, "/"); - _savefile = new DefaultSaveFileManager(); + _savefile = new DefaultSaveFileManager(buf); _mixer = new Audio::MixerImpl(this); _timer = new DefaultTimerManager(); -- cgit v1.2.3 From 15ca9704989347a65c8c883f7d6a9337e5d8e7d5 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Mon, 11 Aug 2008 22:43:00 +0000 Subject: video mode polishing: * proper fullscreen video mode * multiple graphic modes with different overscan values * "fullscreen mode" stretches the picture on 16:9 displays * fixed broken sword 1/2 gfx garbage * support for setShakePos() svn-id: r33787 --- backends/platform/wii/osystem.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'backends/platform/wii/osystem.cpp') diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 3ec32126f0..505f93c820 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -19,8 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "osystem.h" #include "backends/fs/wii/wii-fs-factory.h" +#include "common/config-manager.h" + +#include "osystem.h" #include @@ -51,7 +53,9 @@ OSystem_Wii::OSystem_Wii() : _currentHeight(0), _supportedGraphicsModes(NULL), - _activeGraphicsMode(-1), + _activeGraphicsMode(0), + + _fullscreen(false), _mouseVisible(false), _mouseX(0), @@ -98,6 +102,8 @@ void OSystem_Wii::initBackend() { _mixer = new Audio::MixerImpl(this); _timer = new DefaultTimerManager(); + _fullscreen = ConfMan.getBool("fullscreen"); + initGfx(); initSfx(); initEvents(); @@ -112,14 +118,28 @@ void OSystem_Wii::quit() { } bool OSystem_Wii::hasFeature(Feature f) { - return f == kFeatureCursorHasPalette; + return (f == kFeatureFullscreenMode) || + (f == kFeatureCursorHasPalette); } void OSystem_Wii::setFeatureState(Feature f, bool enable) { + switch (f) { + case kFeatureFullscreenMode: + _fullscreen = enable; + setGraphicsMode(_activeGraphicsMode); + break; + default: + break; + } } bool OSystem_Wii::getFeatureState(Feature f) { - return false; + switch (f) { + case kFeatureFullscreenMode: + return _fullscreen; + default: + return false; + } } uint32 OSystem_Wii::getMillis() { -- cgit v1.2.3