Skip to content

Commit

Permalink
General fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdbeardgame committed Sep 18, 2021
1 parent d1a0c6a commit 9cb771d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions common/IniInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class IniInterface
virtual bool IsLoading() const = 0;
bool IsSaving() const { return !IsLoading(); }

virtual void Entry(const std::string &var, std::string &value, const std::string defvalue) = 0;
virtual void Entry(const std::string& var, std::string& value, const std::string defvalue) = 0;
virtual void Entry(const std::string& key, std::map<std::string, int>& var, const int defValue) = 0;
virtual void Entry(const wxString &var, wxString &value, const wxString defvalue = wxString()) = 0;
virtual void Entry(const wxString &var, wxDirName &value, const wxDirName defvalue = wxDirName(), bool isAllowRelative = false) = 0;
Expand Down Expand Up @@ -166,7 +166,7 @@ class IniSaver : public IniInterface

void Entry(const std::string& var, std::string& value, const std::string defvalue) override;
void Entry(const std::string& key, std::map<std::string, int>& var, const int defValue) override;
void Entry(const wxString& var, wxString& value, const wxString defvalue = wxString()) override;
void Entry(const wxString &var, wxString& value, const wxString defvalue = wxEmptyString ) override;
void Entry(const wxString& var, wxDirName& value, const wxDirName defvalue = wxDirName(), bool isAllowRelative = false) override;
void Entry(const wxString& var, fs::path& value, const fs::path defvalue) override;
void Entry(const wxString& var, fs::path& value, fs::path defvalue, fs::path base) override;
Expand All @@ -184,7 +184,6 @@ class IniSaver : public IniInterface
void Entry(const wxString& var, wxSize& value, const wxSize defvalue = wxDefaultSize) override;
void Entry(const wxString& var, wxRect& value, const wxRect defvalue = wxDefaultRect) override;

protected:
void _EnumEntry(const wxString& var, int& value, const wxChar* const* enumArray, int defvalue) override;
};

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/SPU2/Linux/CfgHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void setIni(const wchar_t* Section)
void CfgSetSettingsDir(const char* dir)
{
FileLog("CfgSetSettingsDir(%s)\n", dir);
path = Path::ToWxString((dir == nullptr) ? "inis" : std::string(dir) / "SPU2.ini");
path = Path::ToWxString((dir == nullptr) ? "inis" : fs::path(dir) / "SPU2.ini");
pathSet = true;
}

Expand Down
1 change: 1 addition & 0 deletions pcsx2/gui/AppConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ fs::path GetVmSettingsFilename()
{
fs::path fname = Path::FromWxString(FilenameDefs::GetVmConfig().GetFullPath());
if (wxGetApp().Overrides.VmSettingsFile.IsOk())
{
fname = Path::FromWxString(wxGetApp().Overrides.VmSettingsFile.GetFullPath());
}
return GetSettingsFolder() / fname;
Expand Down
1 change: 1 addition & 0 deletions pcsx2/gui/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ class Pcsx2StandardPaths : public wxStandardPaths
if (wxGetEnv(L"XDG_CONFIG_HOME", &xdg_home_value))
{
if (xdg_home_value.IsEmpty())
{
// variable exist but it is empty. So use the default value
user_local_dir = wxDirName(Path::ToWxString(Path::FromWxString(GetUserConfigDir()) / Path::FromWxString(default_config_dir.ToString())));
}
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/gui/Panels/MemoryCardListPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ void Panels::MemoryCardListPanel_Simple::UiRenameCard(McdSlotItem& card)
card.IsEnabled = false;
Apply();

if (!wxRenameFile(wxFileName(Path::ToWxString(Path::FromWxString(basepath.ToString()) / card.Filename))).GetFullPath(), (basepath + wxFileName(newFilename)).GetFullPath(), false))
if (!wxRenameFile(wxFileName(Path::ToWxString(Path::FromWxString(basepath.ToString()) / card.Filename)).GetFullPath(), (basepath + wxFileName(newFilename)).GetFullPath(), false))
{
card.IsEnabled = origEnabled;
Apply();
Expand Down

0 comments on commit 9cb771d

Please sign in to comment.