Kill off some usages of c_str.

Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
This commit is contained in:
Lioncash
2014-03-12 15:33:41 -04:00
parent dccc6d8b47
commit a82675b7d5
170 changed files with 812 additions and 704 deletions

View File

@ -2,11 +2,13 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <string>
#include <wx/wx.h>
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
#include "Common/LogManager.h"
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
@ -54,11 +56,9 @@ unsigned int VideoBackend::PeekMessages()
return TRUE;
}
void VideoBackend::UpdateFPSDisplay(const char *text)
void VideoBackend::UpdateFPSDisplay(const std::string& text)
{
TCHAR temp[512];
swprintf_s(temp, sizeof(temp)/sizeof(TCHAR), _T("%hs | D3D | %hs"), scm_rev_str, text);
EmuWindow::SetWindowText(temp);
EmuWindow::SetWindowText(StringFromFormat("%s | D3D | %s", scm_rev_str, text.c_str()));
}
std::string VideoBackend::GetName()
@ -154,7 +154,7 @@ bool VideoBackend::Initialize(void *&window_handle)
frameCount = 0;
g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_dx11.ini").c_str());
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "gfx_dx11.ini");
g_Config.GameIniLoad();
g_Config.UpdateProjectionHack();
g_Config.VerifyValidity();