File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
AquaMai.Mods/GameSystem/MaimollerIO Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -116,11 +116,13 @@ public class MaimollerIO
116116 zh : "当混用 Maimoller 与其他协议并且 Maimoller 在 2P 上,而且 Maimoller 无法正常使用时开启" ) ]
117117 private static readonly bool alternative2p = false ;
118118
119- private static readonly MaimollerDevice [ ] _devices = [ .. Enumerable . Range ( 0 , 2 ) . Select ( i => new MaimollerDevice ( i , alternative2p ) ) ] ;
120- private static readonly MaimollerLedManager [ ] _ledManagers = [ .. Enumerable . Range ( 0 , 2 ) . Select ( i => new MaimollerLedManager ( _devices [ i ] . output ) ) ] ;
119+ private static MaimollerDevice [ ] _devices ;
120+ private static MaimollerLedManager [ ] _ledManagers ;
121121
122122 public static void OnBeforePatch ( )
123123 {
124+ _devices = [ .. Enumerable . Range ( 0 , 2 ) . Select ( i => new MaimollerDevice ( i , alternative2p ) ) ] ;
125+ _ledManagers = [ .. Enumerable . Range ( 0 , 2 ) . Select ( i => new MaimollerLedManager ( _devices [ i ] . output ) ) ] ;
124126 for ( int i = 0 ; i < 2 ; i ++ )
125127 {
126128 if ( ! ShouldInitForPlayer ( i ) ) continue ;
You can’t perform that action at this time.
0 commit comments