How to add a command line parameter to edit a configuration?
Posted: Sun 16 Jun, 2024 3:02 pm
Hi all,
Currently PCem allows directly launching a configuration from the command line with the --config option without showing the main window. What I think I understand from the source code it sets the default configuration to the --config specified one and than launches the configuration.
While running PCem a selected configuration can be edited in the Configure window which is opened by pressing the Configure button. I would like to add a command line parameter --edit to be used in conjunction with --config to open the Configure PCem window directly, preferably without showing the main window, and saving the configuration upon closing the window.
I have looked in the source code and see that the command line options are handled in the initpc function in pc.c. Is this the place to add a direct call to how the Configure window? And what function should be called? I have with my limited C knowledge a hard time grasping how the code works. Any help is appreciated.
Regards.
Currently PCem allows directly launching a configuration from the command line with the --config option without showing the main window. What I think I understand from the source code it sets the default configuration to the --config specified one and than launches the configuration.
While running PCem a selected configuration can be edited in the Configure window which is opened by pressing the Configure button. I would like to add a command line parameter --edit to be used in conjunction with --config to open the Configure PCem window directly, preferably without showing the main window, and saving the configuration upon closing the window.
I have looked in the source code and see that the command line options are handled in the initpc function in pc.c. Is this the place to add a direct call to how the Configure window? And what function should be called? I have with my limited C knowledge a hard time grasping how the code works. Any help is appreciated.
Regards.