Skip to content

Commit cc09fcc

Browse files
authored
Merge pull request #800 from uyjulian/libpad_rpc_agnostic
libpad RPC agnostic
2 parents 2d9c170 + 03d75b9 commit cc09fcc

11 files changed

Lines changed: 636 additions & 377 deletions

File tree

ee/rpc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ SUBDIRS += memorycard
1717
SUBDIRS += mouse
1818
SUBDIRS += multitap
1919
SUBDIRS += pad
20-
SUBDIRS += padx
2120
SUBDIRS += poweroff
2221
SUBDIRS += ps2snd
2322
SUBDIRS += remote

ee/rpc/pad/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# Licenced under Academic Free License version 2.0
77
# Review ps2sdk README & LICENSE files for further details.
88

9+
EE_LIB_ALTNAMES ?= libpadx.a
10+
911
EE_OBJS = libpad.o erl-support.o
1012

1113
include $(PS2SDKSRC)/Defs.make

ee/rpc/pad/include/libpad.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,20 +240,20 @@ extern int padSetButtonInfo(int port, int slot, int buttonInfo);
240240
* If padInfoAct(port, slot, -1, 0) != 0, the controller has actuators
241241
* (i think ;) )
242242
*/
243-
extern unsigned char padInfoAct(int port, int slot, int word, int byte);
243+
extern unsigned char padInfoAct(int port, int slot, int actuator, int cmd);
244244

245245
/** Initalise actuators. On dual shock controller:
246246
* act_align[0] = 0 enables 'small' engine
247247
* act_align[1] = 1 enables 'big' engine
248248
* set act_align[2-5] to 0xff (disable)
249249
*/
250-
extern int padSetActAlign(int port, int slot, const char act_align[6]);
250+
extern int padSetActAlign(int port, int slot, const char actAlign[6]);
251251

252252
/** Set actuator status on dual shock controller,
253253
* act_align[0] = 0/1 turns off/on 'small' engine
254254
* act_align[1] = 0-255 sets 'big' engine speed
255255
*/
256-
extern int padSetActDirect(int port, int slot, char act_align[6]);
256+
extern int padSetActDirect(int port, int slot, const char actAlign[6]);
257257

258258
/** Returns whether the device at port,slot is connected (1 = connected)
259259
* Appears to have been removed very early during the PS2's lifetime.

ee/rpc/pad/samples/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# ____| | ____| | | |____|
33
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
44
#-----------------------------------------------------------------------
5-
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
5+
# Copyright ps2dev - http://www.ps2dev.org
66
# Licenced under Academic Free License version 2.0
77
# Review ps2sdk README & LICENSE files for further details.
88

9-
SAMPLE_DIR = rpc/pad
9+
SUBDIRS = pad padx
1010

1111
include $(PS2SDKSRC)/Defs.make
12-
include $(PS2SDKSRC)/samples/Rules.samples
12+
include $(PS2SDKSRC)/Rules.make
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
# Licenced under Academic Free License version 2.0
77
# Review ps2sdk README & LICENSE files for further details.
88

9-
EE_SRC_DIR = $(PS2SDKSRC)/ee/rpc/pad/src/
10-
EE_INC_DIR = $(PS2SDKSRC)/ee/rpc/pad/include/
9+
SAMPLE_DIR = rpc/pad
1110

12-
EE_CFLAGS += -D_XPAD
13-
14-
include $(PS2SDKSRC)/ee/rpc/pad/Makefile
11+
include $(PS2SDKSRC)/Defs.make
12+
include $(PS2SDKSRC)/samples/Rules.samples

0 commit comments

Comments
 (0)