Overview
Comment: | ObjFWHID: Restore Nintendo DS support |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6a6c86237de4495494ada588a5c2d885 |
User & Date: | js on 2024-06-08 21:25:32 |
Other Links: | manifest | tags |
Context
2024-06-08
| ||
22:16 | OHEvdevGamepad: Filter buttons/axes check-in: 48e6a99f7b user: js tags: trunk | |
21:25 | ObjFWHID: Restore Nintendo DS support check-in: 6a6c86237d user: js tags: trunk | |
20:21 | ObjFWHID: Restore Nintendo 3DS support check-in: 663320ba4d user: js tags: trunk | |
Changes
Modified configure.ac from [bf1fe49627] to [074a738523].
︙ | |||
228 229 230 231 232 233 234 235 236 237 238 239 240 241 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | + | LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9" enable_shared="no" enable_threads="no" # TODO enable_sockets="no" # TODO check_pedantic="no" AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for Nintendo DS]) AC_SUBST(USE_SRCS_NINTENDO_DS, '${SRCS_NINTENDO_DS}') AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map']) ]) AC_ARG_WITH(3ds, AS_HELP_STRING([--with-3ds], [build for Nintendo 3DS])) AS_IF([test x"$with_3ds" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ |
︙ |
Modified extra.mk.in from [5b1cf80650] to [5c1c95c165].
︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | + | UNICODE_M = @UNICODE_M@ USE_INCLUDES_ATOMIC = @USE_INCLUDES_ATOMIC@ USE_SRCS_APPLETALK = @USE_SRCS_APPLETALK@ USE_SRCS_EVDEV = @USE_SRCS_EVDEV@ USE_SRCS_FILES = @USE_SRCS_FILES@ USE_SRCS_IPX = @USE_SRCS_IPX@ USE_SRCS_NINTENDO_3DS = @USE_SRCS_NINTENDO_3DS@ USE_SRCS_NINTENDO_DS = @USE_SRCS_NINTENDO_DS@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@ USE_SRCS_SCTP = @USE_SRCS_SCTP@ USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@ USE_SRCS_SUBPROCESSES = @USE_SRCS_SUBPROCESSES@ USE_SRCS_TAGGED_POINTERS = @USE_SRCS_TAGGED_POINTERS@ USE_SRCS_THREADS = @USE_SRCS_THREADS@ USE_SRCS_UNIX_SOCKETS = @USE_SRCS_UNIX_SOCKETS@ |
︙ |
Modified src/hid/Makefile from [6270b55dc0] to [8549234aa0].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + | OHGameControllerButton.m \ OHGameControllerDirectionalPad.m \ OHGameControllerElement.m \ OHGameControllerProfile.m \ OHGamepad.m \ ${USE_SRCS_EVDEV} \ ${USE_SRCS_NINTENDO_3DS} \ ${USE_SRCS_NINTENDO_DS} \ ${USE_SRCS_XINPUT} SRCS_EVDEV = OHEvdevGameController.m \ OHEvdevGamepad.m SRCS_NINTENDO_3DS = OHNintendo3DSGameController.m \ OHNintendo3DSGamepad.m SRCS_NINTENDO_DS = OHNintendoDSGameController.m SRCS_XINPUT = OHXInputGameController.m \ OHXInputGamepad.m INCLUDES := ${SRCS:.m=.h} \ ObjFWHID.h SRCS += OHGameControllerEmulatedAxis.m \ |
︙ |
Modified src/hid/OHGameController.m from [1e979f93f1] to [5de26d2df5].
︙ | |||
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 | 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 | + + + + + | #if defined(OF_LINUX) && defined(OF_HAVE_FILES) # import "OHEvdevGameController.h" #endif #ifdef OF_WINDOWS # import "OHXInputGameController.h" #endif #ifdef OF_NINTENDO_DS # import "OHNintendoDSGameController.h" #endif #ifdef OF_NINTENDO_3DS # import "OHNintendo3DSGameController.h" #endif @implementation OHGameController @dynamic name, rawProfile; + (OFArray OF_GENERIC(OHGameController *) *)controllers { #if defined(OF_LINUX) && defined(OF_HAVE_FILES) return [OHEvdevGameController controllers]; #elif defined(OF_WINDOWS) return [OHXInputGameController controllers]; #elif defined(OF_NINTENDO_DS) return [OHNintendoDSGameController controllers]; #elif defined(OF_NINTENDO_3DS) return [OHNintendo3DSGameController controllers]; #else return [OFArray array]; #endif } |
︙ |
Modified src/hid/OHNintendo3DSGameController.m from [9e8e34de00] to [4800c3c390].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - - - - - - - - - - | #define id id_3ds #include <3ds.h> #undef id static OFArray OF_GENERIC(OHGameController *) *controllers; |
︙ | |||
98 99 100 101 102 103 104 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - - - - - - - - - - + + + + + + + + + + | hidScanInput(); keys = hidKeysHeld(); hidCircleRead(&leftPos); hidCstickRead(&rightPos); |
︙ | |||
132 133 134 135 136 137 138 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - - - - + + + + | rightPos.dy = -150; _gamepad.leftThumbstick.xAxis.value = (float)leftPos.dx / 150; _gamepad.leftThumbstick.yAxis.value = -(float)leftPos.dy / 150; _gamepad.rightThumbstick.xAxis.value = (float)rightPos.dx / 150; _gamepad.rightThumbstick.yAxis.value = -(float)rightPos.dy / 150; |
Modified src/hid/OHNintendo3DSGamepad.m from [f89e0b995b] to [1b3ca013dd].
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - - - + + - - + - - - - | [OFMutableDictionary dictionaryWithCapacity: numButtons]; OFMutableDictionary *directionalPads; OHGameControllerAxis *xAxis, *yAxis; OHGameControllerDirectionalPad *directionalPad; OHGameControllerButton *up, *down, *left, *right; for (size_t i = 0; i < numButtons; i++) { |
︙ |
Added src/hid/OHNintendoDSGameController.h version [ba9c705bcc].
|
Added src/hid/OHNintendoDSGameController.m version [18aa290f08].