aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2018-06-07 20:14:27 +0200
committerBastien Bouclet2018-06-07 20:24:39 +0200
commitb1da6a74c5dc22b42606649059bb35722010cc31 (patch)
treefc9c0c67a9c8ab57ac9860458cce26db7befd5b6 /engines
parent3b794d263378476ca5698fa8ce57ed0887343e2c (diff)
downloadscummvm-rg350-b1da6a74c5dc22b42606649059bb35722010cc31.tar.gz
scummvm-rg350-b1da6a74c5dc22b42606649059bb35722010cc31.tar.bz2
scummvm-rg350-b1da6a74c5dc22b42606649059bb35722010cc31.zip
DIRECTOR: Show a GUI error message when no sound devices are available
Diffstat (limited to 'engines')
-rw-r--r--engines/director/director.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index ec35022b4a..f2ad5db3cc 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -50,9 +50,6 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
g_director = this;
- if (!_mixer->isReady())
- error("Sound initialization failed");
-
// Setup mixer
syncSoundSettings();
@@ -116,6 +113,10 @@ DirectorEngine::~DirectorEngine() {
Common::Error DirectorEngine::run() {
debug("Starting v%d Director game", getVersion());
+ if (!_mixer->isReady()) {
+ return Common::kAudioDeviceInitFailed;
+ }
+
_currentPalette = nullptr;
_macBinary = nullptr;