Browse Source

Exit on SIGINT

Exit on SDL event
Yann Weber 5 years ago
parent
commit
9751fb0381
2 changed files with 8 additions and 2 deletions
  1. 1
    0
      sdl.asm
  2. 7
    2
      yaglitch.asm

+ 1
- 0
sdl.asm View File

@@ -5,6 +5,7 @@ Extern SDL_SetVideoMode
5 5
 Extern SDL_Delay
6 6
 Extern SDL_OpenAudio
7 7
 Extern SDL_PauseAudio
8
+Extern SDL_WaitEvent
8 9
 
9 10
 
10 11
 

+ 7
- 2
yaglitch.asm View File

@@ -96,6 +96,8 @@ section .bss
96 96
 	t: resd 1
97 97
 	; audiospec returned from SDL
98 98
 	audiospec_recv: resb 32
99
+	; Event receveid from SDL
100
+	;event: resb 24
99 101
 
100 102
 section .text
101 103
 global _start
@@ -363,8 +365,11 @@ audio_start:
363 365
 	xor rdi, rdi
364 366
 	call SDL_PauseAudio
365 367
 
366
-	mov rdi, 5000
367
-	call SDL_Delay
368
+	;mov rdi, 15000
369
+	;call SDL_Delay
370
+	
371
+	xor rdi, rdi
372
+	call SDL_WaitEvent
368 373
 
369 374
 
370 375
 exit:

Loading…
Cancel
Save