Slightly noobish keyboard problem.

Post Reply
demosthenes2k8
Posts: 4
Joined: Sat Mar 20, 2010 10:14 pm

Slightly noobish keyboard problem.

Post by demosthenes2k8 » Sat Jul 24, 2010 2:39 am

So I've been working on porting some code from an application I've been working on to the DS. It's a C++ console app, so there shouldn't be too much trouble. The console creation works fine-really great, actually, I hadn't been sure if I would be able to use cin and cout, but it appears to work fine-but my partner-in-crime noticed a couple problems.
With the keyboard, when we hit the '=' key, it outputs a + instead.
When we fill the line, text wraps around fine but hitting "backspace" results in weird behavior-hitting "backspace" three or four times doesn't delete anything on the filled line, but typing afterwards prints it in the top right corner.

I'm only just starting to learn how to handle libnds, so I'm not sure if wither of these is intentional or not...Are there any known fixes for this problem? Both of them occur, not just in my own code, but in examples/nds/input/keyboard/keyboard_stdin/ too.

My source/, include/, Makefile (it has to use this makefile, I added a switch that makes the NDS-specific code get called into it), and compiled .nds are all at http://demosthenes2k8.endoftheinternet.org/OratrDS.zip
The code can also be downloaded from googlecode, project name Oratr.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Slightly noobish keyboard problem.

Post by zeromus » Sat Jul 24, 2010 4:49 am

the backspace handling seems broken to me in console.c:

Code: Select all

if(currentConsole->cursorX < 0)
{			
	if(currentConsole->cursorY > 0) 
	{	
		currentConsole->cursorX = currentConsole->windowX - 1; //what?? should be = windowX or windowX + consoleWidth -1 depending on what you want, but not this
		currentConsole->cursorY--;
	}
	else
	{
		currentConsole->cursorX = 0;
	}
}
the = + issue was fixed in svn 10 days ago

demosthenes2k8
Posts: 4
Joined: Sat Mar 20, 2010 10:14 pm

Re: Slightly noobish keyboard problem.

Post by demosthenes2k8 » Sat Jul 24, 2010 5:13 am

Alright, so both problems are known. That's good to know. Thank you!

EDIT: Alright, so I downloaded the new libnds update, and ran into a small problem. Using the exact same code, (and this still happens in both keyboard examples), when I type something it doesn't actually print it until I press enter/return.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests