monitor: Return early if invoked while already in the monitor

This commit is contained in:
Ry 2022-07-26 17:48:29 -07:00
parent 8ee0214164
commit 1133e97e02

View File

@ -1,6 +1,10 @@
; debug monitor ; debug monitor
invoke_monitor: invoke_monitor:
; return if we're already in the monitor
cmp [0x000003FC], monitor_vsync_handler
ifz ret
; set the vsync handler to our own and reenable interrupts ; set the vsync handler to our own and reenable interrupts
mov [MONITOR_OLD_VSYNC_HANDLER], [0x000003FC] mov [MONITOR_OLD_VSYNC_HANDLER], [0x000003FC]
mov [0x000003FC], monitor_vsync_handler mov [0x000003FC], monitor_vsync_handler