Homebrew sleep() function in libctru?

Alex4nder001

Part-time thug
OP
Member
Joined
Jul 28, 2017
Messages
450
Trophies
0
Location
London
XP
1,508
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

Nu Member
Member
Joined
Feb 26, 2016
Messages
305
Trophies
0
Location
Nirvana
XP
1,692
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,
General chit-chat
Help Users
    NeoGaming @ NeoGaming: yep