- chirp_stop() implemented
- chirps stop playing when ESC or F5
This commit is contained in:
6
mini.cpp
6
mini.cpp
@@ -217,6 +217,7 @@ int main(int argc,char*argv[]){
|
||||
if (mini_eve.type == SDL_QUIT) { should_exit=true; should_quit=true; break; }
|
||||
if (mini_eve.type == SDL_KEYDOWN) {
|
||||
if (mini_eve.key.keysym.scancode == SDL_SCANCODE_ESCAPE) {
|
||||
chirp_stop();
|
||||
if (lua_is_playing()) {
|
||||
lua_quit();
|
||||
quitaudio();
|
||||
@@ -228,6 +229,7 @@ int main(int argc,char*argv[]){
|
||||
//lua_call_init();
|
||||
}
|
||||
} else if (mini_eve.key.keysym.scancode == SDL_SCANCODE_F5) {
|
||||
chirp_stop();
|
||||
should_exit=true;
|
||||
//lua_quit();
|
||||
//reinit();
|
||||
@@ -987,6 +989,10 @@ void playchirp(const char *song, const bool lock) {
|
||||
chirp_play(song, lock);
|
||||
}
|
||||
|
||||
void stopchirp() {
|
||||
chirp_stop();
|
||||
}
|
||||
|
||||
void exit() {
|
||||
should_exit = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user