gui: fixed CFLAG return value.

This commit is contained in:
Martin Preuss
2026-04-30 00:08:22 +02:00
parent 7173ea14ac
commit 5767329895
3 changed files with 24 additions and 3 deletions

View File

@@ -75,7 +75,8 @@ HLayout_Init:
; call base class
bigcall Widget_Init ; (r16, r17, X)
pop r20
brcc HLayout_Init_ret
; set widget-specific data
std Y+HLAYOUT_OFFS_MODE, r20
@@ -85,6 +86,7 @@ HLayout_Init:
ldi r16, HIGH(HLayout_DefaultSignalmap*2)
std Y+OBJECT_OFFS_SIGNALMAP_HI, r16
HLayout_Init_ret:
ret
; @end

View File

@@ -128,6 +128,7 @@ OBJ_Init:
std Y+OBJECT_OFFS_SIGNALMAP_LO, r16
ldi r16, HIGH(Object_DefaultSignalmap*2)
std Y+OBJECT_OFFS_SIGNALMAP_HI, r16
sec
ret
; @end

View File

@@ -156,7 +156,8 @@ Widget_Init:
pop r17
pop xh
pop xl
brcc Widget_Init_ret
std Y+WIDGET_OFFS_PACK, r17
; set default signal map
@@ -208,7 +209,8 @@ Widget_Init_setDefaultSize:
ldd r16, Y+OBJECT_OFFS_FLAGS
sbr r16, (1<<WIDGET_FLAGS_DIRTY_BIT) | (1<<WIDGET_FLAGS_LAYOUT_BIT)
std Y+OBJECT_OFFS_FLAGS, r16
sec
Widget_Init_ret:
ret
; @end
@@ -356,6 +358,22 @@ Widget_SetValue:
; ---------------------------------------------------------------------------
; @routine Widget_GetValue @global
;
; @param Y address of widget
; @param r17 value id
; @return CFLAG set if value retrieved, cleared otherwise
; @return r19:r18 value
; @clobbers any, !Y
Widget_GetValue:
ldi r16, WIDGET_SIGNAL_GETVALUE
bigjmp OBJ_HandleSignal
; @end
; ---------------------------------------------------------------------------
; @routine Widget_IsPointInRect @global
;