]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Added missing checks that prevented cd_audio_mode_changed=true detection in some...
authorToni Wilen <twilen@winuae.net>
Fri, 6 Jul 2018 07:39:49 +0000 (10:39 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 6 Jul 2018 07:39:49 +0000 (10:39 +0300)
od-win32/blkdev_win32_ioctl.cpp

index c14ded99f9772036a4e10572f2a61867e0c5becd..d6319b0dbca02b7fa4cba500dd0950d850574bca 100644 (file)
@@ -529,8 +529,13 @@ static bool cdda_play2 (struct dev_info_ioctl *ciw, int *outpos)
        while (ciw->cdda_play > 0) {
 
                if (mode) {
-                       while (cda_bufon[bufnum] && ciw->cdda_play > 0)
+                       while (cda_bufon[bufnum] && ciw->cdda_play > 0) {
+                               if (cd_audio_mode_changed) {
+                                       restart = true;
+                                       goto end;
+                               }
                                sleep_millis(10);
+                       }
                } else {
                        cda->wait(bufnum);
                }
@@ -702,8 +707,10 @@ static bool cdda_play2 (struct dev_info_ioctl *ciw, int *outpos)
                        }
                }
 
-               while (ciw->cdda_paused && ciw->cdda_play == oldplay)
-                       sleep_millis(10);
+               if (cda_bufon[0] == 0 && cda_bufon[1] == 0) {
+                       while (ciw->cdda_paused && ciw->cdda_play == oldplay)
+                               sleep_millis(10);
+               }
 
                if (cd_audio_mode_changed) {
                        restart = true;