@@ -98,6 +98,7 @@ static struct {
9898 GUI_Widget * screenshot ;
9999 GUI_Widget * alt_boot ;
100100 GUI_Widget * alt_read ;
101+ GUI_Widget * use_gpio ;
101102
102103 GUI_Widget * device ;
103104 GUI_Widget * fw_browser ;
@@ -599,6 +600,10 @@ void isoLoader_MakeShortcut(GUI_Widget *widget) {
599600 strcat (cmd , boot_file );
600601 }
601602
603+ if (GUI_WidgetGetState (self .use_gpio )) {
604+ strcat (cmd , " --gpio" );
605+ }
606+
602607 fprintf (fd , "%s\n" , cmd );
603608 fprintf (fd , "console --show\n" );
604609 fclose (fd );
@@ -1290,6 +1295,10 @@ void isoLoader_Run(GUI_Widget *widget) {
12901295 isoldr_set_boot_file (self .isoldr , filepath , ALT_BOOT_FILE );
12911296 }
12921297
1298+ if (GUI_WidgetGetState (self .use_gpio )) {
1299+ self .isoldr -> use_gpio = 1 ;
1300+ }
1301+
12931302 isoldr_exec (self .isoldr , addr );
12941303
12951304 /* If we there, then something wrong... */
@@ -1564,6 +1573,7 @@ void isoLoader_DefaultPreset() {
15641573 GUI_WidgetSetState (self .low , 0 );
15651574 isoLoader_toggleVMU (self .vmu_disabled );
15661575 GUI_WidgetSetState (self .screenshot , 0 );
1576+ GUI_WidgetSetState (self .use_gpio , 0 );
15671577
15681578 GUI_WidgetSetState (self .os_chk [BIN_TYPE_AUTO ], 1 );
15691579 isoLoader_toggleOS (self .os_chk [BIN_TYPE_AUTO ]);
@@ -1723,13 +1733,13 @@ int isoLoader_SavePreset(GUI_Widget *widget) {
17231733 snprintf (result , sizeof (result ),
17241734 "title = %s\ndevice = %s\ndma = %d\nasync = %d\ncdda = %08lx\n"
17251735 "irq = %d\nlow = %d\nheap = %08lx\nfastboot = %d\ntype = %d\nmode = %d\nmemory = %s\n"
1726- "vmu = %d\nscrhotkey = %lx\naltread = %d\n"
1736+ "vmu = %d\nscrhotkey = %lx\naltread = %d\ngpio = %d\ n"
17271737 "pa1 = %08lx\npv1 = %08lx\npa2 = %08lx\npv2 = %08lx\n" ,
17281738 title , GUI_TextEntryGetText (self .device ), GUI_WidgetGetState (self .dma ), async ,
17291739 cdda_mode , GUI_WidgetGetState (self .irq ), GUI_WidgetGetState (self .low ), heap ,
17301740 GUI_WidgetGetState (self .fastboot ), type , mode , memory ,
17311741 vmu_num , (uint32 )(GUI_WidgetGetState (self .screenshot ) ? SCREENSHOT_HOTKEY : 0 ),
1732- GUI_WidgetGetState (self .alt_read ),
1742+ GUI_WidgetGetState (self .alt_read ), GUI_WidgetGetState ( self . use_gpio ),
17331743 self .pa [0 ], self .pv [0 ], self .pa [1 ], self .pv [1 ]);
17341744
17351745 if (GUI_WidgetGetState (self .alt_boot )) {
@@ -1767,7 +1777,7 @@ int isoLoader_LoadPreset(GUI_Widget *widget) {
17671777 return -1 ;
17681778 }
17691779
1770- int use_dma = 0 , emu_async = 16 , use_irq = 0 , alt_read = 0 ;
1780+ int use_dma = 0 , emu_async = 16 , use_irq = 0 , alt_read = 0 , use_gpio = 0 ;
17711781 int fastboot = 0 , low = 0 , emu_vmu = 0 , scr_hotkey = 0 ;
17721782 int boot_mode = BOOT_MODE_DIRECT ;
17731783 int bin_type = BIN_TYPE_AUTO ;
@@ -1792,6 +1802,7 @@ int isoLoader_LoadPreset(GUI_Widget *widget) {
17921802 { "low" , CONF_INT , (void * ) & low },
17931803 { "vmu" , CONF_INT , (void * ) & emu_vmu },
17941804 { "scrhotkey" ,CONF_INT , (void * ) & scr_hotkey },
1805+ { "gpio" , CONF_INT , (void * ) & use_gpio },
17951806 { "heap" , CONF_STR , (void * ) & heap_memory },
17961807 { "memory" , CONF_STR , (void * ) memory },
17971808 { "async" , CONF_INT , (void * ) & emu_async },
@@ -1837,6 +1848,7 @@ int isoLoader_LoadPreset(GUI_Widget *widget) {
18371848 GUI_WidgetSetState (self .irq , use_irq );
18381849 GUI_WidgetSetState (self .screenshot , scr_hotkey ? 1 : 0 );
18391850 GUI_WidgetSetState (self .low , low );
1851+ GUI_WidgetSetState (self .use_gpio , use_gpio );
18401852
18411853 if (emu_vmu ) {
18421854 char num [8 ], fn [32 ];
@@ -2068,6 +2080,7 @@ void isoLoader_Init(App_t *app) {
20682080 self .vmu_priv_1mb = APP_GET_WIDGET ("vmu-priv-1mb-checkbox" );
20692081 self .screenshot = APP_GET_WIDGET ("screenshot-checkbox" );
20702082 self .alt_boot = APP_GET_WIDGET ("alt-boot-checkbox" );
2083+ self .use_gpio = APP_GET_WIDGET ("gpio-checkbox" );
20712084
20722085 self .options_panel = APP_GET_WIDGET ("options-panel" );
20732086 self .wpa [0 ] = APP_GET_WIDGET ("pa1-text" );
0 commit comments