Browse Source

SDL1 event handling bugfix

Yann Weber 5 years ago
parent
commit
207b461b81
1 changed files with 11 additions and 18 deletions
  1. 11
    18
      yaglitch.asm

+ 11
- 18
yaglitch.asm View File

385
 	cmp rax, 0
385
 	cmp rax, 0
386
 	je sdl_error ; error fetching event...
386
 	je sdl_error ; error fetching event...
387
 	xor rdi, rdi
387
 	xor rdi, rdi
388
-%ifdef SDL1
389
-		mov di, [event]
390
-
391
-	dbg:
392
-		;mov rsi, 1
393
-		;push rdi
394
-		;call print_hnum
395
-		;pop rdi
396
-
397
-		test di, SDL_QUIT
398
-		jnz exit
399
-%endif
400
-%ifdef SDL2
401
-		mov edi, [event]
402
-		cmp edi, SDL_QUIT
403
-		je exit
404
-%endif
405
-
388
+	%ifdef SDL1
389
+			mov dil, [event]
390
+			cmp dil, SDL_QUIT
391
+			je exit
392
+	%endif
393
+	%ifdef SDL2
394
+			mov edi, [event]
395
+			cmp edi, SDL_QUIT
396
+			je exit
397
+	%endif
398
+evt:
406
 	jmp loop_event
399
 	jmp loop_event
407
 
400
 
408
 sdl_error:
401
 sdl_error:

Loading…
Cancel
Save