| 1 | // SPDX-FileCopyrightText: 2009 Ingo Ruhnke <[email protected]>cxx . . $ `<file>/src/joystick_config_files.hpp`/ |
| 2 | // SPDX-FileCopyrightText: 2025 Raphael Rosch <[email protected]> |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef HEADER_JSTEST_GTK_JOYSTICK_CONFIG_FILES_HPP |
| 6 | #define HEADER_JSTEST_GTK_JOYSTICK_CONFIG_FILES_HPPcxx . . $ `src/joystick_config_files.hpp:6:9`! |
| 7 | |
| 8 | #include <iostream> |
| 9 | #include <fstream> |
| 10 | #include <sstream> |
| 11 | #include <unordered_map> |
| 12 | |
| 13 | #include <vector> |
| 14 | #include <string> |
| 15 | |
| 16 | #include <dirent.h> |
| 17 | // #include <filesystem> |
| 18 | |
| 19 | // namespace fs = std::filesystem; |
| 20 | |
| 21 | struct JoystickConfigcxx . . $ JoystickConfig# { |
| 22 | stdcxx . . $ std/::unordered_mapcxx . . $ std/unordered_map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> valuescxx . . $ JoystickConfig#values.; |
| 23 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> usb_idscxx . . $ JoystickConfig#usb_ids.; |
| 24 | stdcxx . . $ std/::stringcxx . . $ std/string# icon_filenamecxx . . $ JoystickConfig#icon_filename.; |
| 25 | stdcxx . . $ std/::stringcxx . . $ std/string# js_typecxx . . $ JoystickConfig#js_type.; |
| 26 | bool icon_filename_is_goodcxx . . $ JoystickConfig#icon_filename_is_good. = false; |
| 27 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> axescxx . . $ JoystickConfig#axes.; |
| 28 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> buttonscxx . . $ JoystickConfig#buttons.; |
| 29 | int button_maxlencxx . . $ JoystickConfig#button_maxlen. = 0; |
| 30 | }; |
| 31 | |
| 32 | |
| 33 | JoystickConfigcxx . . $ JoystickConfig# load_configcxx . . $ load_config(846110c2b27fd439).(const stdcxx . . $ std/::stringcxx . . $ std/string#& filename); |
| 34 | JoystickConfigcxx . . $ JoystickConfig# get_config_for_usb_idcxx . . $ get_config_for_usb_id(846110c2b27fd439).(const stdcxx . . $ std/::stringcxx . . $ std/string#& usb_id); |
| 35 | |
| 36 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<JoystickConfigcxx . . $ JoystickConfig#> load_all_configscxx . . $ load_all_configs(dd0b087177d19225).(const stdcxx . . $ std/::stringcxx . . $ std/string#& directory); |
| 37 | |
| 38 | extern stdcxx . . $ std/::vectorcxx . . $ std/vector#<JoystickConfigcxx . . $ JoystickConfig#> joystick_configscxx . . $ joystick_configs.; |
| 39 | |
| 40 | |
| 41 | |
| 42 | #endif |
| 43 | |
| 44 | /* EOF */ |