Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling modified version (FORK) #7

Open
erew70 opened this issue Jul 29, 2024 · 11 comments
Open

Error compiling modified version (FORK) #7

erew70 opened this issue Jul 29, 2024 · 11 comments

Comments

@erew70
Copy link

erew70 commented Jul 29, 2024

FORK (have not released the code yet)

the modified code has nothing to do with this its just the compiling itself:

$ make
FileSystem.cpp
main.cpp
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp: In function 'bool led_on()':
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:88:42: error: 'hidGetHandheldMode' was not declared in this scope
88 | rc = hidsysGetUniquePadsFromNpad(hidGetHandheldMode() ? CONTROLLER_HANDHELD : CONTROLLER_PLAYER_1, UniquePadIds, 2, &total_entries);
| ^~~~~~~~~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:88:65: error: 'CONTROLLER_HANDHELD' was not declared in this scope
88 | rc = hidsysGetUniquePadsFromNpad(hidGetHandheldMode() ? CONTROLLER_HANDHELD : CONTROLLER_PLAYER_1, UniquePadIds, 2, &total_entries);
| ^~~~~~~~~~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:88:87: error: 'CONTROLLER_PLAYER_1' was not declared in this scope
88 | rc = hidsysGetUniquePadsFromNpad(hidGetHandheldMode() ? CONTROLLER_HANDHELD : CONTROLLER_PLAYER_1, UniquePadIds, 2, &total_entries);
| ^~~~~~~~~~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:90:104: error: could not convert 'UniquePadIds[i]' from 'u64' {aka 'long unsigned int'} to 'HidsysUniquePadId'
90 | {for(i=0; i<total_entries; i++) { rc = hidsysSetNotificationLedPattern(&pattern, UniquePadIds[i]);}}
| ~~~~~~~~~~~~~~^
| |
| u64 {aka long unsigned int}
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp: In function 'int main(int, char**)':
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:263:13: error: 'hidScanInput' was not declared in this scope
263 | hidScanInput();
| ^~~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:264:33: error: 'CONTROLLER_P1_AUTO' was not declared in this scope
264 | u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:264:21: error: 'hidKeysDown' was not declared in this scope
264 | u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:265:21: error: 'hidKeysHeld' was not declared in this scope
265 | u64 kHeld = hidKeysHeld(CONTROLLER_P1_AUTO);
| ^~~~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:295:29: error: 'KEY_A' was not declared in this scope
295 | if (kDown & KEY_A)
| ^~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:301:30: error: 'KEY_MINUS' was not declared in this scope
301 | if ((kDown & KEY_MINUS || kDown & KEY_PLUS) && (kHeld & KEY_MINUS && kHeld & KEY_PLUS))
| ^~~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:301:51: error: 'KEY_PLUS' was not declared in this scope
301 | if ((kDown & KEY_MINUS || kDown & KEY_PLUS) && (kHeld & KEY_MINUS && kHeld & KEY_PLUS))
| ^~~~~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:308:29: error: 'KEY_B' was not declared in this scope
308 | if (kDown & KEY_B || kDown & KEY_Y || kDown & KEY_X)
| ^~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:308:46: error: 'KEY_Y' was not declared in this scope
308 | if (kDown & KEY_B || kDown & KEY_Y || kDown & KEY_X)
| ^~~~~
C:/Users/jbsmi/Documents/SWITCH-UNBAN-RESEARCH/Lock-Logs/source/main.cpp:308:63: error: 'KEY_X' was not declared in this scope
308 | if (kDown & KEY_B || kDown & KEY_Y || kDown & KEY_X)

@Kronos2308
Copy link
Contributor

The code is made for a previous version of libnx

@Kronos2308
Copy link
Contributor

You have to update the enum of button keys
And the pads that use led on

@erew70
Copy link
Author

erew70 commented Jul 29, 2024

You have to update the enum of button keys And the pads that use led on

So what do you want me to do exactly? I dont really get it. Downgrade libnx?

@Kronos2308
Copy link
Contributor

Mmm I can fix the code is very easy but since is working, I have not touch the code on eons

@Kronos2308
Copy link
Contributor

Btw I remember trying to lock that one to ,but the system gets stuck on switch logo

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

Mmm I can fix the code is very easy but since is working, I have not touch the code on eons

i just compiled it and got it working dw

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

Btw I remember trying to lock that one to ,but the system gets stuck on switch logo

i will look into a0, its just sys info right?

yk what i tried before was encrypting then decrypting but my switch would crash all the time 😅

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

Mmm I can fix the code is very easy but since is working, I have not touch the code on eons

i am having controller issues though the gamepad isnt working
Here is modified main.cpp

by the way i chopped off led because it would be a pain in the ass to rewrite it all

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

Mmm I can fix the code is very easy but since is working, I have not touch the code on eons

i fixed the code nvm gamepad is now working

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

Btw I remember trying to lock that one to ,but the system gets stuck on switch logo

well it works for me and idk why but here is a bug with the revised code:

removes statistics instead of replacing (still works either way tho so its fine to keep it like this)

known bugs with this just in general:

idk if its just me but if you mount the SYSTEM partition on the SD you will notice the same files exist and the posted, data, and statistics are still unmodified. Now i do not think it has nothing to do with this because if you were to empty a1, a2, and a0 with no text in the files, your switch will crash on bootup. So i think it might be fine to leave alone

@erew70
Copy link
Author

erew70 commented Jul 30, 2024

the revised code is now available in the fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants