@@ -138,6 +138,14 @@ void GuiGamesView::initLUA() {
138
138
luaSetTableIntField (L, " LANG_DUTCH" , NIN_LAN_DUTCH);
139
139
lua_settable (L, -3 );
140
140
141
+ // Create GamesView.hiidra table
142
+ lua_pushstring (L, " hiidra" );
143
+ lua_newtable (L);
144
+ luaSetTableIntField (L, " PADREAD_AUTO" , HIIDRA_PADREAD_AUTO);
145
+ luaSetTableIntField (L, " PADREAD_BYPASS" , HIIDRA_PADREAD_BYPASS);
146
+ luaSetTableIntField (L, " PADREAD_REDIRECT" , HIIDRA_PADREAD_REDIRECT);
147
+ lua_settable (L, -3 );
148
+
141
149
// Create GamesView.GC2Wiimote
142
150
lua_pushstring (L, " GC2Wiimote" );
143
151
lua_newtable (L);
@@ -242,6 +250,8 @@ void GuiGamesView::openGameConfig(u32 idx) {
242
250
gameConfig.setValue (" Enable GC2Wiimote" , 0 );
243
251
if (!gameConfig.getValue (" Patch MX chip" , &tempVal))
244
252
gameConfig.setValue (" Patch MX chip" , 0 );
253
+ if (!gameConfig.getValue (" PADRead mode" , &tempVal))
254
+ gameConfig.setValue (" PADRead mode" , HIIDRA_PADREAD_AUTO);
245
255
if (!gameConfig.getValue (" Enable Cheats" , &tempVal))
246
256
gameConfig.setValue (" Enable Cheats" , 0 );
247
257
break ;
@@ -255,6 +265,8 @@ void GuiGamesView::openGameConfig(u32 idx) {
255
265
gameConfig.setValue (" Enable GC2Wiimote" , 0 );
256
266
if (!gameConfig.getValue (" Patch MX chip" , &tempVal))
257
267
gameConfig.setValue (" Patch MX chip" , 0 );
268
+ if (!gameConfig.getValue (" PADRead mode" , &tempVal))
269
+ gameConfig.setValue (" PADRead mode" , HIIDRA_PADREAD_AUTO);
258
270
if (!gameConfig.getValue (" Enable Cheats" , &tempVal))
259
271
gameConfig.setValue (" Enable Cheats" , 0 );
260
272
break ;
@@ -268,6 +280,8 @@ void GuiGamesView::openGameConfig(u32 idx) {
268
280
gameConfig.setValue (" Enable GC2Wiimote" , 0 );
269
281
if (!gameConfig.getValue (" Patch MX chip" , &tempVal))
270
282
gameConfig.setValue (" Patch MX chip" , 0 );
283
+ if (!gameConfig.getValue (" PADRead mode" , &tempVal))
284
+ gameConfig.setValue (" PADRead mode" , HIIDRA_PADREAD_AUTO);
271
285
if (!gameConfig.getValue (" Enable Cheats" , &tempVal))
272
286
gameConfig.setValue (" Enable Cheats" , 0 );
273
287
break ;
@@ -580,6 +594,10 @@ int GuiGamesView::lua_bootGame(lua_State* L) {
580
594
thisView->gameConfig .getValue (" Patch MX chip" , &tempVal);
581
595
if (tempVal)
582
596
cfg.Config |= HIIDRA_CFG_PATCHMX;
597
+
598
+ tempVal = HIIDRA_PADREAD_AUTO;
599
+ thisView->gameConfig .getValue (" PADRead mode" , &tempVal);
600
+ cfg.PADReadMode = tempVal;
583
601
584
602
// Handle cheats
585
603
tempVal = 0 ;
@@ -720,6 +738,10 @@ int GuiGamesView::lua_bootGame(lua_State* L) {
720
738
thisView->gameConfig .getValue (" Patch MX chip" , &tempVal);
721
739
if (tempVal)
722
740
cfg.Config |= HIIDRA_CFG_PATCHMX;
741
+
742
+ tempVal = HIIDRA_PADREAD_AUTO;
743
+ thisView->gameConfig .getValue (" PADRead mode" , &tempVal);
744
+ cfg.PADReadMode = tempVal;
723
745
724
746
// Handle cheats
725
747
tempVal = 0 ;
@@ -777,6 +799,10 @@ int GuiGamesView::lua_bootGame(lua_State* L) {
777
799
thisView->gameConfig .getValue (" Patch MX chip" , &tempVal);
778
800
if (tempVal)
779
801
cfg.Config |= HIIDRA_CFG_PATCHMX;
802
+
803
+ tempVal = HIIDRA_PADREAD_AUTO;
804
+ thisView->gameConfig .getValue (" PADRead mode" , &tempVal);
805
+ cfg.PADReadMode = tempVal;
780
806
781
807
// Handle cheats
782
808
tempVal = 0 ;
0 commit comments