Create the config directory at first launch
First launch would fail because wx does not create the configuration directory by itself if it does not exist. This also fixes an incorrect menu option.
This commit is contained in:
parent
7b8c4242fb
commit
6f68bfcf71
|
@ -2608,7 +2608,7 @@ EVT_HANDLER(SpeedOn, "Enable faster network protocol by default")
|
|||
|
||||
EVT_HANDLER(LinkProto, "Local host IPC")
|
||||
{
|
||||
GetMenuOptionConfig("LinkProto", config::OptionID::kGBALinkHost);
|
||||
GetMenuOptionConfig("LinkProto", config::OptionID::kGBALinkProto);
|
||||
}
|
||||
|
||||
EVT_HANDLER(LinkConfigure, "Link options...")
|
||||
|
|
|
@ -406,6 +406,11 @@ bool wxvbamApp::OnInit() {
|
|||
config_file_.GetFullPath(),
|
||||
wxEmptyString, wxCONFIG_USE_LOCAL_FILE));
|
||||
|
||||
// wx does not create the directories by itself so do it here, if needed.
|
||||
if (!wxDirExists(config_file_.GetPath())) {
|
||||
config_file_.Mkdir(wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
|
||||
}
|
||||
|
||||
// Load the default options.
|
||||
load_opts(!config_file_.Exists());
|
||||
|
||||
|
|
Loading…
Reference in New Issue