Closed Bluebotlabz closed 3 years ago
I am getting the same, but only with the binary from github. There are a couple of other binaries around in the discord channels, and with those the same code just produces a black screen and hangs the 3ds.
Yes, using the Discord binary stops the error, but _ctru does not work anyway. Perhaps the _ctru library has to be compiled separately?
EDIT: It would appear that other people are having the same problem on the discord channel.
The stable version in github cannot load the module correctly. But it does work with the latest versions of 3DS.py that are available through the Discord. The code in the example is missing a call to hid_scan_input(). Discussion can be seen in the Discord with a working example.
It works, thank you!
Updated exmaple code:
import sys
import _ctru
BTN_A = 1 << 0
BTN_B = 1 << 1
def Test():
print(f"Entering main loop", flush=True)
while True:
_ctru.hid_scan_input()
key_mask = _ctru.hid_keys_down()
if key_mask & BTN_A:
print(f"Button A was pressed", flush=True)
break
if key_mask & BTN_B:
print(f"Button B was pressed", flush=True)
break
def main():
Test()
print("Bye bye!")
if __name__== "__main__":
main()
3DS.py.zip This is the current latest Discord build that I could find if anyone needs it
I was attempting to run the code in #11 on my 3DS:
However, when run the code outputs the following error:
Does the _ctru module need to be built separately or am I doing something wrong?