Mercurial > hg > dmlib
comparison tools/ppl.c @ 2102:e0281dae2cb8
Backed out changeset dcca36701cdd
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 07 Mar 2019 14:12:21 +0200 |
parents | dcca36701cdd |
children | e3f0eaf23f4f |
comparison
equal
deleted
inserted
replaced
2101:da886b8cbb09 | 2102:e0281dae2cb8 |
---|---|
525 } | 525 } |
526 | 526 |
527 | 527 |
528 void dmMuteChannels(BOOL mute) | 528 void dmMuteChannels(BOOL mute) |
529 { | 529 { |
530 for (int i = 0; i < eng.mod->nchannels; i++) | 530 int i; |
531 for (i = 0; i < eng.mod->nchannels; i++) | |
531 jvmMute(eng.dev, i, mute); | 532 jvmMute(eng.dev, i, mute); |
532 } | 533 } |
533 | 534 |
534 | 535 |
535 int main(int argc, char *argv[]) | 536 int main(int argc, char *argv[]) |
918 | 919 |
919 SDL_Delay(eng.pauseFlag ? 100 : 30); | 920 SDL_Delay(eng.pauseFlag ? 100 : 30); |
920 } | 921 } |
921 | 922 |
922 error_exit: | 923 error_exit: |
923 SDL_DestroyTexture(eng.texture); | 924 if (eng.texture != NULL) |
924 SDL_DestroyRenderer(eng.renderer); | 925 SDL_DestroyTexture(eng.texture); |
925 SDL_DestroyWindow(eng.window); | 926 |
926 SDL_FreeSurface(eng.screen); | 927 if (eng.renderer != NULL) |
928 SDL_DestroyRenderer(eng.renderer); | |
929 | |
930 if (eng.window != NULL) | |
931 SDL_DestroyWindow(eng.window); | |
932 | |
933 if (eng.screen != NULL) | |
934 SDL_FreeSurface(eng.screen); | |
927 | 935 |
928 dmMsg(0, "Audio shutdown.\n"); | 936 dmMsg(0, "Audio shutdown.\n"); |
929 if (audioInit) | 937 if (audioInit) |
930 { | 938 { |
931 SDL_LockAudio(); | 939 SDL_LockAudio(); |