-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexternal.monkey
77 lines (64 loc) · 1.52 KB
/
external.monkey
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Strict
Public
' Preprocessor related:
' Nothing so far.
' Imports:
Import inputmanager ' regal.inputmanager
' Check if 'JoyPresent' should be implemented:
#If INPUT_GLFW_TARGET
#INPUTMANAGER_JOYPRESENT_IMPLEMENTED = True
#End
' External bindings:
Extern
' Constant variable(s):
' Nothing so far.
' Global variable(s):
#If INPUT_GLFW_TARGET
' General:
Global GLFW_PRESENT:Int
' Joystick IDs:
#Rem
Global GLFW_JOYSTICK_1:Int
Global GLFW_JOYSTICK_2:Int
Global GLFW_JOYSTICK_3:Int
Global GLFW_JOYSTICK_4:Int
Global GLFW_JOYSTICK_5:Int
Global GLFW_JOYSTICK_6:Int
Global GLFW_JOYSTICK_7:Int
Global GLFW_JOYSTICK_8:Int
Global GLFW_JOYSTICK_9:Int
Global GLFW_JOYSTICK_10:Int
Global GLFW_JOYSTICK_11:Int
Global GLFW_JOYSTICK_12:Int
Global GLFW_JOYSTICK_13:Int
Global GLFW_JOYSTICK_14:Int
Global GLFW_JOYSTICK_15:Int
Global GLFW_JOYSTICK_16:Int
Global GLFW_JOYSTICK_LAST:Int
#End
#If INPUTMANAGER_GLFW3
Function _GLFW_JoyPresent:Int(JoyID:Int)="glfwJoystickPresent"
#Else
Function GLFW_GetJoyParam:Int(JoyID:Int, Param:Int)="glfwGetJoystickParam"
#End
#End
' Functions:
' Check the implementation-flag, just in case:
#If INPUTMANAGER_JOYPRESENT_IMPLEMENTED
Function JoyPresent:Bool(JoyID:Int)
#If INPUTMANAGER_GLFW_TARGET
#If Not INPUTMANAGER_GLFW3
If (GLFW_GetJoyParam(JoyID, GLFW_PRESENT) = 1) Then ' GL_TRUE
Return True
Endif
#Else
If (_GLFW_JoyPresent(JoyID) = 1) Then ' GL_TRUE
Return True
Endif
#End
#End
' Return the default response.
Return False
End
#End
Public