diff options
Diffstat (limited to 'backends/platform')
25 files changed, 138 insertions, 225 deletions
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk index 2e8fd62152..9292a16595 100644 --- a/backends/platform/android/android.mk +++ b/backends/platform/android/android.mk @@ -130,7 +130,18 @@ $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scum $(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(INSTALL) -d $(PATH_BUILD_ASSETS) $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(PATH_BUILD_ASSETS)/ - $(AAPT) package -f -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@ + work_dir=`pwd`; \ + for i in $(PATH_BUILD_ASSETS)/*.zip; do \ + echo "recompress $$i"; \ + cd $$work_dir; \ + $(RM) -rf $(PATH_BUILD_ASSETS)/tmp; \ + $(MKDIR) $(PATH_BUILD_ASSETS)/tmp; \ + unzip -q $$i -d $(PATH_BUILD_ASSETS)/tmp; \ + cd $(PATH_BUILD_ASSETS)/tmp; \ + zip -r ../`basename $$i` *; \ + done + @$(RM) -rf $(PATH_BUILD_ASSETS)/tmp + $(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@ $(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR8) $(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR8) -F $@ diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index 95c96e0d25..b174e93191 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -52,9 +52,6 @@ // Supported GL extensions static bool npot_supported = false; -#ifdef GL_OES_draw_texture -static bool draw_tex_supported = false; -#endif static inline GLfixed xdiv(int numerator, int denominator) { assert(numerator < (1 << 16)); @@ -85,11 +82,6 @@ void GLESBaseTexture::initGLExtensions() { if (token == "GL_ARB_texture_non_power_of_two") npot_supported = true; - -#ifdef GL_OES_draw_texture - if (token == "GL_OES_draw_texture") - draw_tex_supported = true; -#endif } } @@ -180,45 +172,28 @@ void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) { void GLESBaseTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) { GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name)); -#ifdef GL_OES_draw_texture - // Great extension, but only works under specific conditions. - // Still a work-in-progress - disabled for now. - if (false && draw_tex_supported && !hasPalette()) { - //GLCALL(glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE)); - const GLint crop[4] = { 0, _surface.h, _surface.w, -_surface.h }; + const GLfixed tex_width = xdiv(_surface.w, _texture_width); + const GLfixed tex_height = xdiv(_surface.h, _texture_height); + const GLfixed texcoords[] = { + 0, 0, + tex_width, 0, + 0, tex_height, + tex_width, tex_height, + }; - GLCALL(glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop)); + GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); - // Android GLES bug? - GLCALL(glColor4ub(0xff, 0xff, 0xff, 0xff)); + const GLshort vertices[] = { + x, y, + x + w, y, + x, y + h, + x + w, y + h, + }; - GLCALL(glDrawTexiOES(x, y, 0, w, h)); - } else -#endif - { - const GLfixed tex_width = xdiv(_surface.w, _texture_width); - const GLfixed tex_height = xdiv(_surface.h, _texture_height); - const GLfixed texcoords[] = { - 0, 0, - tex_width, 0, - 0, tex_height, - tex_width, tex_height, - }; - - GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); - - const GLshort vertices[] = { - x, y, - x + w, y, - x, y + h, - x + w, y + h, - }; - - GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); - - assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); - GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2)); - } + GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); + + assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); + GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2)); clearDirty(); } diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index 816a6755fc..3f862c2571 100644 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -21,6 +21,7 @@ */ #include <FUiCtrlMessageBox.h> +#include <FLocales.h> #include "common/config-manager.h" #include "common/file.h" @@ -42,7 +43,9 @@ using namespace Osp::Base; using namespace Osp::Base::Runtime; +using namespace Osp::Locales; using namespace Osp::Ui::Controls; +using namespace Osp::System; #define DEFAULT_CONFIG_FILE "/Home/scummvm.ini" #define RESOURCE_PATH "/Res" @@ -305,7 +308,7 @@ void BadaSystem::initBackend() { ConfMan.registerDefault("aspect_ratio", false); ConfMan.setBool("confirm_exit", false); - Osp::System::SystemTime::GetTicks(_epoch); + SystemTime::GetTicks(_epoch); if (E_SUCCESS != initModules()) { AppLog("initModules failed"); @@ -372,7 +375,7 @@ bool BadaSystem::pollEvent(Common::Event &event) { uint32 BadaSystem::getMillis() { long long result, ticks = 0; - Osp::System::SystemTime::GetTicks(ticks); + SystemTime::GetTicks(ticks); result = ticks - _epoch; return result; } @@ -392,18 +395,18 @@ void BadaSystem::updateScreen() { void BadaSystem::getTimeAndDate(TimeDate &td) const { DateTime currentTime; - if (E_SUCCESS == Osp::System::SystemTime::GetCurrentTime(currentTime)) { + if (E_SUCCESS == SystemTime::GetCurrentTime(WALL_TIME, currentTime)) { td.tm_sec = currentTime.GetSecond(); td.tm_min = currentTime.GetMinute(); td.tm_hour = currentTime.GetHour(); td.tm_mday = currentTime.GetDay(); td.tm_mon = currentTime.GetMonth(); td.tm_year = currentTime.GetYear(); -#ifdef RELEASE_BUILD - #error getTimeAndDate() is not setting the day of the week -#else - td.tm_wday = 0; // FIXME -#endif + + Calendar *calendar = Calendar::CreateInstanceN(CALENDAR_GREGORIAN); + calendar->SetTime(currentTime); + td.tm_wday = calendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK) - 1; + delete calendar; } } diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index e06dd7fa43..ba3b787942 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -316,8 +316,9 @@ public: class VMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { - return Common::wrapCompressedWriteStream(new OutVMSave(filename.c_str())); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { + OutVMSave *s = new OutVMSave(filename.c_str()); + return compress ? Common::wrapCompressedWriteStream(s) : s; } virtual Common::InSaveFile *openForLoading(const Common::String &filename) { diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index 03729c5e6e..3192e2d277 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -45,7 +45,7 @@ static Common::String getSavePath() { // GBAMP Save File Manager ////////////////////////// -Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &filename) { +Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &filename, bool compress) { Common::String fileSpec = getSavePath(); if (fileSpec.lastChar() != '/') fileSpec += '/'; diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index 492054dc52..0d9d9aca8c 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -27,7 +27,7 @@ class GBAMPSaveFileManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual Common::InSaveFile *openForLoading(const Common::String &filename); virtual bool removeSavefile(const Common::String &filename); diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp index 49a1edf411..485780b472 100644 --- a/backends/platform/gph/gph-backend.cpp +++ b/backends/platform/gph/gph-backend.cpp @@ -20,6 +20,8 @@ * */ +#if defined(GPH_DEVICE) + // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL @@ -32,8 +34,6 @@ #include "backends/saves/default/default-saves.h" #include "backends/timer/default/default-timer.h" -#include "base/main.h" - #include "common/archive.h" #include "common/config-manager.h" #include "common/debug.h" @@ -64,23 +64,6 @@ void OSystem_GPH::initBackend() { assert(!_inited); - // Create the events manager - if (_eventSource == 0) - _eventSource = new GPHEventSource(); - - // Create the graphics manager - if (_graphicsManager == 0) { - _graphicsManager = new GPHGraphicsManager(_eventSource); - } - - // Create the mixer manager - if (_mixer == 0) { - _mixerManager = new DoubleBufferSDLMixerManager(); - - // Setup and start mixer - _mixerManager->init(); - } - /* Setup default save path to be workingdir/saves */ char savePath[PATH_MAX+1]; @@ -165,16 +148,42 @@ void OSystem_GPH::initBackend() { /* Make sure that aspect ratio correction is enabled on the 1st run to stop users asking me what the 'wasted space' at the bottom is ;-). */ ConfMan.registerDefault("aspect_ratio", true); + ConfMan.registerDefault("fullscreen", true); /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); + // Create the events manager + if (_eventSource == 0) + _eventSource = new GPHEventSource(); + + // Create the graphics manager + if (_graphicsManager == 0) { + _graphicsManager = new GPHGraphicsManager(_eventSource); + } + /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); _inited = true; } +void OSystem_GPH::initSDL() { + // Check if SDL has not been initialized + if (!_initedSDL) { + + uint32 sdlFlags = SDL_INIT_EVENTTHREAD; + if (ConfMan.hasKey("disable_sdl_parachute")) + sdlFlags |= SDL_INIT_NOPARACHUTE; + + // Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers) + if (SDL_Init(sdlFlags) == -1) + error("Could not initialize SDL: %s", SDL_GetError()); + + _initedSDL = true; + } +} + void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { /* Setup default extra data paths for engine data files and plugins */ @@ -222,3 +231,5 @@ void OSystem_GPH::quit() { OSystem_POSIX::quit(); } + +#endif diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp index 2c43af151f..876de0f358 100644 --- a/backends/platform/gph/gph-main.cpp +++ b/backends/platform/gph/gph-main.cpp @@ -21,7 +21,7 @@ */ #include "backends/platform/gph/gph.h" -#include "backends/plugins/posix/posix-provider.h" +#include "backends/plugins/sdl/sdl-provider.h" #include "base/main.h" #if defined(GPH_DEVICE) @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) { ((OSystem_GPH *)g_system)->init(); #ifdef DYNAMIC_MODULES - PluginManager::instance().addPluginProvider(new POSIXPluginProvider()); + PluginManager::instance().addPluginProvider(new SDLPluginProvider()); #endif // Invoke the actual ScummVM main entry point: diff --git a/backends/platform/gph/gph.h b/backends/platform/gph/gph.h index 80f43f0bab..90a798154f 100644 --- a/backends/platform/gph/gph.h +++ b/backends/platform/gph/gph.h @@ -26,13 +26,11 @@ #if defined(GPH_DEVICE) #include "backends/base-backend.h" -#include "backends/platform/sdl/sdl.h" +#include "backends/platform/sdl/sdl-sys.h" #include "backends/platform/sdl/posix/posix.h" #include "backends/events/gph/gph-events.h" #include "backends/graphics/gph/gph-graphics.h" -#define __GP2XWIZ__ - #ifndef PATH_MAX #define PATH_MAX 255 #endif @@ -45,6 +43,11 @@ public: void addSysArchivesToSearchSet(Common::SearchSet &s, int priority); void initBackend(); void quit(); + +protected: + bool _inited; + bool _initedSDL; + virtual void initSDL(); }; #endif diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog index 8a9d8ee3c3..ea44574e96 100644 --- a/backends/platform/maemo/debian/changelog +++ b/backends/platform/maemo/debian/changelog @@ -1,8 +1,20 @@ -scummvm (1.5.0~git) unstable; urgency=low +scummvm (1.6.0~git) unstable; urgency=low * Development snapshot - -- Tarek Soliman <tsoliman@scummvm.org> Tue, 15 Nov 2011 14:56:57 -0600 + -- Tarek Soliman <tsoliman@scummvm.org> Tue, 10 Jul 2012 23:02:00 -0500 + +scummvm (1.5.0) unstable; urgency=low + + * 1.5.0 release + + -- Tarek Soliman <tsoliman@scummvm.org> Fri, 20 Jul 2012 14:48:44 -0500 + +scummvm (1.4.1) unstable; urgency=low + + * 1.4.1 release + + -- Tarek Soliman <tsoliman@scummvm.org> Wed, 11 Jan 2012 17:17:26 -0600 scummvm (1.4.0) unstable; urgency=low diff --git a/backends/platform/maemo/debian/control b/backends/platform/maemo/debian/control index 6e1dfe2fd4..bdaccd2359 100644 --- a/backends/platform/maemo/debian/control +++ b/backends/platform/maemo/debian/control @@ -2,7 +2,7 @@ Source: scummvm Section: user/games Priority: optional Maintainer: Tarek Soliman <tsoliman@scummvm.org> -Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libz-dev, quilt +Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libfreetype6-dev, libz-dev, quilt Standards-Version: 3.6.1.1 Package: scummvm diff --git a/backends/platform/maemo/debian/rules b/backends/platform/maemo/debian/rules index 64add08de8..43a34399a3 100755 --- a/backends/platform/maemo/debian/rules +++ b/backends/platform/maemo/debian/rules @@ -50,7 +50,7 @@ install: build install -m0644 dists/engine-data/drascula.dat dists/engine-data/hugo.dat dists/engine-data/kyra.dat dists/engine-data/lure.dat dists/engine-data/queen.tbl dists/engine-data/sky.cpt dists/engine-data/teenagent.dat dists/engine-data/toon.dat debian/scummvm/opt/scummvm/share install -m0644 -d debian/scummvm/usr/share/doc/scummvm - install -m0644 NEWS README COPYRIGHT debian/scummvm/usr/share/doc/scummvm + install -m0644 AUTHORS COPYING COPYING.BSD COPYING.FREEFONT COPYING.LGPL COPYRIGHT NEWS README debian/scummvm/usr/share/doc/scummvm binary: binary-arch binary-arch: build install diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index e296d4787c..6bd229177b 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -43,6 +43,7 @@ namespace Maemo { OSystem_SDL_Maemo::OSystem_SDL_Maemo() : + _eventObserver(0), OSystem_POSIX() { } @@ -84,6 +85,9 @@ static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymap #endif void OSystem_SDL_Maemo::initBackend() { + ConfMan.registerDefault("fullscreen", true); + ConfMan.registerDefault("aspect_ratio", true); + // Create the events manager if (_eventSource == 0) _eventSource = new MaemoSdlEventSource(); @@ -180,6 +184,7 @@ void OSystem_SDL_Maemo::setupIcon() { // http://bugzilla.libsdl.org/show_bug.cgi?id=586 } +#ifdef ENABLE_KEYMAPPER static const Common::KeyTableEntry maemoKeys[] = { // Function keys {"MENU", Common::KEYCODE_F11, 0, "Menu", false}, @@ -191,7 +196,6 @@ static const Common::KeyTableEntry maemoKeys[] = { {0, Common::KEYCODE_INVALID, 0, 0, false} }; -#ifdef ENABLE_KEYMAPPER Common::HardwareInputSet *OSystem_SDL_Maemo::getHardwareInputSet() { return new Common::HardwareInputSet(true, maemoKeys); } diff --git a/backends/platform/n64/framfs_save_manager.h b/backends/platform/n64/framfs_save_manager.h index da553e423a..0a88c8666b 100644 --- a/backends/platform/n64/framfs_save_manager.h +++ b/backends/platform/n64/framfs_save_manager.h @@ -100,10 +100,10 @@ public: class FRAMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutFRAMSave *s = new OutFRAMSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return 0; diff --git a/backends/platform/n64/pakfs_save_manager.h b/backends/platform/n64/pakfs_save_manager.h index e0fcbc1e2d..6e67fb0f5f 100644 --- a/backends/platform/n64/pakfs_save_manager.h +++ b/backends/platform/n64/pakfs_save_manager.h @@ -101,10 +101,10 @@ public: class PAKSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutPAKSave *s = new OutPAKSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return NULL; diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp index dcec387f97..354aa24b24 100644 --- a/backends/platform/openpandora/op-backend.cpp +++ b/backends/platform/openpandora/op-backend.cpp @@ -54,53 +54,15 @@ /* Dump console info to files. */ #define DUMP_STDOUT -static SDL_Cursor *hiddenCursor; - OSystem_OP::OSystem_OP() : OSystem_POSIX() { } -//static Uint32 timer_handler(Uint32 interval, void *param) { -// ((DefaultTimerManager *)param)->handler(); -// return interval; -//} - void OSystem_OP::initBackend() { assert(!_inited); - // Create the events manager - if (_eventSource == 0) - _eventSource = new OPEventSource(); - - // Create the graphics manager - if (_graphicsManager == 0) { - _graphicsManager = new OPGraphicsManager(_eventSource); - } - -// int joystick_num = ConfMan.getInt("joystick_num"); -// uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; -// -// if (ConfMan.hasKey("disable_sdl_parachute")) -// sdlFlags |= SDL_INIT_NOPARACHUTE; -// -// if (joystick_num > -1) -// sdlFlags |= SDL_INIT_JOYSTICK; -// -// if (SDL_Init(sdlFlags) == -1) { -// error("Could not initialize SDL: %s", SDL_GetError()); -// } -// - - // Create the mixer manager -// if (_mixer == 0) { -// _mixerManager = new DoubleBufferSDLMixerManager(); - - // Setup and start mixer -// _mixerManager->init(); -// } - /* Setup default save path to be workingdir/saves */ char savePath[PATH_MAX+1]; @@ -179,7 +141,14 @@ void OSystem_OP::initBackend() { /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); -// _graphicsMutex = createMutex(); + // Create the events manager + if (_eventSource == 0) + _eventSource = new OPEventSource(); + + // Create the graphics manager + if (_graphicsManager == 0) { + _graphicsManager = new OPGraphicsManager(_eventSource); + } /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); @@ -187,24 +156,6 @@ void OSystem_OP::initBackend() { _inited = true; } -// enable joystick -// if (joystick_num > -1 && SDL_NumJoysticks() > 0) { -// printf("Using joystick: %s\n", SDL_JoystickName(0)); -// _joystick = SDL_JoystickOpen(joystick_num); -// } -// -// setupMixer(); - -// Note: We could implement a custom SDLTimerManager by using -// SDL_AddTimer. That might yield better timer resolution, but it would -// also change the semantics of a timer: Right now, ScummVM timers -// *never* run in parallel, due to the way they are implemented. If we -// switched to SDL_AddTimer, each timer might run in a separate thread. -// However, not all our code is prepared for that, so we can't just -// switch. Still, it's a potential future change to keep in mind. -// _timer = new DefaultTimerManager(); -// _timerID = SDL_AddTimer(10, &timer_handler, _timer); - void OSystem_OP::initSDL() { // Check if SDL has not been initialized if (!_initedSDL) { @@ -217,38 +168,7 @@ void OSystem_OP::initSDL() { if (SDL_Init(sdlFlags) == -1) error("Could not initialize SDL: %s", SDL_GetError()); - uint8_t hiddenCursorData = 0; - - hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); - - /* On the OpenPandora we need to work around an SDL assumption that - returns relative mouse coordinates when you get to the screen - edges using the touchscreen. The workaround is to set a blank - SDL cursor and not disable it (Hackish I know). - - The root issues likes in the Windows Manager GRAB code in SDL. - That is why the issue is not seen on framebuffer devices like the - GP2X (there is no X window manager ;)). - */ - SDL_ShowCursor(SDL_ENABLE); - SDL_SetCursor(hiddenCursor); - SDL_EnableUNICODE(1); - -// memset(&_oldVideoMode, 0, sizeof(_oldVideoMode)); -// memset(&_videoMode, 0, sizeof(_videoMode)); -// memset(&_transactionDetails, 0, sizeof(_transactionDetails)); - -// _videoMode.mode = GFX_DOUBLESIZE; -// _videoMode.scaleFactor = 2; -// _videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio"); -// _scalerProc = Normal2x; -// _scalerType = 0; - -// _videoMode.fullscreen = true; - _initedSDL = true; - -// OSystem_POSIX::initSDL(); } } @@ -275,8 +195,6 @@ void OSystem_OP::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { void OSystem_OP::quit() { - SDL_FreeCursor(hiddenCursor); - #ifdef DUMP_STDOUT printf("%s\n", "Debug: STDOUT and STDERR text files closed."); fclose(stdout); diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h index 8cccbb5f86..1eddad5c4a 100644 --- a/backends/platform/openpandora/op-sdl.h +++ b/backends/platform/openpandora/op-sdl.h @@ -31,8 +31,6 @@ #include "backends/events/openpandora/op-events.h" #include "backends/graphics/openpandora/op-graphics.h" -//#define MIXER_DOUBLE_BUFFERING 1 - #ifndef PATH_MAX #define PATH_MAX 255 #endif diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp index 421edc3e2e..46af42e193 100644 --- a/backends/platform/ps2/savefilemgr.cpp +++ b/backends/platform/ps2/savefilemgr.cpp @@ -145,7 +145,7 @@ Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &fil return Common::wrapCompressedReadStream(sf); } -Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename) { +Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename, bool compress) { Common::FSNode savePath(ConfMan.get("savepath")); // TODO: is this fast? Common::WriteStream *sf; @@ -193,7 +193,7 @@ Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &fil } _screen->wantAnim(false); - return Common::wrapCompressedWriteStream(sf); + return compress ? Common::wrapCompressedWriteStream(sf) : sf; } bool Ps2SaveFileManager::removeSavefile(const Common::String &filename) { diff --git a/backends/platform/ps2/savefilemgr.h b/backends/platform/ps2/savefilemgr.h index a25fb063ae..163706eace 100644 --- a/backends/platform/ps2/savefilemgr.h +++ b/backends/platform/ps2/savefilemgr.h @@ -35,7 +35,7 @@ public: virtual ~Ps2SaveFileManager(); virtual Common::InSaveFile *openForLoading(const Common::String &filename); - virtual Common::OutSaveFile *openForSaving(const Common::String &filename); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual Common::StringArray listSavefiles(const Common::String &pattern); virtual bool removeSavefile(const Common::String &filename); diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP index bc0bd35a6e..969459dc5b 100644 --- a/backends/platform/psp/README.PSP +++ b/backends/platform/psp/README.PSP @@ -1,4 +1,4 @@ -ScummVM-PSP 1.5.0git README +ScummVM-PSP 1.6.0git README ============================================================================== Installation diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp index 4ec153a7e9..fc18628235 100644 --- a/backends/platform/webos/webos.cpp +++ b/backends/platform/webos/webos.cpp @@ -45,24 +45,4 @@ void OSystem_SDL_WebOS::initBackend() { OSystem_SDL::initBackend(); } -/** - * Gets the original SDL hardware key set, adds WebOS specific keys and - * returns the new key set. - * - * @return The hardware key set with added webOS specific keys. - */ -#ifdef ENABLE_KEYMAPPER -HardwareInputSet *OSystem_SDL_WebOS::getHardwareInputSet() { - // Get the original SDL hardware key set - HardwareInputSet *inputSet = OSystem_SDL::getHardwareInputSet(); - - // Add WebOS specific keys - inputSet->addHardwareInput(new HardwareInput("FORWARD", - KeyState((KeyCode) 229, 229, 0), "Forward")); - - // Return the modified hardware key set - return inputSet; -} -#endif - #endif diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h index 8dfa43239c..dda56a70da 100644 --- a/backends/platform/webos/webos.h +++ b/backends/platform/webos/webos.h @@ -31,9 +31,6 @@ public: OSystem_SDL_WebOS(); virtual void initBackend(); -#ifdef ENABLE_KEYMAPPER - virtual Common::HardwareInputSet *getHardwareInputSet(); -#endif }; #endif diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 681675529a..22a6495f8f 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -39,7 +39,7 @@ OSystem_Wii::OSystem_Wii() : _startup_time(0), - _cursorScale(1), + _cursorDontScale(true), _cursorPaletteDisabled(true), _cursorPalette(NULL), _cursorPaletteDirty(false), diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index abafa7f642..5d6998d0b6 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -56,7 +56,7 @@ class OSystem_Wii : public EventsBaseBackend, public PaletteManager { private: s64 _startup_time; - int _cursorScale; + bool _cursorDontScale; bool _cursorPaletteDisabled; u16 *_cursorPalette; bool _cursorPaletteDirty; diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 90e4d98c6b..fc0802dd4c 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -451,7 +451,7 @@ bool OSystem_Wii::needsScreenUpdate() { void OSystem_Wii::updateScreen() { static f32 ar; static gfx_screen_coords_t cc; - static int cs; + static f32 csx, csy; u32 now = getMillis(); if (now - _lastScreenUpdate < 1000 / MAX_FPS) @@ -466,7 +466,6 @@ void OSystem_Wii::updateScreen() { wii_memstats(); #endif - cs = _cursorScale; _lastScreenUpdate = now; if (_overlayVisible || _consoleVisible) @@ -488,12 +487,6 @@ void OSystem_Wii::updateScreen() { if (_gameRunning) ar = gfx_set_ar(4.0 / 3.0); - // ugly, but the modern theme sets a factor of 3, only god knows why - if (cs > 2) - cs = 1; - else - cs *= 2; - if (_overlayDirty) { gfx_tex_convert(&_texOverlay, _overlayPixels); _overlayDirty = false; @@ -503,10 +496,18 @@ void OSystem_Wii::updateScreen() { } if (_mouseVisible) { - cc.x = f32(_mouseX - cs * _mouseHotspotX) * _currentXScale; - cc.y = f32(_mouseY - cs * _mouseHotspotY) * _currentYScale; - cc.w = f32(_texMouse.width) * _currentXScale * cs; - cc.h = f32(_texMouse.height) * _currentYScale * cs; + if (_cursorDontScale) { + csx = 1.0f / _currentXScale; + csy = 1.0f / _currentYScale; + } else { + csx = 1.0f; + csy = 1.0f; + } + + cc.x = f32(_mouseX - csx * _mouseHotspotX) * _currentXScale; + cc.y = f32(_mouseY - csy * _mouseHotspotY) * _currentYScale; + cc.w = f32(_texMouse.width) * _currentXScale * csx; + cc.h = f32(_texMouse.height) * _currentYScale * csy; if (_texMouse.palette && _cursorPaletteDirty) { _texMouse.palette[_mouseKeyColor] = 0; @@ -745,8 +746,7 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, _mouseHotspotX = hotspotX; _mouseHotspotY = hotspotY; - // TODO: Adapt to new dontScale logic! - _cursorScale = 1; + _cursorDontScale = dontScale; if ((_texMouse.palette) && (oldKeycolor != _mouseKeyColor)) _cursorPaletteDirty = true; |