summaryrefslogtreecommitdiffstats
path: root/src/skel/events.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-06-02 05:00:38 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2019-06-02 05:00:38 +0200
commitb1f9e28cd155459ab2843690c248ed9f4767bc3f (patch)
tree8e7d2a33d4c5109ea3c3562940268afc57d0915c /src/skel/events.cpp
parentrw skeleton (diff)
downloadre3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.gz
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.bz2
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.lz
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.xz
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.zst
re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.zip
Diffstat (limited to '')
-rw-r--r--src/skel/events.cpp81
1 files changed, 41 insertions, 40 deletions
diff --git a/src/skel/events.cpp b/src/skel/events.cpp
index 4a7a8bd2..290dfee4 100644
--- a/src/skel/events.cpp
+++ b/src/skel/events.cpp
@@ -3,7 +3,8 @@
#include "events.h"
//#include "main.h"
-
+ #define DIRECTINPUT_VERSION 0x0800
+ #include <dinput.h>
#include "common.h"
#include "Pad.h"
#include "ControllerConfig.h"
@@ -350,7 +351,7 @@ HandleKeyDown(RsKeyStatus *keyStatus)
}
}
- return rsEVENTPROCESSED;
+ return rsEVENTPROCESSED;
}
@@ -688,7 +689,7 @@ HandleKeyUp(RsKeyStatus *keyStatus)
}
}
- return rsEVENTPROCESSED;
+ return rsEVENTPROCESSED;
}
@@ -698,26 +699,26 @@ HandleKeyUp(RsKeyStatus *keyStatus)
static RsEventStatus
KeyboardHandler(RsEvent event, void *param)
{
- /*
- * ...then the application events, if necessary...
- */
- switch( event )
- {
- case rsKEYDOWN:
- {
- return HandleKeyDown((RsKeyStatus *)param);
- }
+ /*
+ * ...then the application events, if necessary...
+ */
+ switch( event )
+ {
+ case rsKEYDOWN:
+ {
+ return HandleKeyDown((RsKeyStatus *)param);
+ }
- case rsKEYUP:
- {
- return HandleKeyUp((RsKeyStatus *)param);
- }
+ case rsKEYUP:
+ {
+ return HandleKeyUp((RsKeyStatus *)param);
+ }
- default:
- {
- return rsEVENTNOTPROCESSED;
- }
- }
+ default:
+ {
+ return rsEVENTNOTPROCESSED;
+ }
+ }
}
/*
@@ -791,7 +792,7 @@ HandlePadButtonUp(RsPadButtonStatus *padButtonStatus)
ControlsManager.AffectControllerStateOn_ButtonUp(btn, JOYSTICK);
}
- return rsEVENTPROCESSED;
+ return rsEVENTPROCESSED;
}
/*
@@ -800,23 +801,23 @@ HandlePadButtonUp(RsPadButtonStatus *padButtonStatus)
static RsEventStatus
PadHandler(RsEvent event, void *param)
{
- switch( event )
- {
- case rsPADBUTTONDOWN:
- {
- return HandlePadButtonDown((RsPadButtonStatus *)param);
- }
+ switch( event )
+ {
+ case rsPADBUTTONDOWN:
+ {
+ return HandlePadButtonDown((RsPadButtonStatus *)param);
+ }
- case rsPADBUTTONUP:
- {
- return HandlePadButtonUp((RsPadButtonStatus *)param);
- }
+ case rsPADBUTTONUP:
+ {
+ return HandlePadButtonUp((RsPadButtonStatus *)param);
+ }
- default:
- {
- return rsEVENTNOTPROCESSED;
- }
- }
+ default:
+ {
+ return rsEVENTNOTPROCESSED;
+ }
+ }
}
@@ -826,11 +827,11 @@ PadHandler(RsEvent event, void *param)
RwBool
AttachInputDevices(void)
{
- RsInputDeviceAttach(rsKEYBOARD, KeyboardHandler);
+ RsInputDeviceAttach(rsKEYBOARD, KeyboardHandler);
- RsInputDeviceAttach(rsPAD, PadHandler);
+ RsInputDeviceAttach(rsPAD, PadHandler);
- return TRUE;
+ return TRUE;
}