diff options
author | Matthew Hoops | 2011-08-09 16:26:25 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-09 16:26:25 -0400 |
commit | acb0a36b6e9f2d2c07a8f96801a9041b15bbf9d7 (patch) | |
tree | cd2902a84c83989c8a6f80d989626a0bc24e6c12 | |
parent | b087acd793e8780fe13d72c202330098652f10a3 (diff) | |
parent | 00d25a77a9d8297fdc356c7a10f9dc2d94903a5f (diff) | |
download | scummvm-rg350-acb0a36b6e9f2d2c07a8f96801a9041b15bbf9d7.tar.gz scummvm-rg350-acb0a36b6e9f2d2c07a8f96801a9041b15bbf9d7.tar.bz2 scummvm-rg350-acb0a36b6e9f2d2c07a8f96801a9041b15bbf9d7.zip |
Merge remote branch 'upstream/master' into soccer
-rw-r--r-- | backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 17 | ||||
-rw-r--r-- | backends/graphics/gph/gph-graphics.cpp | 3 | ||||
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp | 3 | ||||
-rw-r--r-- | backends/graphics/wincesdl/wincesdl-graphics.cpp | 2 | ||||
-rw-r--r-- | backends/graphics/wincesdl/wincesdl-graphics.h | 2 | ||||
-rw-r--r-- | common/EventRecorder.cpp | 26 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 |
7 files changed, 38 insertions, 17 deletions
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 2fd22c4e80..17a95688f3 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -122,7 +122,7 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h) { if (w > 320 || h > 240) { setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _transactionDetails.sizeChanged = true; @@ -427,6 +427,7 @@ void DINGUXSdlGraphicsManager::hideOverlay() { } bool DINGUXSdlGraphicsManager::loadGFXMode() { + debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight); // Forcefully disable aspect ratio correction for games // which starts with a native 240px height resolution. @@ -435,7 +436,6 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() { _videoMode.aspectRatioCorrection = false; } - debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight); if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) { _videoMode.aspectRatioCorrection = false; setGraphicsMode(GFX_HALF); @@ -473,9 +473,13 @@ bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) { void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { switch (f) { - case OSystem::kFeatureAspectRatioCorrection: + case OSystem::kFeatureAspectRatioCorrection: setAspectRatioCorrection(enable); break; + case OSystem::kFeatureCursorPalette: + _cursorPaletteDisabled = !enable; + blitCursor(); + break; default: break; } @@ -485,8 +489,10 @@ bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) { assert(_transactionMode == kTransactionNone); switch (f) { - case OSystem::kFeatureAspectRatioCorrection: - return _videoMode.aspectRatioCorrection; + case OSystem::kFeatureAspectRatioCorrection: + return _videoMode.aspectRatioCorrection; + case OSystem::kFeatureCursorPalette: + return !_cursorPaletteDisabled; default: return false; } @@ -516,7 +522,6 @@ void DINGUXSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) { point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 2e8bfa668e..96b0619a6a 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -141,7 +141,7 @@ void GPHGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *f if (w > 320 || h > 240){ setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _videoMode.overlayWidth = 320; @@ -585,7 +585,6 @@ void GPHGraphicsManager::transformMouseCoordinates(Common::Point &point) { point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp index e59d3f975b..de9838a0d7 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp @@ -134,7 +134,7 @@ void LinuxmotoSdlGraphicsManager::initSize(uint w, uint h) { if (w > 320 || h > 240) { setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _transactionDetails.sizeChanged = true; @@ -484,7 +484,6 @@ void LinuxmotoSdlGraphicsManager::transformMouseCoordinates(Common::Point &point point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index b0cbb872b0..58b735ef8b 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -934,7 +934,7 @@ bool WINCESdlGraphicsManager::loadGFXMode() { _toolbarHigh = NULL; // keyboard cursor control, some other better place for it? - _sdlEventSource->resetKeyboadEmulation(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd - 1, _videoMode.screenHeight * _scaleFactorXm / _scaleFactorXd - 1); + _eventSource->resetKeyboadEmulation(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd - 1, _videoMode.screenHeight * _scaleFactorXm / _scaleFactorXd - 1); return true; } diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index edf3cc5769..2e8c3313b3 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -160,8 +160,6 @@ public: virtual void transformMouseCoordinates(Common::Point &point); - virtual void transformMouseCoordinates(Common::Point &point); - private: bool update_scalers(); void drawToolbarMouse(SDL_Surface *surf, bool draw); diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp index cf3c8b391f..3be3161203 100644 --- a/common/EventRecorder.cpp +++ b/common/EventRecorder.cpp @@ -133,6 +133,9 @@ EventRecorder::EventRecorder() { EventRecorder::~EventRecorder() { deinit(); + + g_system->deleteMutex(_timeMutex); + g_system->deleteMutex(_recorderMutex); } void EventRecorder::init() { @@ -282,9 +285,6 @@ void EventRecorder::deinit() { //TODO: remove recordTempFileName'ed file } - - g_system->deleteMutex(_timeMutex); - g_system->deleteMutex(_recorderMutex); } void EventRecorder::registerRandomSource(RandomSource &rnd, const String &name) { @@ -324,6 +324,13 @@ void EventRecorder::processMillis(uint32 &millis) { if (_recordTimeCount > _playbackTimeCount) { d = readTime(_playbackTimeFile); + while ((_lastMillis + d > millis) && (_lastMillis + d - millis > 50)) { + _recordMode = kPassthrough; + g_system->delayMillis(50); + millis = g_system->getMillis(); + _recordMode = kRecorderPlayback; + } + millis = _lastMillis + d; _playbackTimeCount++; } @@ -334,6 +341,19 @@ void EventRecorder::processMillis(uint32 &millis) { } bool EventRecorder::processDelayMillis(uint &msecs) { + if (_recordMode == kRecorderPlayback) { + _recordMode = kPassthrough; + + uint32 millis = g_system->getMillis(); + + _recordMode = kRecorderPlayback; + + if (_lastMillis > millis) { + // Skip delay if we're getting late + return true; + } + } + return false; } diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 0510f77740..b9f454de0f 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1827,7 +1827,7 @@ void ScummEngine_v72he::o72_readINI() { switch (subOp) { case 43: // HE 100 case 6: // number - if (!strcmp((char *)option, "NoPrinting")) { + if (!strcmp((char *)option, "DisablePrinting") || !strcmp((char *)option, "NoPrinting")) { push(1); } else if (!strcmp((char *)option, "TextOn")) { push(ConfMan.getBool("subtitles")); |