aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuediger Hanke2003-07-22 22:37:37 +0000
committerRuediger Hanke2003-07-22 22:37:37 +0000
commit77d50433be9ca21dde3d62ecbe7c6e0bebc341ac (patch)
tree9ba86f0937ec7c43c28f2b9340c8108eec5c6a8e
parentb43125cd36c0c78c2ea352c683be77b96998feaf (diff)
downloadscummvm-rg350-77d50433be9ca21dde3d62ecbe7c6e0bebc341ac.tar.gz
scummvm-rg350-77d50433be9ca21dde3d62ecbe7c6e0bebc341ac.tar.bz2
scummvm-rg350-77d50433be9ca21dde3d62ecbe7c6e0bebc341ac.zip
Some MorphOS port fixes
svn-id: r9138
-rw-r--r--backends/morphos/morphos.cpp13
-rw-r--r--backends/morphos/morphos_start.cpp3
2 files changed, 9 insertions, 7 deletions
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp
index 04def0ebe0..b8d6b0d963 100644
--- a/backends/morphos/morphos.cpp
+++ b/backends/morphos/morphos.cpp
@@ -213,8 +213,11 @@ OSystem_MorphOS::~OSystem_MorphOS()
if (ScummMusicThread)
{
- Signal((Task *) ScummMusicThread, SIGBREAKF_CTRL_C);
- ObtainSemaphore(&ScummMusicThreadRunning); /* Wait for thread to finish */
+ if (!AttemptSemaphore(&ScummMusicThreadRunning))
+ {
+ Signal((Task *) ScummMusicThread, SIGBREAKF_CTRL_C);
+ ObtainSemaphore(&ScummMusicThreadRunning); /* Wait for thread to finish */
+ }
ReleaseSemaphore(&ScummMusicThreadRunning);
}
@@ -1096,8 +1099,9 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) {
} else if (dy < 0) {
// move up
// copy from top to bottom
+ dy = -dy;
for (int y = dy; y < height; y++)
- copy_rect((byte *)ScummBuffer + ScummBufferWidth * (y - dy), ScummBufferWidth, 0, y, ScummBufferWidth, 1);
+ copy_rect((byte *)ScummBuffer + ScummBufferWidth * y, ScummBufferWidth, 0, y - dy, ScummBufferWidth, 1);
}
// horizontal movement
@@ -1109,8 +1113,9 @@ void OSystem_MorphOS::move_screen(int dx, int dy, int height) {
} else if (dx < 0) {
// move left
// copy from left to right
+ dx = -dx;
for (int x = dx; x < ScummBufferWidth; x++)
- copy_rect((byte *)ScummBuffer + x - dx, ScummBufferWidth, x, 0, 1, height);
+ copy_rect((byte *)ScummBuffer + x, ScummBufferWidth, x, 0, 1, height);
}
}
diff --git a/backends/morphos/morphos_start.cpp b/backends/morphos/morphos_start.cpp
index 9ee85f9cc8..ce8ace3631 100644
--- a/backends/morphos/morphos_start.cpp
+++ b/backends/morphos/morphos_start.cpp
@@ -97,9 +97,6 @@ OSystem *OSystem_MorphOS_create(int game_id, int gfx_mode, bool full_screen)
void close_resources()
{
- if (EtudeMidiDriver)
- EtudeMidiDriver->close();
-
if (TheSystem)
delete TheSystem;