Menu

#906 Joystick keyset settings are not saved

v3.1
closed-fixed
nobody
None
Keyboard mapping
2021-10-26
2017-05-14
No

I compiled vice from the latest svn revision (r33299). All (that I tried) is well, but each time I start up x64, the joystick keysets revert to their default values.

1 Attachments

Discussion

  • David Nemeskey

    David Nemeskey - 2017-05-14

    Attached the startup log.

     

    Last edit: David Nemeskey 2017-05-14
  • David Nemeskey

    David Nemeskey - 2017-05-14

    Apparently the vicerc file is correctly updated, as the keys are different if I exit the emulator without redefining them. The file I attached shows the rc after I did (to Up / Down / Left / Right / Left Ctrl).

     
  • David Nemeskey

    David Nemeskey - 2017-05-14

    As I understand, the problem is caused by the order of the initialization steps: vicerc is loaded before the keyboard gets initialized. keyboard_init() loads the keymap file, and once it gets to (e.g.) KP_5, it overwrites the setting read from the rc file for KeySet2Fire.

    As I see, there are two ways to circumvent the problem:

    1. Load vicerc as the last step of initialization, just before the main loop.
    2. When loading the keymap file, skip keys (and joystick keysets, etc.) which already have custom values.

    I don't know which solution fits better into the current initialization procedure, so I leave it up to you guys to pick the best one. :)

     

    Last edit: David Nemeskey 2017-05-14
    • Greg King

      Greg King - 2017-07-21

      As I see, there are two ways to circumvent the problem:

      1. Load vicerc as the last step of initialization, just before the main loop.
      2. When loading the keymap file, skip keys (and joystick keysets, etc.) which already have custom values.

      A variation of number 2 is the proper fix. Putting keysets in keymap files is obsolete. Therefore, the keyboard_parse_set_neg_row() function (in https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/keyboard.c ) should ignore attempts to set the keysets (i.e., "rows" -1 and -2).

       
  • gpz

    gpz - 2018-08-31
    • Port: Linux -->
     
  • gpz

    gpz - 2021-10-26
    • Category: x64 --> Keyboard mapping
     
  • compyx

    compyx - 2021-10-26

    This works fine in the Gtk3 port and appears to work in the SDL2 port as well. In both ports the keyset settings are saved in vicerc and restored properly.

    So perhaps we can close this?

     
  • David Nemeskey

    David Nemeskey - 2021-10-26

    It seems to b working fine in the current version for me as well.

     
  • compyx

    compyx - 2021-10-26
    • status: open --> closed-fixed
     
  • compyx

    compyx - 2021-10-26

    Great, closing then.

     

Log in to post a comment.

MongoDB Logo MongoDB