aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/wince')
-rw-r--r--backends/platform/wince/Makefile4
-rw-r--r--backends/platform/wince/README-WinCE.txt14
-rw-r--r--backends/platform/wince/missing/missing.cpp19
-rw-r--r--backends/platform/wince/wince-sdl.cpp25
-rw-r--r--backends/platform/wince/wince-sdl.h1
5 files changed, 51 insertions, 12 deletions
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
index acade8ac9a..49101dcb27 100644
--- a/backends/platform/wince/Makefile
+++ b/backends/platform/wince/Makefile
@@ -50,10 +50,10 @@ ENABLE_MADE = STATIC_PLUGIN
## Pick which libraries you want to use here
USE_MAD = 1
-USE_MPEG2 = 1
+#USE_MPEG2 = 1
#USE_TREMOR = 1
USE_TREMOLO = 1
-USE_FLAC = 1
+#USE_FLAC = 1
USE_ZLIB = 1
########################################################################
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index 5b3215e34e..21c62fb47f 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -1,6 +1,6 @@
ScummVM Windows CE FAQ
Last updated: $Date$
-Release version: 0.13.0
+Release version: 1.0.0rc1
------------------------------------------------------------------------
New in this version
@@ -20,6 +20,18 @@ Be aware that Discworld 2 tries to allocate a big chunk of memory (10 MB)
and this will fail on many devices (file under the not enough memory
category).
+From this version on, we're dropping support for FLAC and MPEG-2. The first
+is a pain to maintain, while the second has been gradually phased out in
+scummvm. Be sure to update your add-on packs and/or recompress your sound.
+
+This is still a 2-binary distribution. Here's what engines are compiled in
+the two executables:
+scummvm1.exe:
+ - scumm, sword1, sword2, queen, sky, lure, agi, touche, tinsel, cruise
+scummvm2.exe:
+ - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker, made
+
+
------------------------------------------------------------------------
This document is intended to give common answers to specific ScummVM
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
index ac93e8f714..2d9765b0f2 100644
--- a/backends/platform/wince/missing/missing.cpp
+++ b/backends/platform/wince/missing/missing.cpp
@@ -42,6 +42,7 @@
#endif
#include "time.h"
#include "dirent.h"
+#include "common/debug.h"
char *strdup(const char *strSource);
@@ -182,11 +183,19 @@ int _access(const char *path, int mode) {
HANDLE h = FindFirstFile(fname, &ffd);
FindClose(h);
- if (h == INVALID_HANDLE_VALUE)
- return -1; //Can't find file
+ if (h == INVALID_HANDLE_VALUE) {
+ // WORKAROUND: WinCE 3.0 doesn't find paths ending in '\'
+ if (path[strlen(path)-1] == '\\') {
+ char p2[MAX_PATH];
+ strncpy(p2, path, strlen(path)-1);
+ p2[strlen(path) - 1]= '\0';
+ return _access(p2, mode);
+ } else
+ return -1; //Can't find file
+ }
- if (ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {
- // WORKAROUND: WinCE (or the emulator) sometimes returns bogus direcotry
+ if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ // WORKAROUND: WinCE (or the emulator) sometimes returns bogus directory
// hits for files that don't exist. TRIPLE checking for the same fname
// seems to weed out those false positives.
// Exhibited in kyra engine.
@@ -206,7 +215,7 @@ int _access(const char *path, int mode) {
return 0;
case 06: //Check Read & Write permission
case 02: //Check Write permission
- return ffd.dwFileAttributes&FILE_ATTRIBUTE_READONLY?-1:0;
+ return ffd.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? -1 : 0;
case 04: //Check Read permission
return 0; //Assume always have read permission
}
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 5d75b76805..65082014da 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -1934,8 +1934,7 @@ void OSystem_WINCE3::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
_mouseData = (byte *) malloc(w * h);
memcpy(_mouseData, buf, w * h);
- if (w > _mouseBackupDim || h > _mouseBackupDim)
- {
+ if (w > _mouseBackupDim || h > _mouseBackupDim) {
// mouse has been undrawn, adjust sprite backup area
free(_mouseBackupOld);
free(_mouseBackupToolbar);
@@ -2050,7 +2049,6 @@ void OSystem_WINCE3::undrawMouse() {
if (_mouseNeedsRedraw)
return;
- _mouseNeedsRedraw = true;
int old_mouse_x = _mouseCurState.x - _mouseHotspotX;
int old_mouse_y = _mouseCurState.y - _mouseHotspotY;
@@ -2101,6 +2099,22 @@ void OSystem_WINCE3::undrawMouse() {
addDirtyRect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen);
+
+ _mouseNeedsRedraw = true;
+}
+
+bool OSystem_WINCE3::showMouse(bool visible) {
+ if (_mouseVisible == visible)
+ return visible;
+
+ if (visible == false)
+ undrawMouse();
+
+ bool last = _mouseVisible;
+ _mouseVisible = visible;
+ _mouseNeedsRedraw = true;
+
+ return last;
}
void OSystem_WINCE3::drawToolbarMouse(SDL_Surface *surf, bool draw) {
@@ -2457,9 +2471,12 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
}
if (_toolbarHandler.action(event.mouse.x, event.mouse.y, false)) {
- if (!_toolbarHandler.drawn())
+ if (!_toolbarHandler.drawn()) {
_toolbarHighDrawn = false;
internUpdateScreen();
+ }
+ return false;
+
}
return true;
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index cc2948f93d..deafde6d80 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -94,6 +94,7 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend
void undrawMouse();
void blitCursor();
+ bool showMouse(bool visible);
void setMousePos(int x, int y);
void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME)
void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);