SDL: Various more SdlEventSource related fixes
svn-id: r54553
This commit is contained in:
parent
5a825eaae2
commit
a162ff18bc
11 changed files with 26 additions and 23 deletions
|
@ -38,7 +38,7 @@ SymbianSdlEventSource::zoneDesc SymbianSdlEventSource::_zones[TOTAL_ZONES] = {
|
|||
{ 150, 145, 170, 55 }
|
||||
};
|
||||
|
||||
SymbianSdlEventSource::SymbianSdlEventSource(Common::EventSource *boss)
|
||||
SymbianSdlEventSource::SymbianSdlEventSource()
|
||||
: _currentZone(0) {
|
||||
for (int i = 0; i < TOTAL_ZONES; i++) {
|
||||
_mouseXZone[i] = (_zones[i].x + (_zones[i].width / 2));
|
||||
|
|
|
@ -38,8 +38,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
|
|||
{0, 0, 0}
|
||||
};
|
||||
|
||||
DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss) : SdlGraphicsManager(boss) {
|
||||
_evSrc = boss;
|
||||
DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss)
|
||||
: SdlGraphicsManager(boss) {
|
||||
}
|
||||
|
||||
const OSystem::GraphicsMode *DINGUXSdlGraphicsManager::getSupportedGraphicsModes() const {
|
||||
|
@ -125,7 +125,7 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h) {
|
|||
if (w > 320 || h > 240) {
|
||||
setGraphicsMode(GFX_HALF);
|
||||
setGraphicsModeIntern();
|
||||
_evSrc->toggleMouseGrab();
|
||||
_sdlEventSource->toggleMouseGrab();
|
||||
}
|
||||
|
||||
_transactionDetails.sizeChanged = true;
|
||||
|
|
|
@ -61,9 +61,6 @@ public:
|
|||
SdlGraphicsManager::VideoState *getVideoMode();
|
||||
|
||||
virtual void adjustMouseEvent(const Common::Event &event);
|
||||
|
||||
protected:
|
||||
SdlEventSource *_evSrc;
|
||||
};
|
||||
|
||||
#endif /* BACKENDS_GRAPHICS_SDL_DINGUX_H */
|
||||
|
|
|
@ -34,10 +34,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
|
|||
{0, 0, 0}
|
||||
};
|
||||
|
||||
GP2XSdlGraphicsManager::GP2XSdlGraphicsManager()
|
||||
:
|
||||
_adjustZoomOnMouse(false) {
|
||||
|
||||
GP2XSdlGraphicsManager::GP2XSdlGraphicsManager(SdlEventSource *sdlEventSource)
|
||||
: SdlGraphicsManager(sdlEventSource), _adjustZoomOnMouse(false) {
|
||||
}
|
||||
|
||||
const OSystem::GraphicsMode *GP2XSdlGraphicsManager::getSupportedGraphicsModes() const {
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
|
||||
class GP2XSdlGraphicsManager : public SdlGraphicsManager {
|
||||
public:
|
||||
|
||||
GP2XSdlGraphicsManager(SdlEventSource *sdlEventSource);
|
||||
|
||||
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
|
||||
virtual int getDefaultGraphicsMode() const;
|
||||
virtual void drawMouse();
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
#include "backends/graphics/symbiansdl/symbiansdl-graphics.h"
|
||||
#include "backends/platform/symbian/src/SymbianActions.h"
|
||||
|
||||
SymbianSdlGraphicsManager::SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource)
|
||||
: SdlGraphicsManager(sdlEventSource) {
|
||||
}
|
||||
|
||||
int SymbianSdlGraphicsManager::getDefaultGraphicsMode() const {
|
||||
return GFX_NORMAL;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
#include "backends/graphics/sdl/sdl-graphics.h"
|
||||
|
||||
class SymbianSdlGraphicsManager : public SdlGraphicsManager {
|
||||
public:
|
||||
SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource);
|
||||
|
||||
public:
|
||||
virtual bool hasFeature(OSystem::Feature f);
|
||||
virtual void setFeatureState(OSystem::Feature f, bool enable);
|
||||
|
|
|
@ -136,12 +136,12 @@ void OSystem_GP2X::initBackend() {
|
|||
GP2X_HW::mixerMoveVolume(0);
|
||||
|
||||
// Create the events manager
|
||||
if (_eventManager == 0)
|
||||
_eventManager = new GP2XSdlEventSource(this);
|
||||
if (_eventSource == 0)
|
||||
_eventSource = new GP2XSdlEventSource();
|
||||
|
||||
// Create the graphics manager
|
||||
if (_graphicsManager == 0)
|
||||
_graphicsManager = new GP2XSdlGraphicsManager();
|
||||
_graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
|
||||
|
||||
// Call parent implementation of this method
|
||||
OSystem_POSIX::initBackend();
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
|
||||
void OSystem_LINUXMOTO::initBackend() {
|
||||
// Create the backend custom managers
|
||||
if (_eventManager == 0)
|
||||
_eventManager = new LinuxmotoSdlEventSource(this);
|
||||
if (_eventSource == 0)
|
||||
_eventSource = new LinuxmotoSdlEventSource();
|
||||
|
||||
if (_graphicsManager == 0)
|
||||
_graphicsManager = new LinuxmotoSdlGraphicsManager();
|
||||
_graphicsManager = new LinuxmotoSdlGraphicsManager(_eventSource);
|
||||
|
||||
// Call parent implementation of this method
|
||||
OSystem_POSIX::initBackend();
|
||||
|
|
|
@ -41,8 +41,8 @@ bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
|
|||
|
||||
void OSystem_SDL_SamsungTV::initBackend() {
|
||||
// Create the events manager
|
||||
if (_eventManager == 0)
|
||||
_eventManager = new SamsungTVSdlEventSource(this);
|
||||
if (_eventSource == 0)
|
||||
_eventSource = new SamsungTVSdlEventSource();
|
||||
|
||||
// Call parent implementation of this method
|
||||
OSystem_SDL::initBackend();
|
||||
|
|
|
@ -101,8 +101,8 @@ void OSystem_SDL_Symbian::initBackend() {
|
|||
GUI::Actions::init();
|
||||
|
||||
// Creates the backend managers
|
||||
if (_eventManager == 0)
|
||||
_eventManager = new SymbianSdlEventSource(this);
|
||||
if (_eventSource == 0)
|
||||
_eventSource = new SymbianSdlEventSource();
|
||||
if (_mixerManager == 0) {
|
||||
_mixerManager = new SymbianSdlMixerManager();
|
||||
|
||||
|
@ -110,7 +110,7 @@ void OSystem_SDL_Symbian::initBackend() {
|
|||
_mixerManager->init();
|
||||
}
|
||||
if (_graphicsManager == 0)
|
||||
_graphicsManager = new SymbianSdlGraphicsManager();
|
||||
_graphicsManager = new SymbianSdlGraphicsManager(_eventSource);
|
||||
|
||||
// Call parent implementation of this method
|
||||
OSystem_SDL::initBackend();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue