Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading config files doesn't apply keybindings #851

Closed
RickardNi opened this issue May 21, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@RickardNi
Copy link

commented May 21, 2017

When I used Snes9X, I had two copies of it, one for practicing and one for live races (where fast-forwarding, save/load state, etc are disabled). This was an annoyance, but the best solution nevertheless.

For BizHawk, I discovered that there are different config files that could probably eliminate this problem. However, it doesn't seem to work. I have two config files:

  • config.ini (default)
  • Live.ini (some keybinds disabled)

Loading one or another doesn't apply the keybindings, even though the config file contains them correctly. Going into Config -> Keybinds shows them correctly, but I have to manually save them and "re-apply" them before they take effect.

This should be a fairly quick fix I guess, if help is needed I could probably dive into the code and make such a fix.

Also, is there any way to tell what config file you are currently running? Not even a message when loading a new config file, except "Config file loaded.". If you can't tell which one is running, how do you know which one you are saving with "Save Config"?

So, couple of suggestions as well:

  • Change the message from to something like "Loaded config file: Live".
  • Option to show current config file in either title bar or status bar.
  • Have a sub-menu for saving/loading config files with recently used ones.
@zeromus

This comment has been minimized.

Copy link
Contributor

commented May 22, 2017

I'm pretty sure Save Config should be read as "Save current config to the config file, which is config.ini" and the "load config file" should be read as "Import a config file into the current config". Doing anything else would require that we change our config system to have a sense of the currently bound config, which is not presently the case, and I'm not sure its the semantics every user wants. Many programs have a sense of current settings, and from there, import and export. Many other programs also have a sense of the current document, and from there, save and save as. Which model is best? Personally I prefer it the way it is. Note that we called it "load", not "open", which would imply "open for editing".

From your choices, I choose option 1: add to the "Loaded Config" message.

I'm sure you'd like more flexibility in managing config files. I propose we change the current menu to "Config>" and move the 4 current menu options in there, even though "Save Config" is the most commonly used thing. This will give us the place to put the recent files list --if we ever do that. I also propose to support drag and drop of ini files (if we don't already). After I fix this basic stuff, you can post any of these things as feature requests:

  1. recent configs menu
  2. drag and drop ini
  3. bound config concept, which I'm not sure we'll ever do

@zeromus zeromus closed this in 3a98460 May 22, 2017

@RickardNi

This comment has been minimized.

Copy link
Author

commented May 22, 2017

Thank you for your answer.

I'm not sure I understand, though. You say it should be read as "import a config file into the current config", but what it actually does is "import a config file into the current config without, somehow, applying the config". Not really sure why this is a wanted behaviour.

Clearly, the keybindings is in the config file, and entering the keybind menu option shows that it changes when I load a new config file. So the configuration is in the new .ini file, and it is read into the application correctly, and it even shows your new keybindings, but it doesn't apply them. Are you sure this is your intentional behaviour? Cause that also causes a pretty major inconsistency when keybindings are now displayed incorrectly (after loading a different config file with different keybinds).

Just trying to understand the reasoning here.

@zeromus

This comment has been minimized.

Copy link
Contributor

commented May 22, 2017

The failure to apply the keybindings has nothing to do with anything. It was simply a bug which my commit fixed.

@RickardNi

This comment has been minimized.

Copy link
Author

commented May 22, 2017

Aha, it sounded like you defended it like an intentional behaviour. My misunderstanding then, great stuff! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.