Add ability to list connected joysticks (to fix issues with udev rules on Linux)
Some checks failed
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 Win32 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 x64 os:windows-2022]) (push) Has been cancelled
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 -DCMAKE_PARALLEL_MSVC=TRUE name:Windows VS2022 ARM os:windows-2022]) (push) Has been cancelled
CD / Create Pi Mono Setup (push) Has been cancelled
CD / Publishing (push) Has been cancelled

This commit is contained in:
Lorenzooone
2025-09-19 20:58:07 +02:00
parent 35dcc1291c
commit f1e305c303
7 changed files with 54 additions and 26 deletions

View File

@@ -33,6 +33,7 @@ struct override_all_data {
override_win_data override_top_data;
override_win_data override_bot_data;
bool disable_frame_blending = false;
bool print_controller_list = false;
bool no_audio = false;
int volume = DEFAULT_NO_VOLUME_VALUE;
bool always_prevent_mouse_showing = false;
@@ -599,6 +600,9 @@ static int mainVideoOutputCall(AudioData* audio_data, CaptureData* capture_data,
SuccessConnectionOutTextGenerator(out_text_data, capture_data);
int no_data_consecutive = 0;
if(override_data.print_controller_list)
joystick_print_all();
while(capture_data->status.running) {
bool polled = false;
@@ -883,6 +887,8 @@ int main(int argc, char **argv) {
continue;
if(parse_existence_arg(i, argv, override_data.auto_save, false, "--no_auto_save"))
continue;
if(parse_existence_arg(i, argv, override_data.print_controller_list, true, "--list_joysticks"))
continue;
#ifdef RASPI
if(parse_int_arg(i, argc, argv, page_up_id, "--pi_select"))
continue;
@@ -934,6 +940,7 @@ int main(int argc, char **argv) {
ActualConsoleOutText(" instead of the default one. When the program closes,");
ActualConsoleOutText(" the data is also saved to the specified profile.");
ActualConsoleOutText(" --no_auto_save Disables automatic save when closing the software.");
ActualConsoleOutText(" --list_joysticks Prints a list of all the detected joysticks.");
#ifdef RASPI
ActualConsoleOutText(" --pi_select ID Specifies ID for the select GPIO button.");
ActualConsoleOutText(" --pi_menu ID Specifies ID for the menu GPIO button.");