Homebrew sleep() function in libctru?

Alex4nder001

Part-time thug
OP
Member
Joined
Jul 28, 2017
Messages
453
Trophies
0
Location
London
XP
1,621
Country
United Kingdom
It's my first time writing homebrew on the 3DS (it's also the first time I've ever used devkitPro), and I want to make some text flash on the screen. However, I can't use sleep() because it refuses to compile. What is the equivalent of the sleep() function and what is it defined in? I know that in windows, it's defined in windows.h (I think)
 

Badda

me too
Member
Joined
Feb 26, 2016
Messages
318
Trophies
0
Location
under the bridge
XP
2,401
Country
Tokelau
Can get a function called when the home buttom is pressed? Use case: My app turns the bottom screen backlight off. I would like to turn it on again when the user presses the home button and turn it back off as soon as the user returns to the app.

Edit:
Never mind, I just found the answer - it works via aptHook() and then checking for for hook type APTHOOK_ONSLEEP or APTHOOK_ONWAKEUP

Edit again:
I just noticed, that this post is in the wrong thread. It should have been in https://gbatemp.net/threads/homebrew-development.360646/. Sorry bout that :D
 
Last edited by Badda,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/WOppJ92RgGU?si=KE79L6A_3jESsGQM