Open TheComet opened 3 years ago
Yeah, there was a recent libnx release that has breaking changes relating to HID. UMM will need to be updated to compile with latest libnx. Not sure if/when I'll get around to that myself. Compiling with older versions of libnx should still work fine.
❯ make
main.cpp
In file included from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:9,
from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:8:
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h: In function 'void vibrateFor(HidVibrationValue, u32*, s64)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:276:26: error: cannot convert 'u32*' {aka 'unsigned int*'} to 'const HidVibrationDeviceHandle*'
276 | hidSendVibrationValues(VibrationDeviceHandle, VibrationValues, 2);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| u32* {aka unsigned int*}
In file included from /opt/devkitpro/libnx/include/switch.h:83,
from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:7:
/opt/devkitpro/libnx/include/switch/services/hid.h:1738:63: note: initializing argument 1 of 'Result hidSendVibrationValues(const HidVibrationDeviceHandle*, const HidVibrationValue*, s32)'
1738 | Result hidSendVibrationValues(const HidVibrationDeviceHandle *handles, const HidVibrationValue *values, s32 count);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:9,
from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:8:
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:282:26: error: cannot convert 'u32*' {aka 'unsigned int*'} to 'const HidVibrationDeviceHandle*'
282 | hidSendVibrationValues(VibrationDeviceHandle, VibrationValues, 2);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| u32* {aka unsigned int*}
In file included from /opt/devkitpro/libnx/include/switch.h:83,
from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:7:
/opt/devkitpro/libnx/include/switch/services/hid.h:1738:63: note: initializing argument 1 of 'Result hidSendVibrationValues(const HidVibrationDeviceHandle*, const HidVibrationValue*, s32)'
1738 | Result hidSendVibrationValues(const HidVibrationDeviceHandle *handles, const HidVibrationValue *values, s32 count);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:9,
from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:8:
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h: In function 'void shortVibratePattern()':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:295:31: error: 'CONTROLLER_PLAYER_1' was not declared in this scope
295 | if(hidIsControllerConnected(CONTROLLER_PLAYER_1)) {
| ^~~~~~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:295:6: error: 'hidIsControllerConnected' was not declared in this scope; did you mean 'hidIsUsbFullKeyControllerConnected'?
295 | if(hidIsControllerConnected(CONTROLLER_PLAYER_1)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
| hidIsUsbFullKeyControllerConnected
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:296:82: error: 'hidGetControllerType' was not declared in this scope; did you mean 'SetSysControllerType'?
296 | hidInitializeVibrationDevices(VibrationDeviceHandle, 2, CONTROLLER_PLAYER_1, hidGetControllerType(CONTROLLER_PLAYER_1));
| ^~~~~~~~~~~~~~~~~~~~
| SetSysControllerType
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:299:61: error: 'CONTROLLER_HANDHELD' was not declared in this scope
299 | hidInitializeVibrationDevices(VibrationDeviceHandle, 2, CONTROLLER_HANDHELD, TYPE_HANDHELD);
| ^~~~~~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/utils.h:299:82: error: 'TYPE_HANDHELD' was not declared in this scope
299 | hidInitializeVibrationDevices(VibrationDeviceHandle, 2, CONTROLLER_HANDHELD, TYPE_HANDHELD);
| ^~~~~~~~~~~~~
In file included from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:8:
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h: In function 'void dumperMainLoop(int)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:221:29: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
221 | u64 kHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:221:17: error: 'hidKeysHeld' was not declared in this scope
221 | u64 kHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:222:17: error: 'KEY_X' was not declared in this scope
222 | if (kDown & KEY_X)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:224:20: error: 'KEY_R' was not declared in this scope
224 | if(kHeld & KEY_R) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:251:17: error: 'KEY_Y' was not declared in this scope
251 | if (kDown & KEY_Y) exfat = true;
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:252:17: error: 'KEY_A' was not declared in this scope
252 | if (kDown & KEY_A) exfat = false;
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:253:18: error: 'KEY_A' was not declared in this scope
253 | if ((kDown & KEY_A || kDown & KEY_Y) && !dump_done)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:253:35: error: 'KEY_Y' was not declared in this scope
253 | if ((kDown & KEY_A || kDown & KEY_Y) && !dump_done)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:255:20: error: 'KEY_R' was not declared in this scope
255 | if(kHeld & KEY_R)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/dumper.h:283:17: error: 'KEY_B' was not declared in this scope
283 | if (kDown & KEY_B) {
| ^~~~~
In file included from /run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:9:
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h: In function 'void load_mods(FILE*)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:338:39: error: 'ApmCpuBoostMode_Type1' was not declared in this scope; did you mean 'ApmCpuBoostMode_Type2'?
338 | appletSetCpuBoostMode(ApmCpuBoostMode_Type1);
| ^~~~~~~~~~~~~~~~~~~~~
| ApmCpuBoostMode_Type2
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:340:39: error: 'ApmCpuBoostMode_Disabled' was not declared in this scope; did you mean 'ApmCpuBoostMode_FastLoad'?
340 | appletSetCpuBoostMode(ApmCpuBoostMode_Disabled);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| ApmCpuBoostMode_FastLoad
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h: In function 'void modInstallerMainLoop(int)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:479:29: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
479 | u64 kHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:479:17: error: 'hidKeysHeld' was not declared in this scope
479 | u64 kHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:482:20: error: 'KEY_RSTICK_DOWN' was not declared in this scope
482 | if(kHeld & KEY_RSTICK_DOWN) {
| ^~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:483:24: error: 'KEY_RSTICK' was not declared in this scope
483 | if(kHeld & KEY_RSTICK)
| ^~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:489:20: error: 'KEY_RSTICK_UP' was not declared in this scope
489 | if(kHeld & KEY_RSTICK_UP) {
| ^~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:490:24: error: 'KEY_RSTICK' was not declared in this scope
490 | if(kHeld & KEY_RSTICK)
| ^~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:496:20: error: 'KEY_ZR' was not declared in this scope
496 | if(kDown & KEY_ZR) {
| ^~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:503:20: error: 'KEY_DDOWN' was not declared in this scope
503 | if(kDown & KEY_DDOWN || kDown & KEY_LSTICK_DOWN)
| ^~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:503:41: error: 'KEY_LSTICK_DOWN' was not declared in this scope
503 | if(kDown & KEY_DDOWN || kDown & KEY_LSTICK_DOWN)
| ^~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:505:25: error: 'KEY_DUP' was not declared in this scope
505 | else if(kDown & KEY_DUP || kDown & KEY_LSTICK_UP)
| ^~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:505:44: error: 'KEY_LSTICK_UP' was not declared in this scope
505 | else if(kDown & KEY_DUP || kDown & KEY_LSTICK_UP)
| ^~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:510:20: error: 'KEY_Y' was not declared in this scope
510 | if(kDown & KEY_Y) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:511:24: error: 'KEY_L' was not declared in this scope
511 | if(kHeld & KEY_L && kHeld & KEY_R)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:511:41: error: 'KEY_R' was not declared in this scope
511 | if(kHeld & KEY_L && kHeld & KEY_R)
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:516:25: error: 'KEY_A' was not declared in this scope
516 | else if(kDown & KEY_A) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:599:16: error: 'KEY_B' was not declared in this scope
599 | if(kDown & KEY_B) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:617:16: error: 'KEY_X' was not declared in this scope
617 | if(kDown & KEY_X) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:620:16: error: 'KEY_L' was not declared in this scope
620 | if(kHeld & KEY_L && kHeld & KEY_R && kDown & KEY_MINUS) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:620:33: error: 'KEY_R' was not declared in this scope
620 | if(kHeld & KEY_L && kHeld & KEY_R && kDown & KEY_MINUS) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/mod_installer.h:620:50: error: 'KEY_MINUS' was not declared in this scope
620 | if(kHeld & KEY_L && kHeld & KEY_R && kDown & KEY_MINUS) {
| ^~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp: In function 'void mainMenuLoop(int)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:18:17: error: 'KEY_A' was not declared in this scope
18 | if (kDown & KEY_A) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:25:22: error: 'KEY_X' was not declared in this scope
25 | else if (kDown & KEY_X) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:31:22: error: 'KEY_Y' was not declared in this scope
31 | else if (kDown & KEY_Y) {
| ^~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp: In function 'int main(int, char**)':
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:62:9: error: 'hidScanInput' was not declared in this scope
62 | hidScanInput();
| ^~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:64:33: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
64 | u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:64:21: error: 'hidKeysDown' was not declared in this scope
64 | u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~
/run/media/rozlav/ext4/JEEJ/EMULATION/SWITCH/mods/UMM-romfs/UltimateModManager/source/main.cpp:66:20: error: 'KEY_PLUS' was not declared in this scope
66 | if(kDown & KEY_PLUS) break; // break in order to return to hbmenu
| ^~~~~~~~
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:14: main.o] Error 1
make: *** [Makefile:166: build] Error 2
Same here I guess, libnx is 4.2.0-1
12 dkp-linux/uam 1.1.0-1 (762.8 KiB 2.3 MiB) [switch-dev] (Installed)
deko3d shader compiler for Nintendo Switch
11 dkp-linux/switch-tools 1.11.1-1 (82.9 KiB 282.9 KiB) [switch-dev] (Installed)
Tools for Nintendo Switch homebrew development)
10 dkp-linux/general-tools 1.2.0-2 (21.5 KiB 97.0 KiB) [gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev switch-dev gamecube-dev wii-dev wiiu-dev] (Installed)
Tools for homebrew development)
9 dkp-linux/devkitA64-gdb 11.2-1 (3.1 MiB 12.3 MiB) [switch-dev] (Installed)
gnu debugger for devkitA64
8 dkp-linux/devkitA64 r18-8 (53.3 MiB 251.4 MiB) [switch-dev] (Installed)
Toolchain for Nintendo Switch homebrew development
7 dkp-linux/devkit-env 1.0.1-2 (2.1 KiB 13.0 KiB) [gp32-dev gba-dev nds-dev 3ds-dev gamecube-dev wii-dev wiiu-dev switch-dev] (Installed)
environment settings for devkitPro supplied tools
6 dkp-libs/switch-pkg-config 0.28-4 (2.5 KiB 25.0 KiB) [switch-dev] (Installed)
pkg-config wrapper (for Nintendo Switch homebrew development)
5 dkp-libs/switch-examples 20201219-1 (652.8 KiB 3.0 MiB) [switch-dev] (Installed)
Nintendo Switch example code.
4 dkp-libs/switch-cmake 1.3.0-1 (4.0 KiB 5.4 KiB) [switch-dev] (Installed)
CMake support for Nintendo Switch
3 dkp-libs/libnx 4.2.0-1 (7.3 MiB 68.1 MiB) [switch-dev] (Installed)
Nintendo Switch AArch64-only userland library.
2 dkp-libs/devkita64-cmake 1.1.1-1 (2.3 KiB 246.0 B) [switch-dev] (Installed)
CMake support files for devkitA64
1 dkp-libs/deko3d 0.4.0-1 (924.3 KiB 7.3 MiB) [switch-dev] (Installed)
Homebrew low level graphics API for Nintendo Switch (Nvidia Tegra X1)
Is it the same problem here ? Which libnx version should I use ?
I tried to compile 1.4.0, 1.5.0 and master but get pretty much the same errors: