1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-01 08:00:37 +00:00

Exits if without dev or ctx.

This commit is contained in:
Fellippe Heitor 2021-09-25 23:15:12 -03:00 committed by GitHub
parent 4e91e559dd
commit 4995175a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,8 +267,8 @@ int32 snd_init_done=0;
void snd_init(){
if (!snd_init_done){
dev = alcOpenDevice(NULL);
ctx = alcCreateContext(dev, NULL);
dev = alcOpenDevice(NULL); if (!dev) goto done;
ctx = alcCreateContext(dev, NULL); if (!ctx) goto done;
alcMakeContextCurrent(ctx);
alListener3f(AL_POSITION, 0, 0, 0);
@ -279,6 +279,7 @@ void snd_init(){
}
done:;
snd_init_done=1;
}