File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,7 +329,6 @@ sub init_sound() {
329329 print STDERR " \n Warning: can't initialize sound (reason: $@ ).\n " ;
330330 return 0;
331331 }
332-
333332 $mixer = 1;
334333 print " [Sound Init] " ;
335334 my @sounds = qw( stick destroy_group newroot newroot_solo lose hurry pause menu_change menu_selected rebound launch malus noh snore cancel typewriter applause chatted) ;
@@ -2915,7 +2914,21 @@ sub init_game() {
29152914 $mixer_enabled = 0;
29162915 $mixer = undef ;
29172916 } elsif (!defined ($mixer_enabled ) || $mixer_enabled ) {
2917+
2918+ my $init_flags = SDL::Mixer::init( MIX_INIT_OGG );
2919+
2920+ unless ($init_flags & MIX_INIT_OGG)
2921+ {
2922+ warn " OGG support needed to be compiled in SDL::Mixer SDL module. Disabling Sound." ;
2923+ $mixer_enabled = 0;
2924+ $mixer = undef ;
2925+
2926+ }
2927+ else
2928+ {
29182929 $mixer_enabled = init_sound();
2930+ }
2931+
29192932 }
29202933
29212934 # - the RGBA effects algorithms assume little endian RGBA surfaces
You can’t perform that action at this time.
0 commit comments