diff --git a/pcsx2/DEV9/Linux/Config.cpp b/pcsx2/DEV9/Linux/Config.cpp index 9041c51f68..bb292fe96c 100644 --- a/pcsx2/DEV9/Linux/Config.cpp +++ b/pcsx2/DEV9/Linux/Config.cpp @@ -18,6 +18,7 @@ //#include #include "../DEV9.h" +#include "AppConfig.h" #include #include @@ -63,7 +64,9 @@ void SaveConf() */ - const std::string file(s_strIniPath + "DEV9.cfg"); + const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath()); + + fprintf(stderr, "CONF: %s", file.c_str()); xmlSaveFormatFileEnc(file.c_str(), doc, "UTF-8", 1); // free(configFile); @@ -81,7 +84,7 @@ void SaveConf() void LoadConf() { - const std::string file(s_strIniPath + "DEV9.cfg"); + const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath()); if (-1 == access(file.c_str(), F_OK)) return; diff --git a/pcsx2/DEV9/Linux/Linux.cpp b/pcsx2/DEV9/Linux/Linux.cpp index b5de0cfb7b..6c65e088b6 100644 --- a/pcsx2/DEV9/Linux/Linux.cpp +++ b/pcsx2/DEV9/Linux/Linux.cpp @@ -85,7 +85,8 @@ void OnOk() { char* ptr = gtk_combo_box_text_get_active_text((GtkComboBoxText*)gtk_builder_get_object(builder, "IDC_ETHDEV")); - strcpy(config.Eth, ptr); + if (ptr != nullptr) + strcpy(config.Eth, ptr); strcpy(config.Hdd, gtk_entry_get_text((GtkEntry*)gtk_builder_get_object(builder, "IDC_HDDFILE"))); diff --git a/pcsx2/DEV9/Win32/Config.cpp b/pcsx2/DEV9/Win32/Config.cpp index 880238a5de..76b0a6e1cc 100644 --- a/pcsx2/DEV9/Win32/Config.cpp +++ b/pcsx2/DEV9/Win32/Config.cpp @@ -18,6 +18,7 @@ #include #include "..\DEV9.h" +#include "AppConfig.h" BOOL WritePrivateProfileInt(LPCSTR lpAppName, LPCSTR lpKeyName, int intvar, LPCSTR lpFileName) { @@ -32,7 +33,7 @@ bool FileExists(std::string szPath) void SaveConf() { - const std::string file(s_strIniPath + "dev9ghz.ini"); + const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath()); DeleteFile(file.c_str()); WritePrivateProfileString("DEV9", "Eth", config.Eth, file.c_str()); @@ -44,7 +45,7 @@ void SaveConf() void LoadConf() { - const std::string file(s_strIniPath + "dev9ghz.ini"); + const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath()); if (FileExists(file.c_str()) == false) return;