aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Lingua2014-01-23 18:33:15 -0500
committerMax Lingua2014-01-23 18:33:15 -0500
commit4ccdb3e2a30ead1fa015437306b046b69b69035b (patch)
treee7a75774b540d871848791a6a8db9358514a97b2 /backends
parentb69a2c81a7b0ed535e23e91928bc8ba193db744a (diff)
parent2fe303ce3fff008a58e9750c66e707ec4e7c93d8 (diff)
downloadscummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.tar.gz
scummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.tar.bz2
scummvm-rg350-4ccdb3e2a30ead1fa015437306b046b69b69035b.zip
Merge branch 'master' of git://github.com/scummvm/scummvm
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp13
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h6
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp6
-rw-r--r--backends/fs/wii/wii-fs.cpp44
-rw-r--r--backends/fs/wii/wii-fs.h2
-rw-r--r--backends/graphics/graphics.h21
-rw-r--r--backends/graphics/opengl/debug.cpp4
-rw-r--r--backends/graphics/opengl/opengl-graphics.h2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp6
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp4
-rw-r--r--backends/graphics/sdl/sdl-graphics.h23
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp6
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h2
-rw-r--r--backends/platform/android/gfx.cpp3
-rw-r--r--backends/platform/android/texture.cpp17
-rw-r--r--backends/platform/android/texture.h12
-rw-r--r--backends/platform/sdl/posix/posix.cpp4
-rw-r--r--backends/platform/sdl/sdl.cpp10
-rw-r--r--backends/platform/wii/main.cpp3
-rw-r--r--backends/platform/wii/osystem_events.cpp2
-rw-r--r--backends/platform/wii/wii.mk4
-rw-r--r--backends/taskbar/unity/unity-taskbar.cpp2
-rw-r--r--backends/taskbar/unity/unity-taskbar.h2
23 files changed, 115 insertions, 83 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 6d713f10be..bd8bf1978a 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -81,6 +81,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_sDisplayName = ::lastPathComponent(_sPath);
_pFileLock = 0;
_bIsDirectory = false;
+ _bIsValid = false;
// Check whether the node exists and if it is a directory
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END);
@@ -305,12 +306,6 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
- if (!_bIsDirectory) {
- debug(6, "Not a directory");
- LEAVE();
- return 0;
- }
-
if (_pFileLock == 0) {
debug(6, "Root node");
LEAVE();
@@ -332,6 +327,9 @@ AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
}
bool AmigaOSFilesystemNode::isReadable() const {
+ if (!_bIsValid)
+ return false;
+
// Regular RWED protection flags are low-active or inverted, thus the negation.
// moreover pseudo root filesystem (null _pFileLock) is readable whatever the
// protection says
@@ -341,6 +339,9 @@ bool AmigaOSFilesystemNode::isReadable() const {
}
bool AmigaOSFilesystemNode::isWritable() const {
+ if (!_bIsValid)
+ return false;
+
// Regular RWED protection flags are low-active or inverted, thus the negation.
// moreover pseudo root filesystem (null _pFileLock) is never writable whatever
// the protection says (because of the pseudo nature)
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
index c5ca61476f..7ce9981479 100644
--- a/backends/fs/amigaos4/amigaos4-fs.h
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -43,7 +43,13 @@
*/
class AmigaOSFilesystemNode : public AbstractFSNode {
protected:
+ /**
+ * The main file lock.
+ * If this is NULL but _bIsValid is true, then this Node references
+ * the virtual filesystem root.
+ */
BPTR _pFileLock;
+
Common::String _sDisplayName;
Common::String _sPath;
bool _bIsDirectory;
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 760e5316e7..987e7f56bf 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -125,6 +125,8 @@ bool WiiFilesystemFactory::failedToMount(FileSystemType type) {
return false;
}
+const DISC_INTERFACE* dvd = &__io_wiidvd;
+
void WiiFilesystemFactory::mount(FileSystemType type) {
switch (type) {
case kDVD:
@@ -133,7 +135,7 @@ void WiiFilesystemFactory::mount(FileSystemType type) {
break;
printf("mount dvd\n");
- if (ISO9660_Mount()) {
+ if (ISO9660_Mount("dvd", dvd)) {
_dvdMounted = true;
_dvdError = false;
printf("ISO9660 mounted\n");
@@ -179,7 +181,7 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
printf("umount dvd\n");
- ISO9660_Unmount();
+ ISO9660_Unmount("dvd:");
_dvdMounted = false;
_dvdError = false;
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 4a19e18240..43f4f592b7 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -80,9 +80,9 @@ void WiiFilesystemNode::clearFlags() {
void WiiFilesystemNode::setFlags(const struct stat *st) {
_exists = true;
- _isDirectory = S_ISDIR(st->st_mode);
- _isReadable = (st->st_mode & S_IRUSR) > 0;
- _isWritable = (st->st_mode & S_IWUSR) > 0;
+ _isDirectory = ( (st->st_mode & S_IFDIR) != 0 );
+ _isReadable = ( (st->st_mode & S_IRUSR) != 0 );
+ _isWritable = ( (st->st_mode & S_IWUSR) != 0 );
}
WiiFilesystemNode::WiiFilesystemNode() {
@@ -106,7 +106,7 @@ WiiFilesystemNode::WiiFilesystemNode(const Common::String &p) {
_displayName = lastPathComponent(_path, '/');
struct stat st;
- if (!stat(_path.c_str(), &st))
+ if(stat(_path.c_str(), &st) != -1)
setFlags(&st);
else
clearFlags();
@@ -152,33 +152,45 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
if (_path.empty())
return getDevopChildren(list, mode, hidden);
- DIR_ITER* dp = diropen (_path.c_str());
+ DIR* dp = opendir (_path.c_str());
+ DIR* tmpdir;
if (dp == NULL)
return false;
- char filename[MAXPATHLEN];
- struct stat st;
+ struct dirent *pent;
- while (dirnext(dp, filename, &st) == 0) {
- if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
+ while ((pent = readdir(dp)) != NULL) {
+ if (strcmp(pent->d_name, ".") == 0 || strcmp(pent->d_name, "..") == 0)
continue;
Common::String newPath(_path);
if (newPath.lastChar() != '/')
- newPath += '/';
- newPath += filename;
-
- bool isDir = S_ISDIR(st.st_mode);
-
+ newPath += '/';
+ newPath += pent->d_name;
+
+ bool isDir = false;
+ tmpdir = opendir(newPath.c_str());
+ if(tmpdir)
+ {
+ isDir = true;
+ closedir(tmpdir);
+ }
+
if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
(mode == Common::FSNode::kListDirectoriesOnly && !isDir))
continue;
-
+
+ struct stat st;
+ st.st_mode = 0;
+ st.st_mode |= ( isDir ? S_IFDIR : 0 );
+ st.st_mode |= S_IRUSR;
+ st.st_mode |= S_IWUSR;
+
list.push_back(new WiiFilesystemNode(newPath, &st));
}
- dirclose(dp);
+ closedir(dp);
return true;
}
diff --git a/backends/fs/wii/wii-fs.h b/backends/fs/wii/wii-fs.h
index 11679d0c36..f785101099 100644
--- a/backends/fs/wii/wii-fs.h
+++ b/backends/fs/wii/wii-fs.h
@@ -51,7 +51,7 @@ public:
*
* @param path Common::String with the path the new node should point to.
*/
- WiiFilesystemNode(const Common::String &path);
+ WiiFilesystemNode(const Common::String &p);
WiiFilesystemNode(const Common::String &p, const struct stat *st);
virtual bool exists() const;
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index 74258b8910..24397228e6 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -37,27 +37,6 @@ class GraphicsManager : public PaletteManager {
public:
virtual ~GraphicsManager() {}
- /**
- * Makes this graphics manager active. That means it should be ready to
- * process inputs now. However, even without being active it should be
- * able to query the supported modes and other bits.
- *
- * HACK: Actually this is specific to SdlGraphicsManager subclasses.
- * But sadly we cannot cast from GraphicsManager to SdlGraphicsManager
- * because there is no relation between these two.
- */
- virtual void activateManager() {}
-
- /**
- * Makes this graphics manager inactive. This should allow another
- * graphics manager to become active again.
- *
- * HACK: Actually this is specific to SdlGraphicsManager subclasses.
- * But sadly we cannot cast from GraphicsManager to SdlGraphicsManager
- * because there is no relation between these two.
- */
- virtual void deactivateManager() {}
-
virtual bool hasFeature(OSystem::Feature f) = 0;
virtual void setFeatureState(OSystem::Feature f, bool enable) = 0;
virtual bool getFeatureState(OSystem::Feature f) = 0;
diff --git a/backends/graphics/opengl/debug.cpp b/backends/graphics/opengl/debug.cpp
index 69006bb975..d5d73fb5ec 100644
--- a/backends/graphics/opengl/debug.cpp
+++ b/backends/graphics/opengl/debug.cpp
@@ -52,9 +52,9 @@ Common::String getGLErrStr(GLenum error) {
} // End of anonymous namespace
void checkGLError(const char *expr, const char *file, int line) {
- GLenum error = glGetError();
+ GLenum error;
- if (error != GL_NO_ERROR) {
+ while ((error = glGetError()) != GL_NO_ERROR) {
// We cannot use error here because we do not know whether we have a
// working screen or not.
warning("GL ERROR: %s on %s (%s:%d)", getGLErrStr(error).c_str(), expr, file, line);
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index d2d0358407..93c0c5bc83 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -47,7 +47,7 @@ enum {
GFX_NEAREST = 1
};
-class OpenGLGraphicsManager : public GraphicsManager {
+class OpenGLGraphicsManager : virtual public GraphicsManager {
public:
OpenGLGraphicsManager();
virtual ~OpenGLGraphicsManager();
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index e39cd35870..3f9fc1fbd5 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -73,8 +73,7 @@ OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() {
}
void OpenGLSdlGraphicsManager::activateManager() {
- OpenGLGraphicsManager::activateManager();
- initEventSource();
+ SdlGraphicsManager::activateManager();
// Register the graphics manager as a event observer
g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false);
@@ -86,8 +85,7 @@ void OpenGLSdlGraphicsManager::deactivateManager() {
g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this);
}
- deinitEventSource();
- OpenGLGraphicsManager::deactivateManager();
+ SdlGraphicsManager::deactivateManager();
}
bool OpenGLSdlGraphicsManager::hasFeature(OSystem::Feature f) {
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 417f4faf54..40b97b267b 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -31,10 +31,10 @@ SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *source)
SdlGraphicsManager::~SdlGraphicsManager() {
}
-void SdlGraphicsManager::initEventSource() {
+void SdlGraphicsManager::activateManager() {
_eventSource->setGraphicsManager(this);
}
-void SdlGraphicsManager::deinitEventSource() {
+void SdlGraphicsManager::deactivateManager() {
_eventSource->setGraphicsManager(0);
}
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 4d4338af16..3791961cfa 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -23,6 +23,8 @@
#ifndef BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
#define BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H
+#include "backends/graphics/graphics.h"
+
#include "common/rect.h"
class SdlEventSource;
@@ -31,16 +33,26 @@ class SdlEventSource;
* Base class for a SDL based graphics manager.
*
* It features a few extra a few extra features required by SdlEventSource.
- * FIXME/HACK:
- * Note it does not inherit from GraphicsManager to avoid a diamond inheritance
- * in the current OpenGLSdlGraphicsManager.
*/
-class SdlGraphicsManager {
+class SdlGraphicsManager : virtual public GraphicsManager {
public:
SdlGraphicsManager(SdlEventSource *source);
virtual ~SdlGraphicsManager();
/**
+ * Makes this graphics manager active. That means it should be ready to
+ * process inputs now. However, even without being active it should be
+ * able to query the supported modes and other bits.
+ */
+ virtual void activateManager();
+
+ /**
+ * Makes this graphics manager inactive. This should allow another
+ * graphics manager to become active again.
+ */
+ virtual void deactivateManager();
+
+ /**
* Notify the graphics manager that the graphics needs to be redrawn, since
* the application window was modified.
*
@@ -80,9 +92,6 @@ public:
virtual void notifyMousePos(Common::Point mouse) = 0;
protected:
- void initEventSource();
- void deinitEventSource();
-
SdlEventSource *_eventSource;
};
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 89802ac8ab..b3af08e2e8 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -198,8 +198,7 @@ SurfaceSdlGraphicsManager::~SurfaceSdlGraphicsManager() {
}
void SurfaceSdlGraphicsManager::activateManager() {
- GraphicsManager::activateManager();
- initEventSource();
+ SdlGraphicsManager::activateManager();
// Register the graphics manager as a event observer
g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false);
@@ -211,8 +210,7 @@ void SurfaceSdlGraphicsManager::deactivateManager() {
g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this);
}
- deinitEventSource();
- GraphicsManager::deactivateManager();
+ SdlGraphicsManager::deactivateManager();
}
bool SurfaceSdlGraphicsManager::hasFeature(OSystem::Feature f) {
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 00c05ff2bf..22b7780675 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -75,7 +75,7 @@ public:
/**
* SDL graphics manager
*/
-class SurfaceSdlGraphicsManager : public GraphicsManager, public SdlGraphicsManager, public Common::EventObserver {
+class SurfaceSdlGraphicsManager : public SdlGraphicsManager, public Common::EventObserver {
public:
SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource);
virtual ~SurfaceSdlGraphicsManager();
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 0ce95a3cfb..9f6c759c75 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -94,6 +94,7 @@ Common::List<Graphics::PixelFormat> OSystem_Android::getSupportedFormats() const
Common::List<Graphics::PixelFormat> res;
res.push_back(GLES565Texture::pixelFormat());
res.push_back(GLES5551Texture::pixelFormat());
+ res.push_back(GLES8888Texture::pixelFormat());
res.push_back(GLES4444Texture::pixelFormat());
res.push_back(Graphics::PixelFormat::createFormatCLUT8());
@@ -147,6 +148,8 @@ void OSystem_Android::initTexture(GLESBaseTexture **texture,
*texture = new GLES565Texture();
else if (format_new == GLES5551Texture::pixelFormat())
*texture = new GLES5551Texture();
+ else if (format_new == GLES8888Texture::pixelFormat())
+ *texture = new GLES8888Texture();
else if (format_new == GLES4444Texture::pixelFormat())
*texture = new GLES4444Texture();
else {
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index cc41c0d8a6..87fd2d976c 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -259,11 +259,15 @@ void GLESTexture::fillBuffer(uint32 color) {
assert(_surface.getPixels());
if (_pixelFormat.bytesPerPixel == 1 ||
- ((color & 0xff) == ((color >> 8) & 0xff)))
+ (_pixelFormat.bytesPerPixel == 2 &&
+ ((color & 0xff) == ((color >> 8) & 0xff))))
memset(_pixels, color & 0xff, _surface.pitch * _surface.h);
- else
- Common::fill(_pixels, _pixels + _surface.pitch * _surface.h,
+ else if (_pixelFormat.bytesPerPixel == 2)
+ Common::fill((uint16 *)_pixels, (uint16 *)(_pixels + _surface.pitch * _surface.h),
(uint16)color);
+ else
+ Common::fill((uint32 *)_pixels, (uint32 *)(_pixels + _surface.pitch * _surface.h),
+ color);
setDirty();
}
@@ -334,6 +338,13 @@ GLES565Texture::GLES565Texture() :
GLES565Texture::~GLES565Texture() {
}
+GLES8888Texture::GLES8888Texture() :
+ GLESTexture(GL_RGBA, GL_UNSIGNED_BYTE, pixelFormat()) {
+}
+
+GLES8888Texture::~GLES8888Texture() {
+}
+
GLESFakePaletteTexture::GLESFakePaletteTexture(GLenum glFormat, GLenum glType,
Graphics::PixelFormat pixelFormat) :
GLESBaseTexture(glFormat, glType, pixelFormat),
diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h
index 4307b5a1bc..67f7343c98 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -224,6 +224,18 @@ public:
}
};
+// RGBA8888 texture
+class GLES8888Texture : public GLESTexture {
+public:
+ GLES8888Texture();
+ virtual ~GLES8888Texture();
+
+ static inline Graphics::PixelFormat pixelFormat() {
+ // We assume LE since all Android platforms are LE.
+ return Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24);
+ }
+};
+
class GLESFakePaletteTexture : public GLESBaseTexture {
protected:
GLESFakePaletteTexture(GLenum glFormat, GLenum glType,
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 954f404ac6..1752153f29 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -50,7 +50,7 @@ void OSystem_POSIX::init() {
// Initialze File System Factory
_fsFactory = new POSIXFilesystemFactory();
-#if defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+#if defined(USE_TASKBAR) && defined(USE_UNITY)
// Initialize taskbar manager
_taskbarManager = new UnityTaskbarManager();
#endif
@@ -67,7 +67,7 @@ void OSystem_POSIX::initBackend() {
// Invoke parent implementation of this method
OSystem_SDL::initBackend();
-#if defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+#if defined(USE_TASKBAR) && defined(USE_UNITY)
// Register the taskbar manager as an event source (this is necessary for the glib event loop to be run)
_eventManager->getEventDispatcher()->registerSource((UnityTaskbarManager *)_taskbarManager, false);
#endif
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 178eeb96af..913ae51f69 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -91,7 +91,7 @@ OSystem_SDL::~OSystem_SDL() {
delete _savefileManager;
_savefileManager = 0;
if (_graphicsManager) {
- _graphicsManager->deactivateManager();
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->deactivateManager();
}
delete _graphicsManager;
_graphicsManager = 0;
@@ -240,7 +240,7 @@ void OSystem_SDL::initBackend() {
// so the virtual keyboard can be initialized, but we have to add the
// graphics manager as an event observer after initializing the event
// manager.
- _graphicsManager->activateManager();
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->activateManager();
}
#if defined(USE_TASKBAR)
@@ -579,14 +579,14 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
// manager, delete and create the new mode graphics manager
if (_graphicsMode >= _firstGLMode && mode < _firstGLMode) {
debug(1, "switching to plain SDL graphics");
- _graphicsManager->deactivateManager();
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->deactivateManager();
delete _graphicsManager;
_graphicsManager = new SurfaceSdlGraphicsManager(_eventSource);
switchedManager = true;
} else if (_graphicsMode < _firstGLMode && mode >= _firstGLMode) {
debug(1, "switching to OpenGL graphics");
- _graphicsManager->deactivateManager();
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->deactivateManager();
delete _graphicsManager;
_graphicsManager = new OpenGLSdlGraphicsManager(_desktopWidth, _desktopHeight, _eventSource);
@@ -596,7 +596,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
_graphicsMode = mode;
if (switchedManager) {
- _graphicsManager->activateManager();
+ dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->activateManager();
_graphicsManager->beginGFXTransaction();
#ifdef USE_RGB_COLOR
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp
index affe053b6a..ec6231522e 100644
--- a/backends/platform/wii/main.cpp
+++ b/backends/platform/wii/main.cpp
@@ -225,7 +225,8 @@ int main(int argc, char *argv[]) {
printf("shutdown\n");
SYS_UnregisterResetFunc(&resetinfo);
- fatUnmountDefault();
+ fatUnmount("usb:/");
+ fatUnmount("sd:/");
if (res)
show_console(res);
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 3ba66aed89..aa63c8aa22 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -188,7 +188,7 @@ void OSystem_Wii::initEvents() {
_padAcceleration = 9 - ConfMan.getInt("wii_pad_acceleration");
#ifdef USE_WII_KBD
- _kbd_active = KEYBOARD_Init() >= 0;
+ _kbd_active = KEYBOARD_Init(NULL) >= 0;
#endif
}
diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk
index 7d2db68b4e..99ef46338c 100644
--- a/backends/platform/wii/wii.mk
+++ b/backends/platform/wii/wii.mk
@@ -17,10 +17,10 @@ geckoupload: $(WII_EXE_STRIPPED)
$(DEVKITPPC)/bin/geckoupload $<
wiigdb:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(EXECUTABLE)
+ $(DEVKITPPC)/bin/powerpc-eabi-gdb -n $(EXECUTABLE)
wiidebug:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(EXECUTABLE) -x $(srcdir)/backends/platform/wii/gdb.txt
+ $(DEVKITPPC)/bin/powerpc-eabi-gdb -n $(EXECUTABLE) -x $(srcdir)/backends/platform/wii/gdb.txt
# target to create a Wii snapshot
wiidist: all
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
index f36e2bf628..1b82e58c8a 100644
--- a/backends/taskbar/unity/unity-taskbar.cpp
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -24,7 +24,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
#include "common/scummsys.h"
-#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_UNITY)
#include "backends/taskbar/unity/unity-taskbar.h"
diff --git a/backends/taskbar/unity/unity-taskbar.h b/backends/taskbar/unity/unity-taskbar.h
index d1d9430bcd..d818ed9ff1 100644
--- a/backends/taskbar/unity/unity-taskbar.h
+++ b/backends/taskbar/unity/unity-taskbar.h
@@ -23,7 +23,7 @@
#ifndef BACKEND_UNITY_TASKBAR_H
#define BACKEND_UNITY_TASKBAR_H
-#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_UNITY)
#include "common/events.h"
#include "common/str.h"