Skip to content

Add changes propposed by HeikesFootSlave#13

Merged
impeeza merged 1 commit intomasterfrom
HeikesFootSlave-SeveralImprovements
May 4, 2025
Merged

Add changes propposed by HeikesFootSlave#13
impeeza merged 1 commit intomasterfrom
HeikesFootSlave-SeveralImprovements

Conversation

@impeeza
Copy link
Owner

@impeeza impeeza commented May 4, 2025

Add changes propposed by HeikesFootSlave but reverts messages to English. hoppely some day we will add multi language support.

This add a new setting to Clean Config File.

Add changes propposed by  HeikesFootSlave but reverts messages to English.  hoppely some day we will add multi language support.

This add a new setting to Clean Config File.
@impeeza impeeza merged commit 90dc2a9 into master May 4, 2025
1 check passed
@ITotalJustice
Copy link

Did you see this #11?

All of that code can be replaced by simply renaming the config file, load the config and write the entries that you load. No dynamic memory allocation, no changes the minini, zero overhead.

@impeeza
Copy link
Owner Author

impeeza commented May 4, 2025

Did you see this #11?

All of that code can be replaced by simply renaming the config file, load the config and write the entries that you load. No dynamic memory allocation, no changes the minini, zero overhead.

Nop, I didn't, sorry, I do not know why GitHub is not alerting me about those comments.

Thanks for your comments, Tomorrow morning will look in to all of them.

@ITotalJustice
Copy link

ITotalJustice commented May 4, 2025

I would strongly recommend reverting this change.

If you really want to have an option to delete the config file (which i don't recommend), here's a way you could do it.

  1. rename the config file to a temp file, lets call it config.ini.temp.
  2. change ini_load_or_write_default() to accept the ini path and the temp path.
  3. in ini_load_or_write_default, load config entries from temp and always write them to config (which will be newly created because it doesn't exist).
  4. why add another config to sys-patch to clean configs? Just add an option in the overlay to delete the file and then ask the user to reboot.
  5. if you want to add translations, do it in the overlay, not in the sysmod. Imagine if you try to figure out why sys-patch is broken and you get a log file sent in german. You can see sphaira for an example for handling translations.

Or, avoid all the above and filter the config in the overlay - only display the configs that matter.

Imo the only thing that needs to change in sys-patch is the patterns. There was the overlapping buffer bug which was my fault, but aside from that, sys-patch itself doesn't need changing. It will always work and it's as fast as it can possibly be. The only way that changes is if code is added that does something other than updating patterns. The less changes to the sysmod the better, it will save you the headache later on if stuff breaks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants