Nuvie - New Ultima VI Engine -  
Welcome! » Log In » Create A New Profile

Forum

Arrow keys repeat

Posted by Fransguf 

Arrow keys repeat
July 15, 2016 08:46AM
I much prefer to walk using the arrow keys rather than the mouse, and I find myself needing to use the keyboard all the time anyways. However, the arrow keys do not repeat, so I need to press the arrow key over and over again to keep moving, rather than holding it down. Is there any way to make the arrow keys repeat by holding them down? I can't for the life of me figure it out. I know they repeat properly in the original DOS version -- it's just Nuvie that has this problem.
Re: Arrow keys repeat
July 27, 2016 04:12AM
Nuvie should be repeating. What version are you using and what OS. Try the daily build or version 0.5 if you already have that.
Re: Arrow keys repeat
September 29, 2016 01:00AM
I've got the same issue. I'm running a daily build under Win10. I'll give 0.5 a try.
Re: Arrow keys repeat
September 29, 2016 01:32AM
0.5 works fine. But no key repeat with the daily build.
Re: Arrow keys repeat
September 30, 2016 04:00PM
EDIT: Nope. See next post.

Probably something to do with this: smiling smiley

    //FIXME SDL2 SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY/2,SDL_DEFAULT_REPEAT_INTERVAL);

So definitely no key repeating in the daily builds since the move to SDL2.

-Jim



Edited 1 time(s). Last edit at 09/30/2016 06:19PM by BeagleBoy.
Re: Arrow keys repeat
September 30, 2016 06:25PM
I just did my own build, and key repeating works. Not sure if it's the toolchain (I used VC++) or the SDL version (I used a prebuilt version from nuget).

Also of interest, CPU usage is much lower for my build than for the daily. The daily pegs one of my CPU cores, while my build uses only 8% of my CPU (about 30% of one core).

-Jim
Re: Arrow keys repeat
September 30, 2016 08:31PM
Ok, that is the problem. The code's been updated for SDL2, but the windows daily build is still being built against SDL 1.

Most SDL 1 vs 2 stuff is conditional, but the keyboard repeat stuff is just commented out.

The daily builds ought to either build against 2, or the key repeat stuff should be put (conditionally) back in. If someone can explain the toolchain for the daily builds, I'd be happy to patch this.

-Jim
Re: Arrow keys repeat
January 04, 2017 10:08PM
Sorry that it has taken awhile to get back about this. It is fixed in the latest snapshot by commit 9afa2d8cab74dfcf939e997620dfda09cc0dd45e 6 days ago.

Sorry, only registered users may post in this forum.

Click here to login