aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/gltexture.h5
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp12
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java1
-rw-r--r--backends/platform/android/texture.cpp2
-rw-r--r--backends/platform/bada/portdefs.h1
-rw-r--r--backends/platform/dc/portdefs.h1
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h1
-rw-r--r--backends/platform/maemo/debian/changelog12
-rw-r--r--backends/platform/n64/portdefs.h1
-rw-r--r--backends/platform/psp/portdefs.h1
-rw-r--r--backends/platform/wince/portdefs.h1
-rwxr-xr-xbackends/timer/bada/timer.cpp2
-rw-r--r--backends/timer/default/default-timer.cpp8
13 files changed, 29 insertions, 19 deletions
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 71f1eeb78f..d8c42eeb2d 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -103,6 +103,11 @@ public:
GLuint getHeight() const { return _realHeight; }
/**
+ * Get the bytes per pixel.
+ */
+ uint getBytesPerPixel() const { return _bytesPerPixel; }
+
+ /**
* Set the texture filter.
* @filter the filter type, GL_NEAREST or GL_LINEAR
*/
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 8e01e76f16..5b1f7b4b28 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1115,8 +1115,6 @@ void OpenGLGraphicsManager::loadTextures() {
}
#endif
- uint gameScreenBPP = 0;
-
if (!_gameTexture) {
byte bpp;
GLenum intformat;
@@ -1127,7 +1125,6 @@ void OpenGLGraphicsManager::loadTextures() {
#else
getGLPixelFormat(Graphics::PixelFormat::createFormatCLUT8(), bpp, intformat, format, type);
#endif
- gameScreenBPP = bpp;
_gameTexture = new GLTexture(bpp, intformat, format, type);
} else
_gameTexture->refresh();
@@ -1186,10 +1183,11 @@ void OpenGLGraphicsManager::loadTextures() {
// We need to setup a proper unpack alignment value here, else we will
// get problems with the texture updates, in case the surface data is
// not properly aligned.
- // For now we use the gcd of the game screen format and 2, since 2 is
- // the BPP value for the overlay and the OSD.
- if (gameScreenBPP)
- glPixelStorei(GL_UNPACK_ALIGNMENT, Common::gcd<uint>(gameScreenBPP, 2));
+ // It is noteworthy this assumes the OSD uses the same BPP as the overlay
+ // and that the cursor works with any alignment setting.
+ int newAlignment = Common::gcd(_gameTexture->getBytesPerPixel(), _overlayTexture->getBytesPerPixel());
+ assert(newAlignment == 1 || newAlignment == 2 || newAlignment == 4);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, newAlignment);
// We use a "pack" alignment (when reading from textures) to 4 here,
// since the only place where we really use it is the BMP screenshot
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 7c61520d43..fbd6513761 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -134,6 +134,7 @@ public class ScummVMActivity extends Activity {
// world-readable and don't get deleted on uninstall.
String savePath = Environment.getExternalStorageDirectory() + "/ScummVM/Saves/";
File saveDir = new File(savePath);
+ saveDir.mkdirs();
if (!saveDir.isDirectory()) {
// If it doesn't work, resort to the internal app path.
savePath = getDir("saves", MODE_WORLD_READABLE).getPath();
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 53b4d1cc59..e211e5941f 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -287,7 +287,7 @@ void GLESTexture::fillBuffer(uint32 color) {
((color & 0xff) == ((color >> 8) & 0xff)))
memset(_pixels, color & 0xff, _surface.pitch * _surface.h);
else
- Common::set_to(_pixels, _pixels + _surface.pitch * _surface.h,
+ Common::fill(_pixels, _pixels + _surface.pitch * _surface.h,
(uint16)color);
setDirty();
diff --git a/backends/platform/bada/portdefs.h b/backends/platform/bada/portdefs.h
index e85d578678..7d85a9ec35 100644
--- a/backends/platform/bada/portdefs.h
+++ b/backends/platform/bada/portdefs.h
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <unistd.h>
#include <math.h>
+#include <new>
#define M_PI 3.14159265358979323846
diff --git a/backends/platform/dc/portdefs.h b/backends/platform/dc/portdefs.h
index ca2b5208a3..1f5c8f566a 100644
--- a/backends/platform/dc/portdefs.h
+++ b/backends/platform/dc/portdefs.h
@@ -29,6 +29,7 @@
#include <assert.h>
#include <ctype.h>
#include <math.h>
+#include <new>
#ifndef RONIN_TIMER_ACCESS
#define Timer ronin_Timer
#endif
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h
index f512ce3ea2..e40849a513 100644
--- a/backends/platform/ds/arm9/source/portdefs.h
+++ b/backends/platform/ds/arm9/source/portdefs.h
@@ -37,6 +37,7 @@
#include <stdarg.h>
#include <ctype.h>
#include <math.h>
+#include <new>
#define double float
diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog
index d3e0287186..8a9d8ee3c3 100644
--- a/backends/platform/maemo/debian/changelog
+++ b/backends/platform/maemo/debian/changelog
@@ -1,8 +1,14 @@
-scummvm (1.4.0~git) unstable; urgency=low
+scummvm (1.5.0~git) unstable; urgency=low
- * development snapshot
+ * Development snapshot
- -- Tarek Soliman <tsoliman@scummvm.org> Wed, 05 Oct 2011 19:01:25 -0500
+ -- Tarek Soliman <tsoliman@scummvm.org> Tue, 15 Nov 2011 14:56:57 -0600
+
+scummvm (1.4.0) unstable; urgency=low
+
+ * 1.4.0 release
+
+ -- Tarek Soliman <tsoliman@scummvm.org> Thu, 03 Nov 2011 13:54:04 -0500
scummvm (1.2.1~pre) unstable; urgency=low
diff --git a/backends/platform/n64/portdefs.h b/backends/platform/n64/portdefs.h
index 677ad48477..10f5ed6488 100644
--- a/backends/platform/n64/portdefs.h
+++ b/backends/platform/n64/portdefs.h
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <ctype.h>
#include <math.h>
+#include <new>
#undef assert
#define assert(x) ((x) ? 0 : (print_error("ASSERT TRIGGERED:\n\n("#x")\n%s\nline: %d", __FILE__, __LINE__)))
diff --git a/backends/platform/psp/portdefs.h b/backends/platform/psp/portdefs.h
index e8a28b31e2..620a27a601 100644
--- a/backends/platform/psp/portdefs.h
+++ b/backends/platform/psp/portdefs.h
@@ -38,6 +38,7 @@
#include <time.h>
#include <ctype.h>
#include <assert.h>
+#include <new>
#include <pspkernel.h>
#include <pspdebug.h>
diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h
index 93df6cd39e..289406c2a4 100644
--- a/backends/platform/wince/portdefs.h
+++ b/backends/platform/wince/portdefs.h
@@ -73,6 +73,7 @@
#include <mmsystem.h>
#include <ctype.h>
//#include <direct.h>
+#include <new>
#ifdef __MINGW32CE__
void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *));
diff --git a/backends/timer/bada/timer.cpp b/backends/timer/bada/timer.cpp
index 8f5620401f..faddacb3c3 100755
--- a/backends/timer/bada/timer.cpp
+++ b/backends/timer/bada/timer.cpp
@@ -76,7 +76,7 @@ BadaTimerManager::BadaTimerManager() {
BadaTimerManager::~BadaTimerManager() {
for (Common::List<TimerSlot>::iterator slot = _timers.begin();
- slot != _timers.end(); ++slot) {
+ slot != _timers.end(); ) {
slot->Stop();
slot = _timers.erase(slot);
}
diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp
index e1aadb62b8..8681102cd0 100644
--- a/backends/timer/default/default-timer.cpp
+++ b/backends/timer/default/default-timer.cpp
@@ -122,7 +122,7 @@ bool DefaultTimerManager::installTimerProc(TimerProc callback, int32 interval, v
for (i = _callbacks.begin(); i != _callbacks.end(); ++i) {
if (i->_value == callback) {
- error("Same callback is referred by different names (%s vs %s)", i->_key.c_str(), id.c_str());
+ error("Same callback added twice (old name: %s, new name: %s)", i->_key.c_str(), id.c_str());
}
}
_callbacks[id] = callback;
@@ -136,12 +136,6 @@ bool DefaultTimerManager::installTimerProc(TimerProc callback, int32 interval, v
slot->nextFireTimeMicro = interval % 1000;
slot->next = 0;
- // FIXME: It seems we do allow the client to add one callback multiple times over here,
- // but "removeTimerProc" will remove *all* added instances. We should either prevent
- // multiple additions of a timer proc OR we should change removeTimerProc to only remove
- // a specific timer proc entry.
- // Probably we can safely just allow a single addition of a specific function once
- // and just update our Timer documentation accordingly.
insertPrioQueue(_head, slot);
return true;