samsungtv: no need make surface conversion here any more, sdl do that with internal emulation
svn-id: r45971
This commit is contained in:
parent
c4c30ca3ce
commit
424c5eea92
5 changed files with 1 additions and 88 deletions
|
@ -1,68 +0,0 @@
|
||||||
/* 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/graphics.cpp $
|
|
||||||
* $Id: graphics.cpp 44495 2009-09-30 16:16:53Z fingolfin $
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "backends/platform/samsungtv/samsungtv.h"
|
|
||||||
#include "common/mutex.h"
|
|
||||||
#include "common/util.h"
|
|
||||||
#include "common/list.h"
|
|
||||||
#include "graphics/font.h"
|
|
||||||
#include "graphics/fontman.h"
|
|
||||||
#include "graphics/scaler.h"
|
|
||||||
#include "graphics/surface.h"
|
|
||||||
|
|
||||||
#if defined(SAMSUNGTV)
|
|
||||||
|
|
||||||
bool OSystem_SDL_SamsungTV::loadGFXMode() {
|
|
||||||
OSystem_SDL::loadGFXMode();
|
|
||||||
_realhwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32, 0);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OSystem_SDL_SamsungTV::unloadGFXMode() {
|
|
||||||
if (_realhwscreen) {
|
|
||||||
SDL_FreeSurface(_realhwscreen);
|
|
||||||
_realhwscreen = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
OSystem_SDL::unloadGFXMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OSystem_SDL_SamsungTV::hotswapGFXMode() {
|
|
||||||
if (!_screen)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
SDL_FreeSurface(_realhwscreen); _realhwscreen = NULL;
|
|
||||||
|
|
||||||
return OSystem_SDL::hotswapGFXMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OSystem_SDL_SamsungTV::internUpdateScreen() {
|
|
||||||
OSystem_SDL::internUpdateScreen();
|
|
||||||
SDL_BlitSurface(_hwscreen, 0, _realhwscreen, 0);
|
|
||||||
SDL_UpdateRect(_realhwscreen, 0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -2,7 +2,6 @@ MODULE := backends/platform/samsungtv
|
||||||
|
|
||||||
MODULE_OBJS := \
|
MODULE_OBJS := \
|
||||||
events.o \
|
events.o \
|
||||||
graphics.o \
|
|
||||||
main.o \
|
main.o \
|
||||||
samsungtv.o
|
samsungtv.o
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,6 @@
|
||||||
|
|
||||||
#if defined(SAMSUNGTV)
|
#if defined(SAMSUNGTV)
|
||||||
|
|
||||||
OSystem_SDL_SamsungTV::OSystem_SDL_SamsungTV() : OSystem_SDL(),
|
|
||||||
_realhwscreen(0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
|
bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
|
||||||
return
|
return
|
||||||
(f == kFeatureAspectRatioCorrection) ||
|
(f == kFeatureAspectRatioCorrection) ||
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Audio {
|
||||||
|
|
||||||
class OSystem_SDL_SamsungTV : public OSystem_SDL {
|
class OSystem_SDL_SamsungTV : public OSystem_SDL {
|
||||||
public:
|
public:
|
||||||
OSystem_SDL_SamsungTV();
|
// OSystem_SDL_SamsungTV() {}
|
||||||
|
|
||||||
virtual bool hasFeature(Feature f);
|
virtual bool hasFeature(Feature f);
|
||||||
virtual void setFeatureState(Feature f, bool enable);
|
virtual void setFeatureState(Feature f, bool enable);
|
||||||
|
@ -47,14 +47,6 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
SDL_Surface *_realhwscreen;
|
|
||||||
|
|
||||||
virtual void internUpdateScreen();
|
|
||||||
|
|
||||||
virtual bool loadGFXMode();
|
|
||||||
virtual void unloadGFXMode();
|
|
||||||
virtual bool hotswapGFXMode();
|
|
||||||
|
|
||||||
virtual bool remapKey(SDL_Event &ev, Common::Event &event);
|
virtual bool remapKey(SDL_Event &ev, Common::Event &event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -568,11 +568,6 @@ bool OSystem_SDL::loadGFXMode() {
|
||||||
fixupResolutionForAspectRatio(_videoMode.desiredAspectRatio, _videoMode.hardwareWidth, _videoMode.hardwareHeight);
|
fixupResolutionForAspectRatio(_videoMode.desiredAspectRatio, _videoMode.hardwareWidth, _videoMode.hardwareHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SAMSUNGTV)
|
|
||||||
_hwscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.hardwareWidth, _videoMode.hardwareHeight, 16, 0, 0, 0, 0);
|
|
||||||
if (_hwscreen == NULL)
|
|
||||||
error("allocating _hwscreen failed");
|
|
||||||
#else
|
|
||||||
_hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
|
_hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
|
||||||
_videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
|
_videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
|
||||||
);
|
);
|
||||||
|
@ -587,7 +582,6 @@ bool OSystem_SDL::loadGFXMode() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
|
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue