From fa92c0aa01943a790eeb4c06a5615af1f69e7266 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 28 Jul 2024 11:06:12 +0800 Subject: [PATCH] make pump network a function --- src/teeworlds_asmr.asm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/teeworlds_asmr.asm b/src/teeworlds_asmr.asm index 65ff932..0bb93b3 100644 --- a/src/teeworlds_asmr.asm +++ b/src/teeworlds_asmr.asm @@ -396,17 +396,22 @@ connect: ret -key_a: - print s_you_pressed_a - call connect +pump_network: print s_blocking_read call recv_udp mov rax, [udp_read_len] test rax, rax ; if recvfrom returned negative ; we do not process the udp payload - js keypress_end + js .pump_network_no_data call on_udp_packet +.pump_network_no_data + ret + +key_a: + print s_you_pressed_a + call connect + call pump_network jmp keypress_end key_d: