aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorMax Horn2003-04-30 19:11:33 +0000
committerMax Horn2003-04-30 19:11:33 +0000
commitfeab6f904f81e5f6a1fbaf8b1b3b8686242ed00b (patch)
treedb386448d255e93d18ce5751bb94b65c6ed44726 /scumm/smush
parent70936947815df45899879fa0467c6489cc0d72c9 (diff)
downloadscummvm-rg350-feab6f904f81e5f6a1fbaf8b1b3b8686242ed00b.tar.gz
scummvm-rg350-feab6f904f81e5f6a1fbaf8b1b3b8686242ed00b.tar.bz2
scummvm-rg350-feab6f904f81e5f6a1fbaf8b1b3b8686242ed00b.zip
moved screen mutex from smush into SDL backend (other backends have to make sure they are thread safe by themselves)
svn-id: r7230
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/smush_player.cpp10
-rw-r--r--scumm/smush/smush_player.h2
2 files changed, 0 insertions, 12 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 3ab385a2f1..83f33ed93f 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -222,14 +222,10 @@ SmushPlayer::SmushPlayer(Scumm *scumm, int speed, bool subtitles) {
_speed = speed;
_subtitles = subtitles;
_smushProcessFrame = false;
-
- _mutex = _scumm->_system->create_mutex();
}
SmushPlayer::~SmushPlayer() {
deinit();
- if (_mutex)
- _scumm->_system->delete_mutex (_mutex);
}
void SmushPlayer::init() {
@@ -862,15 +858,11 @@ void SmushPlayer::setPalette(byte *palette) {
}
void SmushPlayer::updateScreen() {
- _scumm->_system->lock_mutex(_mutex);
-
uint32 end_time, start_time = _scumm->_system->get_msecs();
_scumm->_system->copy_rect(_data, _width, 0, 0, _width, _height);
_updateNeeded = true;
end_time = _scumm->_system->get_msecs();
debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time);
-
- _scumm->_system->unlock_mutex(_mutex);
}
void SmushPlayer::play(const char *filename, const char *directory) {
@@ -887,7 +879,6 @@ void SmushPlayer::play(const char *filename, const char *directory) {
init();
while (true) {
- _scumm->_system->lock_mutex(_mutex);
_scumm->parseEvents();
_scumm->processKbd();
if(_updateNeeded == true) {
@@ -899,7 +890,6 @@ void SmushPlayer::play(const char *filename, const char *directory) {
debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time);
}
- _scumm->_system->unlock_mutex(_mutex);
if (_scumm->_videoFinished == true)
break;
if (_scumm->_saveLoadFlag)
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index 24952b1079..9b29616ac4 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -62,8 +62,6 @@ private:
bool _alreadyInit;
int _speed;
bool _outputSound;
-
- void *_mutex;
public: