mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Make SDL.*Event procedures return booleans instead of an integer where appropriate
This commit is contained in:
Vendored
+5
-5
@@ -488,15 +488,15 @@ foreign lib {
|
|||||||
HasEvents :: proc(minType, maxType: EventType) -> bool ---
|
HasEvents :: proc(minType, maxType: EventType) -> bool ---
|
||||||
FlushEvent :: proc(type: EventType) ---
|
FlushEvent :: proc(type: EventType) ---
|
||||||
FlushEvents :: proc(minType, maxType: EventType) ---
|
FlushEvents :: proc(minType, maxType: EventType) ---
|
||||||
PollEvent :: proc(event: ^Event) -> c.int ---
|
PollEvent :: proc(event: ^Event) -> bool --- // original return value is c.int
|
||||||
WaitEvent :: proc(event: ^Event) -> c.int ---
|
WaitEvent :: proc(event: ^Event) -> bool --- // original return value is c.int
|
||||||
WaitEventTimeout :: proc(event: ^Event, timeout: c.int) -> c.int ---
|
WaitEventTimeout :: proc(event: ^Event, timeout: c.int) -> bool --- // original return value is c.int
|
||||||
PushEvent :: proc(event: ^Event) -> c.int ---
|
PushEvent :: proc(event: ^Event) -> bool --- // original return value is c.int
|
||||||
SetEventFilter :: proc(filter: EventFilter, userdata: rawptr) ---
|
SetEventFilter :: proc(filter: EventFilter, userdata: rawptr) ---
|
||||||
GetEventFilter :: proc(filter: ^EventFilter, userdata: ^rawptr) -> bool ---
|
GetEventFilter :: proc(filter: ^EventFilter, userdata: ^rawptr) -> bool ---
|
||||||
AddEventWatch :: proc(filter: EventFilter, userdata: rawptr) ---
|
AddEventWatch :: proc(filter: EventFilter, userdata: rawptr) ---
|
||||||
DelEventWatch :: proc(filter: EventFilter, userdata: rawptr) ---
|
DelEventWatch :: proc(filter: EventFilter, userdata: rawptr) ---
|
||||||
FilterEvents :: proc(filter: EventFilter, userdata: rawptr) ---
|
FilterEvents :: proc(filter: EventFilter, userdata: rawptr) ---
|
||||||
EventState :: proc(type: EventType, state: c.int) -> u8 ---
|
EventState :: proc(type: EventType, state: c.int) -> b8 --- // original return value is u8
|
||||||
RegisterEvents :: proc(numevents: c.int) -> u32 ---
|
RegisterEvents :: proc(numevents: c.int) -> u32 ---
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -118,7 +118,7 @@ foreign lib {
|
|||||||
GameControllerGetStringForAxis :: proc(axis: GameControllerAxis) -> cstring ---
|
GameControllerGetStringForAxis :: proc(axis: GameControllerAxis) -> cstring ---
|
||||||
GameControllerGetBindForAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> GameControllerButtonBind---
|
GameControllerGetBindForAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> GameControllerButtonBind---
|
||||||
GameControllerHasAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> bool ---
|
GameControllerHasAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> bool ---
|
||||||
GameControllerGetAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> i16 ---
|
GameControllerGetAxis :: proc(gamecontroller: ^GameController, axis: GameControllerAxis) -> i16 ---
|
||||||
|
|
||||||
GameControllerGetButtonFromString :: proc(str: cstring) -> GameControllerButton ---
|
GameControllerGetButtonFromString :: proc(str: cstring) -> GameControllerButton ---
|
||||||
GameControllerGetStringForButton :: proc(button: GameControllerButton) -> cstring ---
|
GameControllerGetStringForButton :: proc(button: GameControllerButton) -> cstring ---
|
||||||
|
|||||||
Reference in New Issue
Block a user