diff options
author | Yotam Barnoy | 2010-10-14 22:11:17 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-10-14 22:11:17 +0000 |
commit | a4537b84bd19ede43c4882012be4d52f6347c189 (patch) | |
tree | cd3cf2a3d0414b4d5a472496c6b69fcb6869bf72 /backends | |
parent | f67bbc4eccd483e329845c05c8aa2dc5ab6f8215 (diff) | |
download | scummvm-rg350-a4537b84bd19ede43c4882012be4d52f6347c189.tar.gz scummvm-rg350-a4537b84bd19ede43c4882012be4d52f6347c189.tar.bz2 scummvm-rg350-a4537b84bd19ede43c4882012be4d52f6347c189.zip |
PSP: made image viewer reset to the first image between engine loads
svn-id: r53460
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/psp/image_viewer.cpp | 4 | ||||
-rw-r--r-- | backends/platform/psp/image_viewer.h | 1 | ||||
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 6 | ||||
-rw-r--r-- | backends/platform/psp/osys_psp.h | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp index 66a5412034..e3fb786774 100644 --- a/backends/platform/psp/image_viewer.cpp +++ b/backends/platform/psp/image_viewer.cpp @@ -118,6 +118,10 @@ void ImageViewer::unload() { _init = false; } +void ImageViewer::resetOnEngineDone() { + _imageNum = 0; +} + void ImageViewer::setVisible(bool visible) { DEBUG_ENTER_FUNC(); if (_visible == visible) diff --git a/backends/platform/psp/image_viewer.h b/backends/platform/psp/image_viewer.h index 3e2630a97e..2242ab198a 100644 --- a/backends/platform/psp/image_viewer.h +++ b/backends/platform/psp/image_viewer.h @@ -82,6 +82,7 @@ public: bool isDirty() { return _dirty; } void setDirty() { _dirty = true; } void setClean() { _dirty = false; } + void resetOnEngineDone(); void handleEvent(uint32 event); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 4b6983785c..8b490217a4 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -102,6 +102,12 @@ void OSystem_PSP::initBackend() { OSystem::initBackend(); } +// Let's us know an engine +void OSystem_PSP::engineDone() { + // for now, all we need is to reset the image number on the viewer + _imageViewer.resetOnEngineDone(); +} + bool OSystem_PSP::hasFeature(Feature f) { return (f == kFeatureOverlaySupportsAlpha || f == kFeatureCursorHasPalette); } diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index d59951c94c..52b8f4e887 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -149,6 +149,7 @@ public: Common::SaveFileManager *getSavefileManager() { return _savefile; } FilesystemFactory *getFilesystemFactory() { return &PSPFilesystemFactory::instance(); } void getTimeAndDate(TimeDate &t) const; + virtual void engineDone(); void quit(); |