From c6837fbe3ed1b7f98d1d4905da88ed91efee82df Mon Sep 17 00:00:00 2001 From: sheeple Date: Tue, 24 Mar 2009 01:07:38 -0500 Subject: [PATCH 1/2] Update cpu-ppc.S for quotation layout change --- vm/cpu-ppc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/cpu-ppc.S b/vm/cpu-ppc.S index 30b61b5c0c..8b3141218b 100755 --- a/vm/cpu-ppc.S +++ b/vm/cpu-ppc.S @@ -45,7 +45,7 @@ multiply_overflow: /* Note that the XT is passed to the quotation in r11 */ #define CALL_OR_JUMP_QUOT \ - lwz r11,9(r3) /* load quotation-xt slot */ XX \ + lwz r11,17(r3) /* load quotation-xt slot */ XX \ #define CALL_QUOT \ CALL_OR_JUMP_QUOT XX \ From 5d3c2c874a91c24b96f3d862a41371ebd45cca47 Mon Sep 17 00:00:00 2001 From: "U-SLAVA-DFB8FF805\\Slava" Date: Tue, 24 Mar 2009 03:58:11 -0500 Subject: [PATCH 2/2] Get game-input to load on Windows --- basis/ui/backend/windows/windows.factor | 2 +- basis/windows/dinput/constants/constants.factor | 2 +- basis/windows/dinput/dinput.factor | 6 +++--- extra/game-input/dinput/dinput.factor | 4 ++-- extra/game-input/game-input.factor | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index 54d9ed456a..80dd313e85 100755 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -354,7 +354,7 @@ H{ } clone wm-handlers set-global : add-wm-handler ( quot wm -- ) dup array? - [ [ execute add-wm-handler ] with each ] + [ [ execute( -- wm ) add-wm-handler ] with each ] [ wm-handlers get-global set-at ] if ; [ handle-wm-close 0 ] WM_CLOSE add-wm-handler diff --git a/basis/windows/dinput/constants/constants.factor b/basis/windows/dinput/constants/constants.factor index 314fb167e3..cd1033d418 100755 --- a/basis/windows/dinput/constants/constants.factor +++ b/basis/windows/dinput/constants/constants.factor @@ -832,7 +832,7 @@ SYMBOLS: define-keyboard-format-constant define-hid-keyboard-format-constant ; -: define-constants +: define-constants ( -- ) define-guid-constants define-format-constants ; diff --git a/basis/windows/dinput/dinput.factor b/basis/windows/dinput/dinput.factor index 1cd22beb75..dc544858b6 100755 --- a/basis/windows/dinput/dinput.factor +++ b/basis/windows/dinput/dinput.factor @@ -27,15 +27,15 @@ TYPEDEF: void* LPDIENUMEFFECTSCALLBACKW [ "BOOL" { "LPCDIEFFECTINFOW" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: void* LPDIENUMCREATEDEFFECTOBJECTSCALLBACK -: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK +: LPDIENUMCREATEDEFFECTOBJECTSCALLBACK ( quot -- callback ) [ "BOOL" { "LPDIRECTINPUTEFFECT" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: void* LPDIENUMEFFECTSINFILECALLBACK -: LPDIENUMEFFECTSINFILECALLBACK +: LPDIENUMEFFECTSINFILECALLBACK ( quot -- callback ) [ "BOOL" { "LPCDIFILEEFFECT" "LPVOID" } "stdcall" ] dip alien-callback ; inline TYPEDEF: void* LPDIENUMDEVICEOBJECTSCALLBACKW -: LPDIENUMDEVICEOBJECTSCALLBACKW +: LPDIENUMDEVICEOBJECTSCALLBACKW ( quot -- callback ) [ "BOOL" { "LPCDIDEVICEOBJECTINSTANCEW" "LPVOID" } "stdcall" ] dip alien-callback ; inline diff --git a/extra/game-input/dinput/dinput.factor b/extra/game-input/dinput/dinput.factor index c6004a8221..a2beaf6d9b 100755 --- a/extra/game-input/dinput/dinput.factor +++ b/extra/game-input/dinput/dinput.factor @@ -2,10 +2,10 @@ USING: windows.dinput windows.dinput.constants parser alien.c-types windows.ole32 namespaces assocs kernel arrays vectors windows.kernel32 windows.com windows.dinput shuffle windows.user32 windows.messages sequences combinators locals -math.rectangles ui.windows accessors math windows alien +math.rectangles accessors math windows alien alien.strings io.encodings.utf16 io.encodings.utf16n continuations byte-arrays game-input.dinput.keys-array -game-input ; +game-input ui.backend.windows ; IN: game-input.dinput SINGLETON: dinput-game-input-backend diff --git a/extra/game-input/game-input.factor b/extra/game-input/game-input.factor index 46e3ba9e8d..6efe31861a 100755 --- a/extra/game-input/game-input.factor +++ b/extra/game-input/game-input.factor @@ -35,7 +35,7 @@ PRIVATE> ] when ; : with-game-input ( quot -- ) - open-game-input [ close-game-input ] [ ] cleanup ; + open-game-input [ close-game-input ] [ ] cleanup ; inline TUPLE: controller handle ; TUPLE: controller-state x y z rx ry rz slider pov buttons ;