mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
Assign input values from button widget text
After assigning values with a joystick in the input plugin configuration window, none of the joystick values were written to the config file because the code assumed the value to be a key and wrote the parameter only if the key value was successfully decoded. This sets the button parameters from the widget text if the value could not be decoded as an sdl key and fixes the problem mentioned in issue #2 regarding joysticks: "I just installed and tried the latest release and I can confirm that it still occurs, but only for USB controller inputs. That is: It will save my settings if I assign keyboard keys to the N64 controller buttons, but not if I assign USB controller buttons to N64 controller buttons. Those will revert to their previous values as soon as I close the input configuration window."
This commit is contained in:
parent
010b279fea
commit
6fe186e09d
1 changed files with 1 additions and 0 deletions
|
@ -328,6 +328,7 @@ class Input(QDialog, Ui_InputDialog):
|
|||
v = "key(%s)" % value
|
||||
self.config.set_parameter(key, v.encode())
|
||||
else:
|
||||
self.config.set_parameter(key, widget.text().encode())
|
||||
continue
|
||||
|
||||
def get_axis(self, axis):
|
||||
|
|
Loading…
Add table
Reference in a new issue