|
Post by goombi on Aug 28, 2015 1:13:59 GMT 1
This is certainly a noob question but as a newcomer on the scene, I'll allow myself to ask it. I can't make the Controls to work. I use this code
white = Color.new(255,255,255) Controls.init() t = Timer.new() while (Timer.getTime(t) < 10000) do Screen.waitVblankStart() input = Controls.read()
Screen.refresh() Screen.clear(TOP_SCREEN) Screen.debugPrint(0, 0, Timer.getTime(t), white, TOP_SCREEN) Screen.debugPrint(0, 15, input, white, TOP_SCREEN) Screen.flip() end Timer.destroy(t) System.exit() The Timer is my way of returning to the HBL. But the input value is something like 3.88654e-270 for around 2s then changes to 2.077994e-307 whatever I press (or maintain). Using Ironhax on N3DS 9.9.0-26E. Did I miss some important line somewhere about enabling the Controls modules? Or it doesn't work with my firmware?
Thank you for your help, hoping that's not a dumb question :/
|
|
TheMeq
New Member
Say Whuut?
Posts: 3
|
Post by TheMeq on Sept 7, 2015 13:35:08 GMT 1
Your code above doesn't actually do anything. It reads the controller, but you don't specify anything else.
How can you tell the controller doesn't work just from that code?
You would need something like this:
if (Controls.check(Controls.read(),KEY_A)) then ... end to test whether the controls module is working or not.
|
|
|
Post by goombi on Sept 12, 2015 23:27:39 GMT 1
I print the value of input (which is Controls.read()) to see if it changes when I mash randomly. But it doesn't.
I tested a with a "then System.exit() end" with no luck (instead I end up forced to reboot, that's why I exit after a 10 seconds using a Timer in the above code)
|
|