Merge sheepluva's changes
authorWuzzy <almikes@aol.com>
Sat, 30 Sep 2017 14:15:59 +0200
changeset 12619 806b6088863a
parent 12618 34685d3326a7 (current diff)
parent 12617 2ffdee246adc (diff)
child 12620 fbd0001ba2e7
Merge sheepluva's changes
--- a/hedgewars/SDLh.pas	Sat Sep 30 14:15:18 2017 +0200
+++ b/hedgewars/SDLh.pas	Sat Sep 30 14:15:59 2017 +0200
@@ -100,7 +100,8 @@
     AUDIO_S16SYS         = {$IFDEF ENDIAN_LITTLE}AUDIO_S16LSB{$ELSE}AUDIO_S16MSB{$ENDIF};
 
     // default audio format from SDL_mixer.h
-    MIX_DEFAULT_FORMAT   = AUDIO_S16SYS;
+    //MIX_DEFAULT_FORMAT   = AUDIO_S16SYS;
+    MIX_DEFAULT_FORMAT   = {$IFDEF ENDIAN_LITTLE}AUDIO_S16LSB{$ELSE}AUDIO_S16MSB{$ENDIF};
 
     SDL_BUTTON_LEFT      = 1;
     SDL_BUTTON_MIDDLE    = 2;
--- a/hedgewars/uSound.pas	Sat Sep 30 14:15:18 2017 +0200
+++ b/hedgewars/uSound.pas	Sat Sep 30 14:15:59 2017 +0200
@@ -324,10 +324,14 @@
     if not (isSoundEnabled or isMusicEnabled) then
         exit;
     WriteToConsole('Init sound...');
-    success:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0;
+    success:= SDL_InitSubSystem(SDL_INIT_AUDIO) = 0;
 
     if success then
+        begin
+        WriteLnToConsole(msgOK);
+        WriteToConsole('Open audio...');
         success:= Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, channels, 1024) = 0;
+        end;
 
     if success then
         WriteLnToConsole(msgOK)