43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
|
diff --git a/main.c b/main.c
|
||
|
index 2e43de7..8ef2b8b 100644
|
||
|
--- a/main.c
|
||
|
+++ b/main.c
|
||
|
@@ -113,7 +113,7 @@ void emit(int type, int code, int val) {
|
||
|
write(uinp_fd, &ev, sizeof(ev));
|
||
|
}
|
||
|
|
||
|
-void handle_event_rg552(int type, int code, int value) {
|
||
|
+void handle_event_s922x(int type, int code, int value) {
|
||
|
if (type == 1) {
|
||
|
if (code == back_key && value == 1) {
|
||
|
emit(EV_KEY, back, 1);
|
||
|
@@ -2276,7 +2276,7 @@ int main(int argc, char* argv[]) {
|
||
|
deadzone_x = -300;
|
||
|
strcpy(inputstr, "/dev/input/by-path/platform-gameforce-gamepad-event-joystick");
|
||
|
}
|
||
|
- else if (strcmp(argv[2], "rg552") == 0) {
|
||
|
+ else if (strcmp(argv[2], "s922x") == 0) {
|
||
|
back_key = 314;
|
||
|
start_key = 315;
|
||
|
a_key = 305;
|
||
|
@@ -2295,7 +2295,7 @@ int main(int argc, char* argv[]) {
|
||
|
r3_key = 318;
|
||
|
deadzone_y = 300;
|
||
|
deadzone_x = -300;
|
||
|
- strcpy(inputstr, "/dev/input/by-path/platform-singleadc-joypad-event-joystick");
|
||
|
+ strcpy(inputstr, "/dev/input/by-path/platform-platform-gou_joypad-event-joystick");
|
||
|
}
|
||
|
else {
|
||
|
printf("Error launching, unrecognised parameters\n");
|
||
|
@@ -2465,8 +2465,8 @@ int main(int argc, char* argv[]) {
|
||
|
else if (strcmp(argv[2], "ogs") == 0) {
|
||
|
handle_event_ogs(ev_joypad.type, ev_joypad.code, ev_joypad.value);
|
||
|
}
|
||
|
- else if (strcmp(argv[2], "rg552") == 0) {
|
||
|
- handle_event_rg552(ev_joypad.type, ev_joypad.code, ev_joypad.value);
|
||
|
+ else if (strcmp(argv[2], "s922x") == 0) {
|
||
|
+ handle_event_s922x(ev_joypad.type, ev_joypad.code, ev_joypad.value);
|
||
|
}
|
||
|
else {
|
||
|
handle_event_ogx(ev_joypad.type, ev_joypad.code, ev_joypad.value);
|