Skip to content

Commit fb57de2

Browse files
committed
Updated README for v2.2.0
1 parent 2ac79e0 commit fb57de2

File tree

4 files changed

+38
-9
lines changed

4 files changed

+38
-9
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### MIT License
22

3-
Copyright 2018-2019 Julian Smart
3+
Copyright 2018-2021 Julian Smart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# JoyShockLibrary
2-
The Sony PlayStation DualShock 4, Nintendo Switch JoyCons (used in pairs), and Nintendo Switch Pro Controller have much in common. They have many of the features expected of modern game controllers. They also have an incredibly versatile and underutilised input that their biggest rival (Microsoft's Xbox One controller) doesn't have: the gyro.
2+
The Sony PlayStation's DualShock 4, DualSense, Nintendo Switch Joy-Cons (used in pairs), and Nintendo Switch Pro Controller have much in common. They have many of the features expected of modern game controllers. They also have an incredibly versatile and underutilised input that their biggest rival (Microsoft's Xbox One controller) doesn't have: the gyro.
33

4-
My goal with JoyShockLibrary is to enable game developers to support DS4, JoyCons, and Pro Controllers natively in PC games. I've compiled the library for Windows, but it uses platform-agnostic tools, and my hope is that other developers would be able to get it working on other platforms (such as Linux or Mac) without too much trouble.
4+
My goal with JoyShockLibrary is to enable game developers to support DS4, DS, Joy-Cons, and Pro Controllers natively in PC games. I've compiled the library for Windows, but it uses platform-agnostic tools, and my hope is that other developers would be able to get it working on other platforms (such as Linux or Mac) without too much trouble.
55

66
## Contents
77
* **[Releases](#releases)**
@@ -21,7 +21,7 @@ The latest version of JoyShockLibrary can always be found [here](https://github.
2121
*JoyShockLibrary.h* has everything you need to use the library, but here's a breakdown of everything in there.
2222

2323
### Structs
24-
**struct JOY\_SHOCK\_STATE** - This struct contains the state for all the sticks, buttons, and triggers on the controller. If you're just using JoyShockLibrary to be able to use JoyCons, Pro Controllers, and DualShock 4s similarly to how you'd use other devices, this has everything you need to know.
24+
**struct JOY\_SHOCK\_STATE** - This struct contains the state for all the sticks, buttons, and triggers on the controller. If you're just using JoyShockLibrary to be able to use Joy-Cons, Pro Controllers, DualSenses, and DualShock 4s similarly to how you'd use other devices, this has everything you need to know.
2525
* **int buttons** contains the states of all the controller's buttons with the following masks:
2626
* ```0x00001``` - d-pad ```up```
2727
* ```0x00002``` - d-pad ```down```
@@ -41,8 +41,8 @@ The latest version of JoyShockLibrary can always be found [here](https://github.
4141
* ```0x08000``` - the North face-button: ```X``` on Nintendo devices, `````` on DS4
4242
* ```0x10000``` - ```Home``` on Nintendo devices, ```PS``` on DS4
4343
* ```0x20000``` - ```Capture``` on Nintendo devices, ```touchpad click``` on DS4, ```Create``` on DS5
44-
* ```0x40000``` - ```SL``` on Nintendo JoyCons, ```Mic``` on DS5
45-
* ```0x80000``` - ```SR``` on Nintendo JoyCons
44+
* ```0x40000``` - ```SL``` on Nintendo Joy-Cons, ```Mic``` on DS5
45+
* ```0x80000``` - ```SR``` on Nintendo Joy-Cons
4646
* **float lTrigger** - how far has the left trigger been pressed? This will be 1 or 0 on Nintendo devices, which don't have analog triggers
4747
* **float rTrigger** - how far has the right trigger been pressed? This will be 1 or 0 on Nintendo devices, which don't have analog triggers
4848
* **float stickLX, stickLY** - left-stick X axis and Y axis, respectively, from -1 to 1
@@ -114,8 +114,8 @@ All these functions *should* be thread-safe, and none of them should cause any h
114114
**void JslSetTouchCallback(void(\*callback)(int, TOUCH\_STATE, TOUCH\_STATE, float))** - Set a callback function by which JoyShockLibrary can report the current touchpad state for each device. Only DualShock 4s will use this. This callback will be given the *deviceId* for the reporting device, its current and previous touchpad states, and the amount of time since the last report for this device (in seconds).
115115

116116
**int JslGetControllerType(int deviceId)** - What type of controller is this device?
117-
1. Left JoyCon
118-
2. Right JoyCon
117+
1. Left Joy-Con
118+
2. Right Joy-Con
119119
3. Switch Pro Controller
120120
4. DualShock 4
121121
5. DualSense
@@ -141,7 +141,7 @@ Player 5: ```xxxxx```
141141

142142
## Known and Perceived Issues
143143
### Bluetooth connectivity
144-
JoyCons and Pro Controllers are normally only be connected by Bluetooth. Some Bluetooth adapters can't keep up with these devices, resulting in laggy input. This is especially common when more than one device is connected (such as when using a pair of JoyCons). There is nothing JoyShockMapper or JoyShockLibrary can do about this.
144+
Joy-Cons and Pro Controllers are normally only be connected by Bluetooth. Some Bluetooth adapters can't keep up with these devices, resulting in laggy input. This is especially common when more than one device is connected (such as when using a pair of Joy-Cons). There is nothing JoyShockMapper or JoyShockLibrary can do about this.
145145

146146
There is experimental support for connecting supported Switch controllers by USB now. Please let me know if you have any issues (or success!) with it.
147147

@@ -160,6 +160,7 @@ JoyShockLibrary v2 changes the gyro and accelerometer axes from previous version
160160
I'm Jibb Smart, and I made JoyShockLibrary. JoyShockLibrary has also benefited from the contributions of:
161161
* Romeo Calota (Linux support + general portability improvements)
162162
* RollinBarrel (touchpad support)
163+
* Robin (wireless DS4/5 support)
163164

164165
JoyShockLibrary uses substantial portions of mfosse's [JoyCon-Driver](https://github.com/mfosse/JoyCon-Driver), a [vJoy](http://vjoystick.sourceforge.net/site/) feeder for most communication with Nintendo devices, building on it with info from dekuNukem's [Nintendo Switch Reverse Engineering](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/) page in order to (for example) unpack all gyro and accelerometer samples from each report.
165166

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@echo off
2+
3+
cd ..
4+
REM Get project directory name
5+
for %%a in (.) do set projectDir=%%~na
6+
7+
cd ..
8+
mkdir build-jsl-win32
9+
cd build-jsl-win32
10+
cmake ../%projectDir% -G "Visual Studio 16 2019" -A Win32 -DBUILD_SHARED_LIBS=1
11+
12+
echo Open the generated Visual Studio solution located at: %cd%\JoyShockLibrary.sln
13+
14+
pause
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@echo off
2+
3+
cd ..
4+
REM Get project directory name
5+
for %%a in (.) do set projectDir=%%~na
6+
7+
cd ..
8+
mkdir build-jsl-win64
9+
cd build-jsl-win64
10+
cmake ../%projectDir% -G "Visual Studio 16 2019" -A x64 -DBUILD_SHARED_LIBS=1
11+
12+
echo Open the generated Visual Studio solution located at: %cd%\JoyShockLibrary.sln
13+
14+
pause

0 commit comments

Comments
 (0)