mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 19:16:44 +01:00
fix segfaults with FLAC decoder in intro
This commit is contained in:
parent
6583662d9f
commit
1c825fbd14
1 changed files with 5 additions and 1 deletions
|
@ -176,6 +176,7 @@ int Intro_Keydown(struct Game *game, ALLEGRO_EVENT *ev) {
|
||||||
}
|
}
|
||||||
if (!game->intro.in_animation) {
|
if (!game->intro.in_animation) {
|
||||||
if (game->intro.audiostream) {
|
if (game->intro.audiostream) {
|
||||||
|
al_set_audio_stream_playing(game->intro.audiostream, false);
|
||||||
al_destroy_audio_stream(game->intro.audiostream);
|
al_destroy_audio_stream(game->intro.audiostream);
|
||||||
game->intro.audiostream=NULL;
|
game->intro.audiostream=NULL;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +224,10 @@ void Intro_Preload(struct Game *game) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Intro_Unload(struct Game *game) {
|
void Intro_Unload(struct Game *game) {
|
||||||
if (game->intro.audiostream) al_destroy_audio_stream(game->intro.audiostream);
|
if (game->intro.audiostream) {
|
||||||
|
al_set_audio_stream_playing(game->intro.audiostream, false);
|
||||||
|
al_destroy_audio_stream(game->intro.audiostream);
|
||||||
|
}
|
||||||
ALLEGRO_EVENT ev;
|
ALLEGRO_EVENT ev;
|
||||||
int fadeloop;
|
int fadeloop;
|
||||||
for(fadeloop=255; fadeloop>=0; fadeloop-=tps(game, 600)){
|
for(fadeloop=255; fadeloop>=0; fadeloop-=tps(game, 600)){
|
||||||
|
|
Loading…
Reference in a new issue