diff options
author | Max Lingua | 2014-01-23 18:33:15 -0500 |
---|---|---|
committer | Max Lingua | 2014-01-23 18:33:15 -0500 |
commit | 4ccdb3e2a30ead1fa015437306b046b69b69035b (patch) | |
tree | e7a75774b540d871848791a6a8db9358514a97b2 /backends/platform | |
parent | b69a2c81a7b0ed535e23e91928bc8ba193db744a (diff) | |
parent | 2fe303ce3fff008a58e9750c66e707ec4e7c93d8 (diff) | |
download | scummvm-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/platform')
-rw-r--r-- | backends/platform/android/gfx.cpp | 3 | ||||
-rw-r--r-- | backends/platform/android/texture.cpp | 17 | ||||
-rw-r--r-- | backends/platform/android/texture.h | 12 | ||||
-rw-r--r-- | backends/platform/sdl/posix/posix.cpp | 4 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 10 | ||||
-rw-r--r-- | backends/platform/wii/main.cpp | 3 | ||||
-rw-r--r-- | backends/platform/wii/osystem_events.cpp | 2 | ||||
-rw-r--r-- | backends/platform/wii/wii.mk | 4 |
8 files changed, 41 insertions, 14 deletions
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 |