Skip to content

Commit 396c403

Browse files
Merge pull request #191 from pawndev/feat/minui/zero28-mapping
Feat/minui/zero28 mapping
2 parents fe7b9a0 + 989bfe7 commit 396c403

4 files changed

Lines changed: 39 additions & 4 deletions

File tree

app/setup.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ func initFramework(currentCFW cfw.CFW) {
107107
if currentCFW == cfw.Spruce && spruce.DetectDevice() == spruce.DeviceA30 {
108108
orientation = gaba.OrientationRotate270
109109
}
110+
if currentCFW == cfw.MinUI && minui.DetectDevice() == minui.DeviceZero28 {
111+
orientation = gaba.OrientationRotate90
112+
}
110113

111114
gaba.Init(gaba.Options{
112115
WindowTitle: "Grout",

cfw/minui/input_mappings.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type Device string
1919
const (
2020
DeviceMiyoo Device = "miyoo"
2121
DeviceAnbernic Device = "anbernic"
22+
DeviceZero28 Device = "zero28"
2223
DeviceGeneric Device = "generic"
2324
)
2425

@@ -35,6 +36,9 @@ func DetectDevice() Device {
3536
if err == nil && strings.Contains(string(compatible), "allwinner,h616") {
3637
return DeviceAnbernic
3738
}
39+
if err == nil && strings.Contains(string(compatible), "allwinner,a133") {
40+
return DeviceZero28
41+
}
3842

3943
// TODO discover if Miyoo Flip and Others are fine with standard config
4044
// TrimUI (a133p), Miyoo Flip (potentially idk don't own one), and others use standard SDL controller input
@@ -50,6 +54,8 @@ func GetInputMappingBytes() ([]byte, error) {
5054
filename = "input_mappings/miyoo.json"
5155
case DeviceAnbernic:
5256
filename = "input_mappings/anbernic.json"
57+
case DeviceZero28:
58+
filename = "input_mappings/zero28.json"
5359
default:
5460
return nil, nil
5561
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"keyboard_map": {},
3+
"controller_button_map": {
4+
"0": 5,
5+
"1": 6,
6+
"10": 11,
7+
"2": 7,
8+
"3": 8,
9+
"4": 14,
10+
"6": 13,
11+
"9": 9
12+
},
13+
"controller_hat_map": {},
14+
"joystick_axis_map": {},
15+
"joystick_button_map": {
16+
"13": 1,
17+
"14": 3,
18+
"15": 4,
19+
"16": 2,
20+
"19": 15,
21+
"6": 10,
22+
"7": 12
23+
},
24+
"joystick_hat_map": {}
25+
}

docs/getting-started/install-minui.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ This guide will help you install Grout on devices running [MinUI][minui].
66

77
Grout has been tested on the following devices running MinUI:
88

9-
| Manufacturer | Device |
10-
|--------------|---------------|
11-
| Miyoo | A30 |
12-
| Miyoo | Mini Plus |
9+
| Manufacturer | Device |
10+
|--------------|-------------|
11+
| Miyoo | A30 |
12+
| Miyoo | Mini Plus |
13+
| Magicx | Mini Zero28 |
1314

1415
_Please help verify compatibility on other devices by reporting your results!_
1516

0 commit comments

Comments
 (0)