aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/dc/dc-fs.cpp2
-rw-r--r--backends/platform/dc/selector.cpp27
-rw-r--r--backends/platform/sdl/win32/win32.cpp10
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp11
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp11
-rw-r--r--backends/platform/wince/README-WinCE.txt24
-rw-r--r--backends/platform/wince/wince-sdl.cpp27
-rw-r--r--backends/platform/wince/wince-sdl.h1
8 files changed, 86 insertions, 27 deletions
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index ac709f62b9..c46f9df093 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -124,7 +124,7 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
if (mode == Common::FSNode::kListFilesOnly)
continue;
- myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
+ myList.push_back(new RoninCDDirectoryNode(newPath));
} else {
// Honor the chosen mode
if (mode == Common::FSNode::kListDirectoriesOnly)
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 859f2a40ed..339e5df62d 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -185,12 +185,24 @@ static void makeDefIcon(Icon &icon)
icon.load(scummvm_icon, sizeof(scummvm_icon));
}
+static bool sameOrSubdir(const char *dir1, const char *dir2)
+{
+ int l1 = strlen(dir1), l2 = strlen(dir2);
+ if (l1<=l2)
+ return !strcmp(dir1, dir2);
+ else
+ return !memcmp(dir1, dir2, l2);
+}
+
static bool uniqueGame(const char *base, const char *dir,
Common::Language lang, Common::Platform plf,
Game *games, int cnt)
{
while (cnt--)
- if (!strcmp(dir, games->dir) &&
+ if (/*Don't detect the same game in a subdir,
+ this is a workaround for the detector bug in toon... */
+ sameOrSubdir(dir, games->dir) &&
+ /*!strcmp(dir, games->dir) &&*/
!stricmp(base, games->filename_base) &&
lang == games->language &&
plf == games->platform)
@@ -237,19 +249,24 @@ static int findGames(Game *games, int max, bool use_ini)
}
while ((curr_game < max || use_ini) && curr_dir < num_dirs) {
- strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
- dirs[curr_dir].name[251] = '\0';
+ strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 251);
+ dirs[curr_dir].name[250] = '\0';
+ if (!dirs[curr_dir].name[0] ||
+ dirs[curr_dir].name[strlen(dirs[curr_dir].name)-1] != '/')
+ strcat(dirs[curr_dir].name, "/");
dirs[curr_dir].deficon[0] = '\0';
Common::FSList files, fslist;
dirs[curr_dir++].node.getChildren(fslist, Common::FSNode::kListAll);
for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {
- if (!use_ini && num_dirs < MAX_DIR &&
- strcasecmp(entry->getDisplayName().c_str(), "install")) {
+ if (!use_ini && num_dirs < MAX_DIR) {
dirs[num_dirs].node = *entry;
num_dirs++;
}
+ /* Toonstruck detector needs directories to be present too */
+ if(!use_ini)
+ files.push_back(*entry);
} else
if (isIcon(*entry))
strcpy(dirs[curr_dir-1].deficon, entry->getDisplayName().c_str());
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index c1b6c853e4..a2c8e43424 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -23,11 +23,6 @@
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
-#include "common/scummsys.h"
-#include "common/config-manager.h"
-#include "common/error.h"
-#include "common/textconsole.h"
-
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
@@ -35,6 +30,11 @@
#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one...
#include <shellapi.h>
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
+
#include <SDL_syswm.h> // For setting the icon
#include "backends/platform/sdl/win32/win32.h"
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 194f855e98..5980a41caa 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -215,6 +215,8 @@ void CEActionsPocket::initInstanceGame() {
_key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
else if (gameid == "atlantis")
_key_action[POCKET_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
+ else if (is_simon)
+ _key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
else
_key_action[POCKET_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
// Key bind method
@@ -268,6 +270,15 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
else
_key_action[action].setKey(SDLK_s);
}
+ if (action == POCKET_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
+ // In several AGI games (for example SQ2) it is needed to press F10 to exit from
+ // a screen. But we still want be able to skip normally with the skip button.
+ // Because of this, we inject a F10 keystroke here (this works and doesn't seem
+ // to have side-effects)
+ _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
+ EventsBuffer::simulateKey(&_key_action[action], true);
+ _key_action[action].setKey(KEY_ALL_SKIP);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case POCKET_ACTION_KEYBOARD:
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index c6456d3eb5..2cce288323 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -181,6 +181,8 @@ void CEActionsSmartphone::initInstanceGame() {
_key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
else if (gameid == "atlantis")
_key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
+ else if (is_simon)
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
else
_key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
// Bind keys
@@ -232,6 +234,15 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
else
_key_action[action].setKey(SDLK_s);
}
+ if (action == SMARTPHONE_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
+ // In several AGI games (for example SQ2) it is needed to press F10 to exit from
+ // a screen. But we still want be able to skip normally with the skip button.
+ // Because of this, we inject a F10 keystroke here (this works and doesn't seem
+ // to have side-effects)
+ _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
+ EventsBuffer::simulateKey(&_key_action[action], true);
+ _key_action[action].setKey(KEY_ALL_SKIP);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case SMARTPHONE_ACTION_RIGHTCLICK:
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index 8f1262051a..60bcf710bb 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -1,10 +1,19 @@
ScummVM Windows CE FAQ
-Last updated: 2011-07-01
-Release version: 1.3.1
+Last updated: 2011-07-20
+Release version: x.x.x
------------------------------------------------------------------------
New in this version
-------------------
+x.x.x:
+- Changed default values for "high_sample_rate" & "FM_high_quality" to "true" as
+ most devices today are fast enough to handle this. It's still possible to set
+ this to "false" if you have a slower device.
+- Fix for TeenAgent & Hugo engines (both weren't running at all, crashed right
+ at the beginning)
+- Replaced the game mass-adding functionality with the functionality used on all
+ other platforms. It now shows progress while searching for games.
+
1.3.1:
- Fix for Normal2xAspect scaler which was causing screen update issues in some
games.
@@ -361,14 +370,13 @@ Some parameters are specific to this port :
Game specific sections (f.e. [monkey2]) - performance options
* high_sample_rate bool Desktop quality (22 kHz) sound output if
- set. The default is 11 kHz.
- If you have a fast device, you can set this
- to true to enjoy better sound effects and
- music.
+ set. This is the default.
+ If you have a slow device, you can set this
+ to false to prevent lags/delays in the game.
* FM_high_quality bool Desktop quality FM synthesis if set. Lower
- quality otherwise. The default is low
+ quality otherwise. The default is high
quality. You can change this if you have a
- fast device.
+ slow device.
* sound_thread_priority int Set the priority of the sound thread (0, 1,
2). Depending on the release, this is set
to 1 internally (above normal).
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index ec222c6fc1..1abc3cb350 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -42,6 +42,7 @@
#include "audio/mixer_intern.h"
#include "audio/fmopl.h"
+#include "backends/mutex/sdl/sdl-mutex.h"
#include "backends/timer/sdl/sdl-timer.h"
#include "gui/Actions.h"
@@ -379,14 +380,6 @@ void OSystem_WINCE3::initBackend() {
((WINCESdlEventSource *)_eventSource)->init((WINCESdlGraphicsManager *)_graphicsManager);
- // Create the timer (but remove the timer manager from the SDL backend first).
- // CE SDL does not support multiple timers (SDL_AddTimer).
- // We work around this by using the SetTimer function, since we only use
- // one timer in scummvm (for the time being)
- delete _timerManager;
- _timerManager = new DefaultTimerManager();
- SDL_SetTimer(10, &timer_handler_wrapper);
-
// Call parent implementation of this method
OSystem_SDL::initBackend();
@@ -546,6 +539,24 @@ void OSystem_WINCE3::initSDL() {
}
}
+void OSystem_WINCE3::init() {
+ // Create SdlMutexManager instance as the TimerManager relies on the
+ // MutexManager being already initialized
+ if (_mutexManager == 0)
+ _mutexManager = new SdlMutexManager();
+
+ // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer).
+ // We work around this by using the SetTimer function, since we only use
+ // one timer in scummvm (for the time being)
+ if (_timerManager == 0) {
+ _timerManager = new DefaultTimerManager();
+ SDL_SetTimer(10, &timer_handler_wrapper);
+ }
+
+ // Call parent implementation of this method
+ OSystem_SDL::init();
+}
+
void OSystem_WINCE3::quit() {
fclose(stdout_file);
fclose(stderr_file);
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index 481956c19a..b4f323c9e2 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -52,6 +52,7 @@ public:
void initBackend();
// Overloaded from SDL backend
+ void init();
void quit();
virtual Common::String getSystemLanguage() const;