hedgewars/uSound.pas
changeset 14836 64f88108926b
parent 14825 183677a07c8d
child 14883 4e3d81af71bf
--- a/hedgewars/uSound.pas	Wed Apr 24 16:21:46 2019 +0300
+++ b/hedgewars/uSound.pas	Wed Apr 24 21:14:44 2019 +0300
@@ -409,7 +409,14 @@
     end;
 
     WriteToConsole('Init SDL_mixer... ');
-    if SDLCheck(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true) then exit;
+
+    if (Mix_Init(MIX_INIT_OGG or MIX_INIT_OPUS) and MIX_INIT_OPUS) = 0 then
+    begin
+      WriteToConsole('Cannot init OPUS: ' + SDL_GetError());
+
+      if SDLCheck(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true) then exit;
+    end;
+
     WriteLnToConsole(msgOK);
 
     // from uVariables to be used by other modules