aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorJames Brown2002-10-20 13:17:43 +0000
committerJames Brown2002-10-20 13:17:43 +0000
commit628eea3de4a7f87cd2d14faeb579b306c39e892a (patch)
tree6958ddbf8efe792dcaf9a917870cba39741f27c3 /backends/sdl
parentc7ef00571b789d6ea332ae4a8a2f59f55fd64d11 (diff)
downloadscummvm-rg350-628eea3de4a7f87cd2d14faeb579b306c39e892a.tar.gz
scummvm-rg350-628eea3de4a7f87cd2d14faeb579b306c39e892a.tar.bz2
scummvm-rg350-628eea3de4a7f87cd2d14faeb579b306c39e892a.zip
Patch 625904: CD Looping
svn-id: r5199
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/sdl-common.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 17d2dc8885..f2e91b5a05 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -825,8 +825,11 @@ void OSystem_SDL_Common::play_cdrom(int track, int num_loops, int start_frame, i
cd_num_loops = num_loops;
cd_start_frame = start_frame;
- SDL_CDStatus(_cdrom);
- SDL_CDPlayTracks(_cdrom, track, start_frame, 0, end_frame);
+ SDL_CDStatus(_cdrom);
+ if (start_frame == 0 && end_frame == 0)
+ SDL_CDPlayTracks(_cdrom, track, 0, 1, 0);
+ else
+ SDL_CDPlayTracks(_cdrom, track, start_frame, 0, end_frame);
cd_end_frame = end_frame;
cd_stop_time = 0;
cd_end_time = SDL_GetTicks() + _cdrom->track[track].length * 1000 / CD_FPS;
@@ -863,7 +866,10 @@ void OSystem_SDL_Common::update_cdrom() {
cd_num_loops--;
if (cd_num_loops != 0) {
- SDL_CDPlayTracks(_cdrom, cd_track, cd_start_frame, 0, cd_end_frame);
+ if (cd_start_frame == 0 && cd_end_frame == 0)
+ SDL_CDPlayTracks(_cdrom, cd_track, 0, 1, 0);
+ else
+ SDL_CDPlayTracks(_cdrom, cd_track, cd_start_frame, 0, cd_end_frame);
cd_end_time = SDL_GetTicks() + _cdrom->track[cd_track].length * 1000 / CD_FPS;
}
}