|
12 | 12 | #define PRO2HOOK_OPTIONS_STR_PATCH_PIUIO_EMU_LIB "patch.piuio.emu_lib" |
13 | 13 | #define PRO2HOOK_OPTIONS_STR_PATCH_PIUIO_EXIT_TEST_SERV \ |
14 | 14 | "patch.piuio_exit.test_serv" |
| 15 | +#define PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P1_BUS_PORT \ |
| 16 | + "patch.usb_profile.p1.bus_port" |
| 17 | +#define PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P2_BUS_PORT \ |
| 18 | + "patch.usb_profile.p2.bus_port" |
| 19 | +#define PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_DEV_NODES \ |
| 20 | + "patch.usb_profile.dev_nodes" |
15 | 21 | #define PRO2HOOK_OPTIONS_STR_PATCH_X11_EVENT_LOOP_INPUT_HANDLER \ |
16 | 22 | "patch_x11_event_loop.input_handler_lib" |
17 | 23 | #define PRO2HOOK_OPTIONS_STR_PATCH_X11_EVENT_LOOP_INPUT_HANDLER2 \ |
@@ -94,6 +100,36 @@ const struct util_options_def pro2hook_options_def[] = { |
94 | 100 | .is_secret_data = false, |
95 | 101 | .default_value.b = false, |
96 | 102 | }, |
| 103 | + { |
| 104 | + .name = PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P1_BUS_PORT, |
| 105 | + .description = "Bus and port (format: X-X, e.g. 1-2) of the USB slot " |
| 106 | + "to assign to Player 1 when a USB thumb " |
| 107 | + "drive is plugged in", |
| 108 | + .param = 'a', |
| 109 | + .type = UTIL_OPTIONS_TYPE_STR, |
| 110 | + .is_secret_data = false, |
| 111 | + .default_value.str = NULL, |
| 112 | + }, |
| 113 | + { |
| 114 | + .name = PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P2_BUS_PORT, |
| 115 | + .description = "Bus and port (format: X-X, e.g. 1-2) of the USB slot " |
| 116 | + "to assign to Player 2 when a USB thumb " |
| 117 | + "drive is plugged in", |
| 118 | + .param = 'k', |
| 119 | + .type = UTIL_OPTIONS_TYPE_STR, |
| 120 | + .is_secret_data = false, |
| 121 | + .default_value.str = NULL, |
| 122 | + }, |
| 123 | + { |
| 124 | + .name = PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_DEV_NODES, |
| 125 | + .description = "Device nodes of plugged in USB thumb drives to " |
| 126 | + "consider for mounting for usb profiles, format: " |
| 127 | + "sdX,sdY e.g. sde,sdf", |
| 128 | + .param = 't', |
| 129 | + .type = UTIL_OPTIONS_TYPE_STR, |
| 130 | + .is_secret_data = false, |
| 131 | + .default_value.str = NULL, |
| 132 | + }, |
97 | 133 | { |
98 | 134 | .name = PRO2HOOK_OPTIONS_STR_PATCH_X11_EVENT_LOOP_INPUT_HANDLER, |
99 | 135 | .description = "Path to a library implementing the x11-input-handler " |
@@ -172,6 +208,12 @@ bool pro2hook_options_init( |
172 | 208 | options_opt, PRO2HOOK_OPTIONS_STR_PATCH_PIUIO_EMU_LIB); |
173 | 209 | options->patch.piuio.exit_test_serv = util_options_get_bool( |
174 | 210 | options_opt, PRO2HOOK_OPTIONS_STR_PATCH_PIUIO_EXIT_TEST_SERV); |
| 211 | + options->patch.usb_profile.device_nodes = util_options_get_str( |
| 212 | + options_opt, PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_DEV_NODES); |
| 213 | + options->patch.usb_profile.p1_bus_port = util_options_get_str( |
| 214 | + options_opt, PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P1_BUS_PORT); |
| 215 | + options->patch.usb_profile.p2_bus_port = util_options_get_str( |
| 216 | + options_opt, PRO2HOOK_OPTIONS_STR_PATCH_USB_PROFILE_P2_BUS_PORT); |
175 | 217 | options->patch.x11_event_loop.api_lib = util_options_get_str( |
176 | 218 | options_opt, PRO2HOOK_OPTIONS_STR_PATCH_X11_EVENT_LOOP_INPUT_HANDLER); |
177 | 219 | options->patch.x11_event_loop.api_lib2 = util_options_get_str( |
|
0 commit comments