Skip to content

Commit

Permalink
Adde dcasts to recording, dev9 and usb
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdbeardgame committed Dec 17, 2020
1 parent 90f5f50 commit c42e101
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pcsx2/DEV9/Linux/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void SaveConf()
*/


const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
const std::string file(Path::Combine(GetSettingsFolder(), "DEV9.cfg"));

fprintf(stderr, "CONF: %s", file.c_str());

Expand All @@ -84,7 +84,7 @@ void SaveConf()
void LoadConf()
{

const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
const std::string file(Path::Combine(GetSettingsFolder(), "DEV9.cfg"));
if (-1 == access(file.c_str(), F_OK))
return;

Expand Down
4 changes: 2 additions & 2 deletions pcsx2/DEV9/Win32/DEV9WinConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool FileExists(std::string szPath)

void SaveConf()
{
const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
const std::string file(Path::Combine(GetSettingsFolder(), "DEV9.cfg"));
DeleteFileA(file.c_str());

WritePrivateProfileStringA("DEV9", "Eth", config.Eth, file.c_str());
Expand All @@ -46,7 +46,7 @@ void SaveConf()

void LoadConf()
{
const std::string file(GetSettingsFolder().Combine(wxString("DEV9.cfg")).GetFullPath());
const std::string file(Path::Combine(GetSettingsFolder(), "DEV9.cfg"));
if (FileExists(file.c_str()) == false)
return;

Expand Down
14 changes: 7 additions & 7 deletions pcsx2/Recording/InputRecording.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ bool InputRecording::Play(wxString fileName)
if (!wxFileExists(inputRecordingData.GetFilename() + "_SaveState.p2s"))
{
inputRec::consoleLog(fmt::format("Could not locate savestate file at location - {}_SaveState.p2s",
inputRecordingData.GetFilename()));
inputRecordingData.GetFilename().ToStdString()));
inputRecordingData.Close();
return false;
}
Expand Down Expand Up @@ -371,17 +371,17 @@ wxString InputRecording::resolveGameName()
const wxString gameKey(SysGetDiscID());
if (!gameKey.IsEmpty())
{
if (IGameDatabase* GameDB = AppHost_GetGameDatabase())
if (IGameDatabase* gameDB = AppHost_GetGameDatabase())
{
Game_Data game;
if (GameDB->findGame(game, gameKey))
GameDatabaseSchema::GameEntry game = gameDB->findGame(std::string(gameKey));
if (game.isValid)
{
gameName = game.getString("Name");
gameName += L" (" + game.getString("Region") + L")";
gameName = game.name;
gameName += L" (" + game.region + L")";
}
}
}
return !gameName.IsEmpty() ? gameName : Path::GetFilename(g_Conf->CurrentIso);
return !gameName.IsEmpty() ? gameName : (wxString)Path::GetFilename(g_Conf->CurrentIso.ToStdString());
}

#endif
6 changes: 3 additions & 3 deletions pcsx2/USB/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <vector>

std::map<std::pair<int, std::string>, std::string> changedAPIs;
wxString iniFile(L"USB.ini");
std::string iniFile("USB.ini");
static TSTDSTRING usb_path;
TSTDSTRING IniPath; // default path, just in case
TSTDSTRING LogDir;
Expand All @@ -35,9 +35,9 @@ void USBsetSettingsDir()
if(!USBpathSet)
{
#ifdef _WIN32
IniPath = GetSettingsFolder().Combine( iniFile ).GetFullPath(); // default path, just in case
IniPath = Path::Combine(GetSettingsFolder(), fs::path(iniFile)).wstring(); // default path, just in case
#else
IniPath = std::string(GetSettingsFolder().Combine( iniFile ).GetFullPath()); // default path, just in case
IniPath = Path::Combine(GetSettingsFolder(), fs::path(iniFile)); // default path, just in case
#endif
USBpathSet = true;
}
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/USB/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void RemoveSection(const char* dev_type, int port, const std::string& key);

extern TSTDSTRING IniPath;
extern TSTDSTRING LogDir;
extern wxString iniFile;
extern std::string iniFile;
extern std::map<std::pair<int /*port*/, std::string /*devname*/>, std::string> changedAPIs;
std::string GetSelectedAPI(const std::pair<int /*port*/, std::string /*devname*/>& pair);

Expand Down

0 comments on commit c42e101

Please sign in to comment.