Skip to content

Commit baa5cab

Browse files
committed
Added support for OGG missing. Disable sound
1 parent 2c169bf commit baa5cab

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

bin/frozen-bubble

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ sub init_sound() {
329329
print STDERR "\nWarning: 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

0 commit comments

Comments
 (0)