This bug has been reported on github.
Â
I am trying to resolve it myself though because I don't really want to wait for the next push.
Â
PERTAINING TO GBA BIOS
Â
Unfortunately I am not familiar with wxWidgets nor this codebase but I am syphoning through it to try and find the solution.
Â
Can a developer confirm if this is where the code is being handled to load the configuration settings?
Â
CPUInit(gopts.gba_bios.mb_fn_str(), useBiosFileGBA); It is defined @ panel.cpp line 285
Â
CPUInit is also called like this
CPUInit(biosFileNameGBA, useBios); @ SDL.cpp line 1825
Â
This function loads in the bios file name. It is defined @ GBA.cpp line 3298
Â
The bios file name grabs the value from the config from function LoadConfig @ ConfigManager.cpp line 464
with this:
biosFileNameGBA = ReadPrefString("biosFileGBA");
Â
LoadConfig() is called @ SDL.cpp on line 1718
Â
with this comment:
LoadConfig(); // Parse command line arguments (overrides ini)
Â
so according to this LoadConfig is only used to override the ini setting when vba-m has additional command line arguments.
Â
So we need to find where the config settings are initially loaded from when the application is launched...
which seem to be using this object gopts...which as far as i can tell is defined in opts.cpp line 38...
opts_t gopts;
opts_t also defines some ui component
wxString gba_bios
this array opt_desc opt
contains
STROPT("GBA/BiosFile", "", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios),
Â
This defines a section and the corresponding ini setting to search for. Then I think it's taking that value and setting it to the object string gopts.gba_bios.
if i try to force "BiosFile" in the GBA section of the ini though it doesn't do anything. In fact after I load an instance of vba-m and exit it deletes the line with "BiosFile".
Â
There is a line that says "biosFileGBA" in the ini however. If I change the above line to
STROPT("GBA/biosFileGBA", "", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios)
this doesn't fix anything.
Â
So the problem stems deeper into how vba-m is actually reading and writing to the ini/cfg file.
Â
This function:
void OpenPreferences(const char *name)
{
Code: Select all
if (!preferences && name)
preferences = iniparser_load(name);
}
Â
is actually reading from the config.ini file
Â
it calls a function iniparser_load which returns a dictionary. it has this description
This is the parser for ini files. This function is called, providing
the name of the file to be read. It returns a dictionary object that
should not be accessed directly, but through accessor functions
instead.
Â
So now I'm at a wall because I don't have VS2013 I can't properly build the project to actually debug this and see what iniparser_load is returning
Â
on top of this i am not so familiar with c/c++ but I believe this may be the root of the problem?