File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "grout/cfw/koriki"
99 "grout/cfw/minui"
1010 "grout/cfw/muos"
11+ "grout/cfw/nextui"
1112 "grout/cfw/onion"
1213 "grout/cfw/rocknix"
1314 "grout/cfw/spruce"
@@ -118,7 +119,8 @@ func initFramework(currentCFW cfw.CFW) {
118119 gabaOptions .DisplayOrientation = gaba .OrientationRotate90
119120 }
120121
121- if currentCFW == cfw .MinUI && minui .DetectDevice () == minui .DeviceMiyooFlip {
122+ if (currentCFW == cfw .MinUI && minui .DetectDevice () == minui .DeviceMiyooFlip ) ||
123+ (currentCFW == cfw .NextUI && nextui .DetectDevice () == nextui .DeviceMiyooFlip ) {
122124 gabaOptions .DisabledInputSources = gaba.DisabledInputSources {
123125 Keyboard : true ,
124126 Joystick : true ,
Original file line number Diff line number Diff line change 1+ package nextui
2+
3+ import (
4+ "os"
5+ "runtime"
6+
7+ gaba "github.com/BrandonKowalski/gabagool/v2/pkg/gabagool"
8+ )
9+
10+ const DeviceType = "NEXTUI_DEVICE"
11+
12+ type Device string
13+
14+ const (
15+ DeviceMiyooFlip Device = "miyooflip"
16+ DeviceTrimui Device = "trimui"
17+ DeviceGeneric Device = "generic"
18+ )
19+
20+ func detectDeviceByEnv () Device {
21+ logger := gaba .GetLogger ()
22+ logger .Debug ("Detecting NextUI device type" , "env" , DeviceType )
23+ deviceType := os .Getenv (DeviceType )
24+
25+ switch deviceType {
26+ case "tg5040" , "tg5050" :
27+ return DeviceTrimui
28+ case "my355" :
29+ return DeviceMiyooFlip
30+ default :
31+ logger .Warn ("Unknown NextUI device type" , "value" , deviceType )
32+ return DeviceGeneric
33+ }
34+ }
35+
36+ func DetectDevice () Device {
37+ logger := gaba .GetLogger ()
38+ logger .Debug ("Detecting NextUI device type" , "arch" , runtime .GOARCH )
39+
40+ deviceType := detectDeviceByEnv ()
41+ switch deviceType {
42+ case DeviceMiyooFlip :
43+ return deviceType
44+ }
45+
46+ return DeviceGeneric
47+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ if [ -d ".update" ]; then
99fi
1010
1111export CFW=NEXTUI
12+ # This $PLATFORM is automatically set by NextUI, we map it another variable just to remember where it comes from.
13+ export NEXTUI_DEVICE=" $PLATFORM "
1214export LD_LIBRARY_PATH=$CUR_DIR /lib:$LD_LIBRARY_PATH
1315
1416./grout
You can’t perform that action at this time.
0 commit comments