-
Notifications
You must be signed in to change notification settings - Fork 10
Add set_remaps function #10
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
Conversation
another interesting option is some sort of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected for me, with some small tweaks (leak fix + style nit) it'll be fine
include/config/config.h
Outdated
@@ -101,5 +101,7 @@ struct config *config_create(); | |||
void config_destroy(struct config *cfg); | |||
ssize_t config_find_action(struct config *cfg, const struct config_action *action); | |||
int config_load(struct config *cfg, const char *profile); | |||
int parse_remap(const char *src, const char *dst, struct config_remap *remap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if these functions are prefixed with config_
if they're public
I think this function probably covers the last of the config options which people would realistically want to change at runtime since most of the other options were already covered but I'm not totally sure. Disabling and enabling the JIT is fine; the config loading code already does it since it has to first execute |
Thanks for the PR! |
This allows changing the remaps without fully reloading the config, which for example allows remaps to be toggled:
This is probably not the best way to structure the code, I'm open to suggestions.