vigem-sdvxio: Add relative mode and address comments
This commit is contained in:
@@ -5,6 +5,7 @@ cppflags_vigemstub := \
|
||||
-I src/imports \
|
||||
|
||||
libs_vigemstub := \
|
||||
util \
|
||||
|
||||
src_vigemstub := \
|
||||
helper.c \
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "ViGEm/Client.h"
|
||||
|
||||
#include "util/log.h"
|
||||
#include "vigemstub/helper.h"
|
||||
|
||||
PVIGEM_CLIENT vigem_helper_setup(void)
|
||||
@@ -11,14 +12,14 @@ PVIGEM_CLIENT vigem_helper_setup(void)
|
||||
PVIGEM_CLIENT client = vigem_alloc();
|
||||
|
||||
if (client == NULL) {
|
||||
printf("vigem_alloc failed\n");
|
||||
log_warning("vigem_alloc failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VIGEM_ERROR retval = vigem_connect(client);
|
||||
|
||||
if (!VIGEM_SUCCESS(retval)) {
|
||||
printf("ViGEm Bus connection failed with error code: 0x%x\n", retval);
|
||||
log_warning("ViGEm Bus connection failed with error code: 0x%x\n", retval);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -30,14 +31,14 @@ PVIGEM_TARGET vigem_helper_add_pad(PVIGEM_CLIENT client)
|
||||
PVIGEM_TARGET pad = vigem_target_x360_alloc();
|
||||
|
||||
if (pad == NULL) {
|
||||
printf("vigem_target_x360_alloc failed\n");
|
||||
log_warning("vigem_target_x360_alloc failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VIGEM_ERROR pir = vigem_target_add(client, pad);
|
||||
|
||||
if (!VIGEM_SUCCESS(pir)) {
|
||||
printf("Target plugin failed with error code: 0x%x\n", pir);
|
||||
log_warning("Target plugin failed with error code: 0x%x\n", pir);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user