diff --git a/basis/windows/directx/dinput/constants/constants.factor b/basis/windows/directx/dinput/constants/constants.factor index 34ab130b59..6a2d9b148d 100644 --- a/basis/windows/directx/dinput/constants/constants.factor +++ b/basis/windows/directx/dinput/constants/constants.factor @@ -48,13 +48,15 @@ M: array array-base-type first ; : -quot ( struct {pguid-var,field,index,dwType-flags,dwFlags} -- quot ) { - [ first dup word? [ '[ _ get ] ] [ drop [ f ] ] if ] + [ drop f ] [ second rot [ (offsetof) ] [ (sizeof) ] 2bi ] [ third * + ] [ fourth (flags) ] [ 4 swap nth (flag) ] + [ first dup word? [ '[ _ get ] ] [ drop [ f ] ] if ] } cleave - '[ @ _ _ _ DIOBJECTDATAFORMAT ] ; + [ DIOBJECTDATAFORMAT ] dip + '[ _ clone @ >>pguid ] ; :: make-DIOBJECTDATAFORMAT-array-quot ( struct array -- quot ) array length '[ _ malloc-DIOBJECTDATAFORMAT-array ]