mirror of https://github.com/PCSX2/pcsx2.git
DEV9: bugfix on linux when no if, config revamp
This commit is contained in:
parent
2c1bbd5efb
commit
149bcea2d8
|
@ -18,6 +18,7 @@
|
|||
|
||||
//#include <winsock2.h>
|
||||
#include "../DEV9.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -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")));
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <winsock2.h>
|
||||
#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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue