kernel: Make get_active_window_struct return 0 if no active window

This commit is contained in:
Ry 2023-01-24 17:18:12 -08:00
parent cf5850b668
commit 0c3a0afc5f

View File

@ -650,9 +650,12 @@ window_list_offset_to_struct:
; inputs:
; none
; outputs:
; r0: pointer to current window struct
; r0: pointer to current window struct, or zero if none
get_active_window_struct:
movz.8 r0, [active_window_offset]
cmp.8 r0, 0xFF
ifz mov r0, 0
ifz ret
call window_list_offset_to_struct
ret