diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/android/gfx.cpp | 2 | ||||
-rw-r--r-- | backends/platform/dc/vmsave.cpp | 29 | ||||
-rw-r--r-- | backends/platform/dingux/README.GCW0 | 26 | ||||
-rwxr-xr-x | backends/platform/dingux/build.gcw0.sh | 6 | ||||
-rw-r--r-- | backends/platform/dingux/dingux.mk | 16 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_osys_main.cpp | 32 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_osys_main.h | 4 | ||||
-rw-r--r-- | backends/platform/maemo/debian/changelog | 10 | ||||
-rwxr-xr-x | backends/platform/maemo/debian/rules | 4 | ||||
-rw-r--r-- | backends/platform/sdl/amigaos/amigaos.mk | 14 | ||||
-rw-r--r-- | backends/platform/sdl/sdl-sys.h | 32 | ||||
-rw-r--r-- | backends/platform/sdl/win32/win32-main.cpp | 7 | ||||
-rw-r--r-- | backends/platform/tizen/system.cpp | 49 | ||||
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 4 |
14 files changed, 172 insertions, 63 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index d7713f99d8..f847296892 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -469,7 +469,7 @@ void OSystem_Android::updateScreen() { GLCALL(glTranslatex(0, -_shake_offset << 16, 0)); } -// TODO this doesnt work on those sucky drivers, do it differently +// TODO this doesn't work on those sucky drivers, do it differently // if (_show_overlay) // GLCALL(glColor4ub(0x9f, 0x9f, 0x9f, 0x9f)); diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index 5f5cdff24f..75fc1ed0df 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -165,30 +165,7 @@ static bool tryDelete(const char *filename, int vm) return true; } -static bool matches(const char *glob, const char *name) -{ - while(*glob) - if(*glob == '*') { - while(*glob == '*') - glob++; - do { - if((*name == *glob || *glob == '?') && - matches(glob, name)) - return true; - } while(*name++); - return false; - } else if(!*name) - return false; - else if(*glob == '?' || *glob == *name) { - glob++; - name++; - } - else - return false; - return !*name; -} - -static void tryList(const char *glob, int vm, Common::StringArray &list) +static void tryList(const Common::String &glob, int vm, Common::StringArray &list) { struct vmsinfo info; struct superblock super; @@ -205,7 +182,7 @@ static void tryList(const char *glob, int vm, Common::StringArray &list) char buf[16]; strncpy(buf, (char *)de.entry+4, 12); buf[12] = 0; - if (matches(glob, buf)) + if (Common::matchString(buf, glob.c_str())) list.push_back(buf); } } @@ -425,7 +402,7 @@ Common::StringArray VMSaveManager::listSavefiles(const Common::String &pattern) Common::StringArray list; for (int i=0; i<24; i++) - tryList(pattern.c_str(), i, list); + tryList(pattern, i, list); return list; } diff --git a/backends/platform/dingux/README.GCW0 b/backends/platform/dingux/README.GCW0 new file mode 100644 index 0000000000..1875e5323a --- /dev/null +++ b/backends/platform/dingux/README.GCW0 @@ -0,0 +1,26 @@ +[ScummVM-GCW0 README] + +Controls +======== +- Dpad/analog joy: move mouse cursor +- A: left mouse button click +- B: right mouse button click +- X: '0' key +- Y: '.' key (skips dialogue line in some engines) +- Left Trigger: open global menu +- Right Trigger: opens virtual keyboard +- Select: ESC button, scene skip in some engines +- Start: F5 key, game menu in some engines + +Installation from binaries +========================== +Copy over scummvm.opk file + +Building from binaries +====================== +It's pretty simple if you are running Linux on an x86/amd64 machine: +1. Download and install the GCW0 toolchain (http://www.gcw-zero.com/develop) +2. Download ScummVM sources and uncompress them +3. Run backends/platform/dingux/build.gcw0.sh script +4. Copy the resulting file scummvm.opk to your device +5. Enjoy diff --git a/backends/platform/dingux/build.gcw0.sh b/backends/platform/dingux/build.gcw0.sh new file mode 100755 index 0000000000..c1a4fa29c2 --- /dev/null +++ b/backends/platform/dingux/build.gcw0.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +export PATH=/opt/gcw0-toolchain/usr/bin:$PATH + +# Disable high resolution engines since we have 320x240 hardware +./configure --host=gcw0 --enable-plugins --default-dynamic --enable-release --disable-mt32emu --disable-hq-scalers && make -j6 gcw-opk && ls -l scummvm.opk diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk index 1333e89ff8..56c26c3be1 100644 --- a/backends/platform/dingux/dingux.mk +++ b/backends/platform/dingux/dingux.mk @@ -55,6 +55,13 @@ endif $(CP) $(srcdir)/dists/gcw0/default.gcw0.desktop $(gcw0_bundle)/ $(CP) $(srcdir)/dists/gcw0/scummvmrc $(gcw0_bundle)/ $(CP) $(srcdir)/dists/gcw0/scummvm.sh $(gcw0_bundle)/ + $(CP) $(srcdir)/backends/platform/dingux/README.GCW0 $(gcw0_bundle)/README.man.txt + echo >> $(gcw0_bundle)/README.man.txt + echo '[General README]' >> $(gcw0_bundle)/README.man.txt + echo >> $(gcw0_bundle)/README.man.txt + cat README >> $(gcw0_bundle)/README.man.txt + +# $(CP) GeneralUser\ GS\ FluidSynth\ v1.44.sf2 $(gcw0_bundle)/ gcw0-opk-unstripped: $(gcw0_bundle) $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/ @@ -65,3 +72,12 @@ gcw-opk: $(gcw0_bundle) $(STRIP) $(gcw0_bundle)/plugins/* $(STRIP) $(gcw0_bundle)/scummvm ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm + +GeneralUser_GS_1.44-FluidSynth.zip: + curl -s http://www.scummvm.org/frs/extras/SoundFont/GeneralUser_GS_1.44-FluidSynth.zip -o GeneralUser_GS_1.44-FluidSynth.zip + +GeneralUser\ GS\ FluidSynth\ v1.44.sf2: GeneralUser_GS_1.44-FluidSynth.zip + unzip -n GeneralUser_GS_1.44-FluidSynth.zip + mv "GeneralUser GS 1.44 FluidSynth/GeneralUser GS FluidSynth v1.44.sf2" . + mv "GeneralUser GS 1.44 FluidSynth/README.txt" README.soundfont + mv "GeneralUser GS 1.44 FluidSynth/LICENSE.txt" LICENSE.soundfont diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index c1280a2969..25d9cbed15 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -79,6 +79,33 @@ AQCallbackStruct OSystem_iOS7::s_AudioQueue; SoundProc OSystem_iOS7::s_soundCallback = NULL; void *OSystem_iOS7::s_soundParam = NULL; +#ifdef IPHONE_SANDBOXED +class SandboxedSaveFileManager : public DefaultSaveFileManager { + Common::String _sandboxRootPath; +public: + + SandboxedSaveFileManager(Common::String sandboxRootPath, Common::String defaultSavepath) + : DefaultSaveFileManager(defaultSavepath), _sandboxRootPath(sandboxRootPath) { + } + + virtual bool removeSavefile(const Common::String &filename) override { + Common::String chrootedFile = getSavePath() + "/" + filename; + Common::String realFilePath = _sandboxRootPath + chrootedFile; + + if (remove(realFilePath.c_str()) != 0) { + if (errno == EACCES) + setError(Common::kWritePermissionDenied, "Search or write permission denied: "+chrootedFile); + + if (errno == ENOENT) + setError(Common::kPathDoesNotExist, "removeSavefile: '"+chrootedFile+"' does not exist or path is invalid"); + return false; + } else { + return true; + } + } +}; +#endif + OSystem_iOS7::OSystem_iOS7() : _mixer(NULL), _lastMouseTap(0), _queuedEventTime(0), _mouseNeedTextureUpdate(false), _secondaryTapped(false), _lastSecondaryTap(0), @@ -89,7 +116,8 @@ OSystem_iOS7::OSystem_iOS7() : _queuedInputEvent.type = Common::EVENT_INVALID; _touchpadModeEnabled = !iOS7_isBigDevice(); #ifdef IPHONE_SANDBOXED - _fsFactory = new ChRootFilesystemFactory(iOS7_getDocumentsDir()); + _chrootBasePath = iOS7_getDocumentsDir(); + _fsFactory = new ChRootFilesystemFactory(_chrootBasePath); #else _fsFactory = new POSIXFilesystemFactory(); #endif @@ -124,7 +152,7 @@ int OSystem_iOS7::timerHandler(int t) { void OSystem_iOS7::initBackend() { #ifdef IPHONE_SANDBOXED - _savefileManager = new DefaultSaveFileManager("/Savegames"); + _savefileManager = new SandboxedSaveFileManager(_chrootBasePath, "/Savegames"); #else _savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH); #endif diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h index cc2f1ccc06..174c160bd6 100644 --- a/backends/platform/ios7/ios7_osys_main.h +++ b/backends/platform/ios7/ios7_osys_main.h @@ -111,6 +111,10 @@ protected: char *_lastErrorMessage; +#ifdef IPHONE_SANDBOXED + Common::String _chrootBasePath; +#endif + public: OSystem_iOS7(); diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog index 8975871203..6b6d1aebd8 100644 --- a/backends/platform/maemo/debian/changelog +++ b/backends/platform/maemo/debian/changelog @@ -1,8 +1,14 @@ -scummvm (1.8.0~git) unstable; urgency=low +scummvm (1.9.0~git) unstable; urgency=low * Development snapshot - -- Tarek Soliman <tsoliman@scummvm.org> Mon, 01 Feb 2016 22:37:44 -0600 + -- Tarek Soliman <tsoliman@scummvm.org> Fri, 26 Feb 2016 21:11:20 -0600 + +scummvm (1.8.0) unstable; urgency=low + + * 1.8.0 release + + -- Tarek Soliman <tsoliman@scummvm.org> Fri, 26 Feb 2016 21:11:20 -0600 scummvm (1.7.0) unstable; urgency=low diff --git a/backends/platform/maemo/debian/rules b/backends/platform/maemo/debian/rules index 70f52aac8f..0e72c8aa9a 100755 --- a/backends/platform/maemo/debian/rules +++ b/backends/platform/maemo/debian/rules @@ -6,8 +6,8 @@ build: scummvm scummvm: dh_testdir - ./configure --host=maemo - $(MAKE) + ./configure --host=maemo $(CONFIGURE_EXTRA_ARGS) + $(MAKE) $(MAKE_EXTRA_ARGS) clean: dh_testdir diff --git a/backends/platform/sdl/amigaos/amigaos.mk b/backends/platform/sdl/amigaos/amigaos.mk index 0c3c467965..15a2e9f93f 100644 --- a/backends/platform/sdl/amigaos/amigaos.mk +++ b/backends/platform/sdl/amigaos/amigaos.mk @@ -11,8 +11,14 @@ ifdef DIST_FILES_ENGINEDATA cp $(DIST_FILES_ENGINEDATA) $(AMIGAOSPATH)/extras/ endif cat ${srcdir}/README | sed -f ${srcdir}/dists/amiga/convertRM.sed > README.conv - rx dists/amiga/RM2AG.rx README.conv - cp ${srcdir}/README.guide $(AMIGAOSPATH) - rm ${srcdir}/README.conv - rm ${srcdir}/README.guide +# AmigaOS's shell is not happy with indented comments, thus don't do it. +# AREXX seems to have problems when ${srcdir} is '.'. It will break with a +# "Program not found" error. Therefore we copy the script to the cwd and +# remove it again, once it has finished. + cp ${srcdir}/dists/amiga/RM2AG.rx . + rx RM2AG.rx README.conv + cp README.guide $(AMIGAOSPATH) + rm RM2AG.rx + rm README.conv + rm README.guide cp $(DIST_FILES_DOCS) $(AMIGAOSPATH) diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h index 67ad84efd3..551605a4b4 100644 --- a/backends/platform/sdl/sdl-sys.h +++ b/backends/platform/sdl/sdl-sys.h @@ -52,6 +52,21 @@ typedef struct { int FAKE; } FAKE_FILE; #define strncasecmp FAKE_strncasecmp #endif +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_exit) +#undef exit +#define exit FAKE_exit +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_abort) +#undef abort +#define abort FAKE_abort +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_system) +#undef system +#define system FAKE_system +#endif + // HACK: SDL might include windows.h which defines its own ARRAYSIZE. // However, we want to use the version from common/util.h. Thus, we make sure // that we actually have this definition after including the SDL headers. @@ -112,7 +127,7 @@ typedef struct { int FAKE; } FAKE_FILE; #endif // In a moment of brilliance Xlib.h included by SDL_syswm.h #defines the -// following names. In a moment of mental breakdown, which occured upon +// following names. In a moment of mental breakdown, which occurred upon // gazing at Xlib.h, LordHoto decided to undefine them to prevent havoc. #ifdef Status #undef Status @@ -146,6 +161,21 @@ typedef struct { int FAKE; } FAKE_FILE; #define strncasecmp FORBIDDEN_SYMBOL_REPLACEMENT #endif +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_exit) +#undef exit +#define exit(a) FORBIDDEN_SYMBOL_REPLACEMENT +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_abort) +#undef abort +#define abort() FORBIDDEN_SYMBOL_REPLACEMENT +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_system) +#undef system +#define system(a) FORBIDDEN_SYMBOL_REPLACEMENT +#endif + // SDL 2 has major API changes. We redefine constants which got renamed to // ease the transition. This is sometimes dangerous because the values changed // too! diff --git a/backends/platform/sdl/win32/win32-main.cpp b/backends/platform/sdl/win32/win32-main.cpp index c6339f0c8c..4864347d81 100644 --- a/backends/platform/sdl/win32/win32-main.cpp +++ b/backends/platform/sdl/win32/win32-main.cpp @@ -44,7 +44,12 @@ int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpC SDL_SetModuleHandle(GetModuleHandle(NULL)); #endif // HACK: __argc, __argv are broken and return zero when using mingwrt 4.0+ on MinGW -#if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64__) +// HACK: MinGW-w64 based toolchains neither feature _argc nor _argv. The 32 bit +// incarnation only defines __MINGW32__. This leads to build breakage due to +// missing declarations. Luckily MinGW-w64 based toolchains define +// __MINGW64_VERSION_foo macros inside _mingw.h, which is included from all +// system headers. Thus we abuse that to detect them. +#if defined(__GNUC__) && defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) return main(_argc, _argv); #else return main(__argc, __argv); diff --git a/backends/platform/tizen/system.cpp b/backends/platform/tizen/system.cpp index a235456670..1820a28791 100644 --- a/backends/platform/tizen/system.cpp +++ b/backends/platform/tizen/system.cpp @@ -81,36 +81,41 @@ struct TizenSaveFileManager : public DefaultSaveFileManager { }; bool TizenSaveFileManager::removeSavefile(const Common::String &filename) { - Common::String savePathName = getSavePath(); + // Assure the savefile name cache is up-to-date. + assureCached(getSavePath()); + if (getError().getCode() != Common::kNoError) + return false; - checkPath(Common::FSNode(savePathName)); - if (getError().getCode() != Common::kNoError) { + // Obtain node if exists. + SaveFileCache::const_iterator file = _saveFileCache.find(filename); + if (file == _saveFileCache.end()) { return false; - } + } else { + const Common::FSNode fileNode = file->_value; + // Remove from cache, this invalidates the 'file' iterator. + _saveFileCache.erase(file); + file = _saveFileCache.end(); - // recreate FSNode since checkPath may have changed/created the directory - Common::FSNode savePath(savePathName); - Common::FSNode file = savePath.getChild(filename); + String unicodeFileName; + StringUtil::Utf8ToString(fileNode.getPath().c_str(), unicodeFileName); - String unicodeFileName; - StringUtil::Utf8ToString(file.getPath().c_str(), unicodeFileName); + switch (Tizen::Io::File::Remove(unicodeFileName)) { + case E_SUCCESS: + return true; - switch (Tizen::Io::File::Remove(unicodeFileName)) { - case E_SUCCESS: - return true; + case E_ILLEGAL_ACCESS: + setError(Common::kWritePermissionDenied, "Search or write permission denied: " + + file.getName()); + break; - case E_ILLEGAL_ACCESS: - setError(Common::kWritePermissionDenied, "Search or write permission denied: " + - file.getName()); - break; + default: + setError(Common::kPathDoesNotExist, "removeSavefile: '" + file.getName() + + "' does not exist or path is invalid"); + break; + } - default: - setError(Common::kPathDoesNotExist, "removeSavefile: '" + file.getName() + - "' does not exist or path is invalid"); - break; + return false; } - - return false; } // diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index c1b0c7f692..02853b548e 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -645,7 +645,7 @@ Common::String OSystem_WINCE3::getSystemLanguage() const { const char *posixMappingTable[][3] = { {"CAT", "ESP", "ca_ES"}, {"CSY", "CZE", "cs_CZ"}, - {"DAN", "DNK", "da_DA"}, + {"DAN", "DNK", "da_DK"}, {"DEU", "DEU", "de_DE"}, {"ESN", "ESP", "es_ES"}, {"ESP", "ESP", "es_ES"}, @@ -657,7 +657,7 @@ Common::String OSystem_WINCE3::getSystemLanguage() const { {"PLK", "POL", "pl_PL"}, {"PTB", "BRA", "pt_BR"}, {"RUS", "RUS", "ru_RU"}, - {"SVE", "SWE", "se_SE"}, + {"SVE", "SWE", "sv_SE"}, {"UKR", "UKR", "uk_UA"}, {NULL, NULL, NULL} }; |