diff options
author | Paweł Kołodziejski | 2009-11-13 00:37:53 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-11-13 00:37:53 +0000 |
commit | 0bbb62771a820cec774fecb605869d4664b2e83a (patch) | |
tree | 1c91b24de6d7b9986932318e1bfb3cf812e3e140 /backends/platform/samsungtv/samsungtv.cpp | |
parent | 82dfea7e56f2530ed6f0e851d919d2de796df88f (diff) | |
download | scummvm-rg350-0bbb62771a820cec774fecb605869d4664b2e83a.tar.gz scummvm-rg350-0bbb62771a820cec774fecb605869d4664b2e83a.tar.bz2 scummvm-rg350-0bbb62771a820cec774fecb605869d4664b2e83a.zip |
rename sdl.*->samsungtv.*
svn-id: r45878
Diffstat (limited to 'backends/platform/samsungtv/samsungtv.cpp')
-rw-r--r-- | backends/platform/samsungtv/samsungtv.cpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp new file mode 100644 index 0000000000..6b383688cd --- /dev/null +++ b/backends/platform/samsungtv/samsungtv.cpp @@ -0,0 +1,70 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/sdl/sdl.cpp $ + * $Id: sdl.cpp 44793 2009-10-08 19:41:38Z fingolfin $ + * + */ + +#include "backends/platform/samsungtv/sdl.h" +#include "backends/fs/posix/posix-fs-factory.h" + +#if defined(SAMSUNGTV) + +OSystem_SDL_SamsungTV::OSystem_SDL_SamsungTV() : OSystem_SDL(), + _prehwscreen(0) { +} + +bool OSystem_SDL_SamsungTV::hasFeature(Feature f) { + return + (f == kFeatureAutoComputeDirtyRects) || + (f == kFeatureCursorHasPalette); +} + +void OSystem_SDL_SamsungTV::setFeatureState(Feature f, bool enable) { + switch (f) { + case kFeatureAspectRatioCorrection: + setAspectRatioCorrection(enable); + break; + case kFeatureAutoComputeDirtyRects: + if (enable) + _modeFlags |= DF_WANT_RECT_OPTIM; + else + _modeFlags &= ~DF_WANT_RECT_OPTIM; + break; + default: + break; + } +} + +bool OSystem_SDL_SamsungTV::getFeatureState(Feature f) { + assert (_transactionMode == kTransactionNone); + + switch (f) { + case kFeatureAspectRatioCorrection: + return _videoMode.aspectRatioCorrection; + case kFeatureAutoComputeDirtyRects: + return _modeFlags & DF_WANT_RECT_OPTIM; + default: + return false; + } +} + +#endif |