Git Product home page Git Product logo

Comments (10)

 avatar commented on August 19, 2024

the input system does need an update for the the analogue joystick and joystick buttons. The controls are moot at the moment for joysticks. I didnt notice that particular problems with the keyboard but ill look into it please see here for the joystick fixes. I done for daphne

RetroPie/daphne-emu#15

from hypseus.

OzFalcon avatar OzFalcon commented on August 19, 2024

Forgot to mention,
If these keys are attempted to be assigned, Then the switch ends up with no assignment at all.

from hypseus.

 avatar commented on August 19, 2024

The keys should assign but for them to work you need to override the defaults. If you want to use the arrow keys set up down left and right to something else. Defaults are as follows

int g_key_defs[SWITCH_COUNT][2] = {
{SDLK_UP, SDLK_KP_8}, // up
{SDLK_LEFT, SDLK_KP_4}, // left
{SDLK_DOWN, SDLK_KP_2}, // down
{SDLK_RIGHT, SDLK_KP_6}, // right
{SDLK_1, 0}, // 1 player start
{SDLK_2, 0}, // 2 player start
{SDLK_SPACE, SDLK_LCTRL}, // action button 1
{SDLK_LALT, 0}, // action button 2
{SDLK_LSHIFT, 0}, // action button 3
{SDLK_5, SDLK_c}, // coin chute left
{SDLK_6, 0}, // coin chute right
{SDLK_KP_DIVIDE, 0}, // skill easy
{SDLK_KP_MULTIPLY, 0}, // skill medium
{SDLK_KP_MINUS, 0}, // skill hard
{SDLK_9, 0}, // service coin
{SDLK_F2, 0}, // test mode
{SDLK_F3, 0}, // reset cpu
{SDLK_F12, SDLK_F11}, // take screenshot
{SDLK_ESCAPE, SDLK_q}, // Quit DAPHNE
{SDLK_p, 0}, // pause game
{SDLK_BACKQUOTE, 0}, // toggle console (TODO)
{SDLK_t, 0}, // Tilt/Slam switch
};

from hypseus.

OzFalcon avatar OzFalcon commented on August 19, 2024

No, They don't assign. It's specifically those keys listed (CTRL, ALT, SHIFT, ARROWS)
The other keys assign fine.

Try this simple example test and you will see pause SHOULD be assigned to up arrow.
Even though you can assign a key to multiple switches - In this example we explicitly redefine
"KEY_UP" to the "i" key to ensure there are no conflicts. Running shows pause is not bound to "Up arrow".

[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 273 0 0
END

from hypseus.

 avatar commented on August 19, 2024

ill look into that the joystick had problems with buttons doing that. Ill look at the code when i get off work should be easy enough to fix.

nt g_key_defs[SWITCH_COUNT][2] = {
{SDLK_UP, SDLK_KP_8}, // up
{SDLK_LEFT, SDLK_KP_4}, // left
{SDLK_DOWN, SDLK_KP_2}, // down
{SDLK_RIGHT, SDLK_KP_6}, // right
{SDLK_1, 0}, // 1 player start
{SDLK_2, 0}, // 2 player start
{SDLK_SPACE, SDLK_LCTRL}, // action button 1
{SDLK_LALT, 0}, // action button 2
{SDLK_LSHIFT, 0}, // action button 3
{SDLK_5, SDLK_c}, // coin chute left
{SDLK_6, 0}, // coin chute right
{SDLK_KP_DIVIDE, 0}, // skill easy
{SDLK_KP_MULTIPLY, 0}, // skill medium
{SDLK_KP_MINUS, 0}, // skill hard
{SDLK_9, 0}, // service coin
{SDLK_F2, 0}, // test mode
{SDLK_F3, 0}, // reset cpu
{SDLK_F12, SDLK_F11}, // take screenshot
{SDLK_ESCAPE, SDLK_q}, // Quit DAPHNE
{SDLK_p, 0}, // pause game
{SDLK_BACKQUOTE, 0}, // toggle console (TODO)
{SDLK_t, 0}, // Tilt/Slam switch
};

from hypseus.

 avatar commented on August 19, 2024

try this
[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 82 0 0
END

https://gist.github.com/stuartpb/804078/eb8df5f6dbfd063401b5a67a6a2509ed64db5b66

if this doesnt work ill check whats going on in the keyboard code in sdl2

from hypseus.

OzFalcon avatar OzFalcon commented on August 19, 2024

ASCII Code 82 aka Capital "R" Does not work (Same as SHIFT, CTRL, ALT, ARROWS).
I'd take a guess that all the Capitals don't work.

from hypseus.

 avatar commented on August 19, 2024

try up with code 82 for up forget ascii for now.

see

https://github.com/davidsiaw/SDL2/blob/master/include/SDL_keycode.h

looks like its just expanding a macro for keys other than standards ascii. ill look into thsi properly when i get the time wont be too hard to fix

from hypseus.

OzFalcon avatar OzFalcon commented on August 19, 2024

Ok, got it.
https://wiki.libsdl.org/SDLKeycodeLookup

[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 1073741906 0 0
END

Up arrow now initiates pause.

So we need a new keycode list
aka https://wiki.libsdl.org/SDLKeycodeLookup

from hypseus.

 avatar commented on August 19, 2024

well i knew the macro was doing something :) another mystery solved welcome to the sdl2 update

from hypseus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.