Speed up stopping CD play
This commit is contained in:
parent
5f5c93bde5
commit
245b8b7d5c
2 changed files with 9 additions and 11 deletions
src
|
@ -1225,18 +1225,16 @@ global void QuitSound(void)
|
|||
global void QuitCD(void)
|
||||
{
|
||||
#ifdef USE_SDLCD
|
||||
if (strcmp(CDMode,":off")) {
|
||||
if (strcmp(CDMode,":off"))
|
||||
SDL_CDStop(CDRom);
|
||||
SDL_CDClose(CDRom);
|
||||
}
|
||||
SDL_CDClose(CDRom);
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBCDA
|
||||
if (strcmp(CDMode,":off")) {
|
||||
if (strcmp(CDMode,":off"))
|
||||
cd_stop();
|
||||
cd_close();
|
||||
cd_exit();
|
||||
}
|
||||
cd_close();
|
||||
cd_exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1499,20 +1499,20 @@ local void GameOptions(void)
|
|||
local void SetCdMode(Menuitem *mi)
|
||||
{
|
||||
#if defined(USE_SDLCD) || defined(USE_LIBCDA)
|
||||
|
||||
/// Start Playing CD
|
||||
if (!strcmp(":off", CDMode)) {
|
||||
// CDMode = ":random";
|
||||
PlayMusic(":random");
|
||||
} else {
|
||||
/// Stop Playing CD
|
||||
#ifdef USE_SDLCD
|
||||
SDL_CDStop(CDRom);
|
||||
SDL_CDClose(CDRom);
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBCDA
|
||||
cd_stop();
|
||||
cd_close();
|
||||
cd_exit();
|
||||
#endif
|
||||
|
||||
CDMode = ":off";
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue