Skip to content

Commit 32b515d

Browse files
authored
Merge pull request #156 from OpenBrickProtocolFoundation/add_game_controller
Add game Controller Support
2 parents 02bb160 + 61c959b commit 32b515d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3066
-229
lines changed

.github/workflows/android.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
- name: Setup ninja
3434
run: |
3535
sudo apt-get update
36-
sudo apt-get upgrade -y
3736
sudo apt-get install ninja-build jq
3837
3938
- name: Setup JDK

.github/workflows/cpp-linter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- name: Prepare compile_commands.json
2929
run: |
3030
sudo apt-get update
31-
sudo apt-get upgrade -y
3231
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
3332
3433
meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true

.github/workflows/meson.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ jobs:
171171
if: matrix.config.os == 'ubuntu'
172172
run: |
173173
sudo apt-get update
174-
sudo apt-get upgrade -y
175174
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y
176175
177176
- name: Install dependencies (MacOS)

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
sudo apt-get update
35-
sudo apt-get upgrade -y
3635
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* gcovr -y
3736
3837
- name: Configure
File renamed without changes.
File renamed without changes.

assets/mappings/LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (C) 1997-2022 Sam Lantinga <[email protected]>
2+
3+
This software is provided 'as-is', without any express or implied
4+
warranty. In no event will the authors be held liable for any damages
5+
arising from the use of this software.
6+
7+
Permission is granted to anyone to use this software for any purpose,
8+
including commercial applications, and to alter it and redistribute it
9+
freely, subject to the following restrictions:
10+
11+
1. The origin of this software must not be misrepresented; you must not
12+
claim that you wrote the original software. If you use this software
13+
in a product, an acknowledgment in the product documentation would be
14+
appreciated but is not required.
15+
2. Altered source versions must be plainly marked as such, and must not be
16+
misrepresented as being the original software.
17+
3. This notice may not be removed or altered from any source distribution.

assets/mappings/gamecontrollerdb.txt

Lines changed: 2049 additions & 0 deletions
Large diffs are not rendered by default.

assets/mappings/source.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/mdqinc/SDL_GameControllerDB?tab=readme-ov-file

settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@
5858
"move_y_threshold": 0.37,
5959
"rotation_duration_threshold": 500,
6060
"drop_duration_threshold": 200
61+
},
62+
{
63+
"type": "controller",
64+
"drop": "A",
65+
"hold": "B",
66+
"move_down": "DPDown",
67+
"move_left": "DPLeft",
68+
"move_right": "DPRight",
69+
"rotate_left": "LeftShoulder",
70+
"rotate_right": "RightShoulder",
71+
"menu": {
72+
"pause": "Start",
73+
"open_settings": "Guide"
74+
}
6175
}
6276
]
6377
},

0 commit comments

Comments
 (0)