mirror of https://github.com/PCSX2/pcsx2.git
gsdx: Prefix std:: to string and to_string
This commit is contained in:
parent
ada0d57452
commit
d57b812f36
|
@ -390,7 +390,7 @@ namespace GLLoader {
|
|||
|
||||
if (glGetStringi && max_ext) {
|
||||
for (GLint i = 0; i < max_ext; i++) {
|
||||
string ext((const char*)glGetStringi(GL_EXTENSIONS, i));
|
||||
std::string ext{(const char*)glGetStringi(GL_EXTENSIONS, i)};
|
||||
// Bonus
|
||||
if (ext.compare("GL_EXT_texture_filter_anisotropic") == 0) found_GL_EXT_texture_filter_anisotropic = true;
|
||||
if (ext.compare("GL_NVX_gpu_memory_info") == 0) found_GL_NVX_gpu_memory_info = true;
|
||||
|
|
|
@ -753,7 +753,7 @@ EXPORT_C_(uint32) GSmakeSnapshot(char* path)
|
|||
{
|
||||
try
|
||||
{
|
||||
string s(path);
|
||||
std::string s{path};
|
||||
|
||||
if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR)
|
||||
{
|
||||
|
@ -941,7 +941,7 @@ EXPORT_C GSgetLastTag(uint32* tag)
|
|||
|
||||
EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
|
||||
{
|
||||
string s = "GSdx";
|
||||
std::string s{"GSdx"};
|
||||
s.append(s_renderer_name).append(s_renderer_type);
|
||||
|
||||
// TODO: this gets called from a different thread concurrently with GSOpen (on linux)
|
||||
|
@ -993,7 +993,7 @@ EXPORT_C GSsetExclusive(int enabled)
|
|||
class Console
|
||||
{
|
||||
HANDLE m_console;
|
||||
string m_title;
|
||||
std::string m_title;
|
||||
|
||||
public:
|
||||
Console::Console(LPCSTR title, bool open)
|
||||
|
|
|
@ -401,7 +401,7 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float
|
|||
m_size.x = (dlg.m_width + 7) & ~7;
|
||||
m_size.y = (dlg.m_height + 7) & ~7;
|
||||
|
||||
wstring fn(dlg.m_filename.begin(), dlg.m_filename.end());
|
||||
std::wstring fn{dlg.m_filename.begin(), dlg.m_filename.end()};
|
||||
|
||||
//
|
||||
|
||||
|
@ -446,8 +446,8 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float
|
|||
{
|
||||
CFilterInfo fi;
|
||||
pBF->QueryFilterInfo(&fi);
|
||||
wstring s(fi.achName);
|
||||
printf("Filter [%p]: %s\n", pBF.p, string(s.begin(), s.end()).c_str());
|
||||
std::wstring s{fi.achName};
|
||||
printf("Filter [%p]: %s\n", pBF.p, std::string{s.begin(), s.end()}.c_str());
|
||||
|
||||
BeginEnumPins(pBF, pEP, pPin)
|
||||
{
|
||||
|
@ -456,8 +456,8 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float
|
|||
|
||||
CPinInfo pi;
|
||||
pPin->QueryPinInfo(&pi);
|
||||
wstring s(pi.achName);
|
||||
printf("- Pin [%p - %p]: %s (%s)\n", pPin.p, pPinTo.p, string(s.begin(), s.end()).c_str(), pi.dir ? "out" : "in");
|
||||
std::wstring s{pi.achName};
|
||||
printf("- Pin [%p - %p]: %s (%s)\n", pPin.p, pPinTo.p, std::string{s.begin(), s.end()}.c_str(), pi.dir ? "out" : "in");
|
||||
|
||||
BeginEnumMediaTypes(pPin, pEMT, pmt)
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ void GSCaptureDlg::OnInit()
|
|||
|
||||
c.moniker = moniker;
|
||||
|
||||
wstring prefix;
|
||||
std::wstring prefix;
|
||||
|
||||
LPOLESTR str = NULL;
|
||||
|
||||
|
@ -108,7 +108,7 @@ void GSCaptureDlg::OnInit()
|
|||
|
||||
m_codecs.push_back(c);
|
||||
|
||||
string s(c.FriendlyName.begin(), c.FriendlyName.end());
|
||||
std::string s{c.FriendlyName.begin(), c.FriendlyName.end()};
|
||||
|
||||
ComboBoxAppend(IDC_CODECS, s.c_str(), (LPARAM)&m_codecs.back(), c.DisplayName == selected);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class GSCaptureDlg : public GSDialog
|
|||
{
|
||||
CComPtr<IMoniker> moniker;
|
||||
CComPtr<IBaseFilter> filter;
|
||||
wstring FriendlyName;
|
||||
std::wstring FriendlyName;
|
||||
_bstr_t DisplayName;
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
int m_width;
|
||||
int m_height;
|
||||
string m_filename;
|
||||
std::string m_filename;
|
||||
INT_PTR m_colorspace;
|
||||
CComPtr<IBaseFilter> m_enc;
|
||||
};
|
||||
|
|
|
@ -518,7 +518,7 @@ CRC::Game CRC::m_games[] =
|
|||
|
||||
map<uint32, CRC::Game*> CRC::m_map;
|
||||
|
||||
string ToLower( string str )
|
||||
std::string ToLower( std::string str )
|
||||
{
|
||||
transform( str.begin(), str.end(), str.begin(), ::tolower);
|
||||
return str;
|
||||
|
@ -528,11 +528,11 @@ string ToLower( string str )
|
|||
// The list is case insensitive and order insensitive.
|
||||
// E.g. Disable all CRC hacks: CrcHacksExclusions=all
|
||||
// E.g. Disable hacks for these CRCs: CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03
|
||||
bool IsCrcExcluded(string exclusionList, uint32 crc)
|
||||
bool IsCrcExcluded(std::string exclusionList, uint32 crc)
|
||||
{
|
||||
string target = format( "0x%08x", crc );
|
||||
exclusionList = ToLower( exclusionList );
|
||||
return ( exclusionList.find( target ) != string::npos || exclusionList.find( "all" ) != string::npos );
|
||||
std::string target = format("0x%08x", crc);
|
||||
exclusionList = ToLower(exclusionList);
|
||||
return exclusionList.find(target) != std::string::npos || exclusionList.find("all") != std::string::npos;
|
||||
}
|
||||
|
||||
CRC::Game CRC::Lookup(uint32 crc)
|
||||
|
@ -540,7 +540,7 @@ CRC::Game CRC::Lookup(uint32 crc)
|
|||
printf("GSdx Lookup CRC:%X\n", crc);
|
||||
if(m_map.empty())
|
||||
{
|
||||
string exclusions = theApp.GetConfigS("CrcHacksExclusions");
|
||||
std::string exclusions = theApp.GetConfigS("CrcHacksExclusions");
|
||||
if (exclusions.length() != 0)
|
||||
printf( "GSdx: CrcHacksExclusions: %s\n", exclusions.c_str() );
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ bool GSDevice11::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
int ShadeBoost_Brightness = theApp.GetConfigI("ShadeBoost_Brightness");
|
||||
int ShadeBoost_Saturation = theApp.GetConfigI("ShadeBoost_Saturation");
|
||||
|
||||
string str[3];
|
||||
std::string str[3];
|
||||
|
||||
str[0] = format("%d", ShadeBoost_Saturation);
|
||||
str[1] = format("%d", ShadeBoost_Brightness);
|
||||
|
|
|
@ -265,7 +265,7 @@ bool GSDevice9::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
}
|
||||
else
|
||||
{
|
||||
string s = format(
|
||||
std::string s = format(
|
||||
"Supported pixel shader version is too low!\n\nSupported: %d.%d\nNeeded: 2.0 or higher",
|
||||
D3DSHADER_VERSION_MAJOR(m_d3dcaps.PixelShaderVersion), D3DSHADER_VERSION_MINOR(m_d3dcaps.PixelShaderVersion));
|
||||
|
||||
|
@ -354,7 +354,7 @@ bool GSDevice9::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
int ShadeBoost_Brightness = theApp.GetConfigI("ShadeBoost_Brightness");
|
||||
int ShadeBoost_Saturation = theApp.GetConfigI("ShadeBoost_Saturation");
|
||||
|
||||
string str[3];
|
||||
std::string str[3];
|
||||
|
||||
str[0] = format("%d", ShadeBoost_Saturation);
|
||||
str[1] = format("%d", ShadeBoost_Brightness);
|
||||
|
@ -1454,7 +1454,7 @@ void GSDevice9::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector4
|
|||
}
|
||||
}
|
||||
|
||||
void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
|
||||
void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il)
|
||||
{
|
||||
vector<D3D_SHADER_MACRO> m;
|
||||
|
||||
|
@ -1490,7 +1490,7 @@ void GSDevice9::CompileShader(const char *source, size_t size, const char *filen
|
|||
}
|
||||
}
|
||||
|
||||
void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps)
|
||||
void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps)
|
||||
{
|
||||
uint32 flags = 0;
|
||||
|
||||
|
|
|
@ -237,8 +237,8 @@ public:
|
|||
IDirect3DDevice9* operator->() {return m_dev;}
|
||||
operator IDirect3DDevice9*() {return m_dev;}
|
||||
|
||||
void CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
|
||||
void CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps);
|
||||
void CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il);
|
||||
void CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps);
|
||||
|
||||
void SetupVS(VSSelector sel, const VSConstantBuffer* cb);
|
||||
void SetupGS(GSSelector sel, const GSConstantBuffer* cb) {}
|
||||
|
|
|
@ -286,7 +286,7 @@ public:
|
|||
#pragma pack(pop)
|
||||
|
||||
protected:
|
||||
struct {D3D_FEATURE_LEVEL level; string model, vs, gs, ps, cs;} m_shader;
|
||||
struct {D3D_FEATURE_LEVEL level; std::string model, vs, gs, ps, cs;} m_shader;
|
||||
uint32 m_msaa;
|
||||
DXGI_SAMPLE_DESC m_msaa_desc;
|
||||
|
||||
|
|
|
@ -393,7 +393,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
m_convert.vs = vs;
|
||||
for(size_t i = 0; i < countof(m_convert.ps); i++) {
|
||||
ps = m_shader->Compile("convert.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data());
|
||||
string pretty_name = "Convert pipe " + to_string(i);
|
||||
std::string pretty_name = "Convert pipe " + std::to_string(i);
|
||||
m_convert.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps);
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
|
||||
for(size_t i = 0; i < countof(m_merge_obj.ps); i++) {
|
||||
ps = m_shader->Compile("merge.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data());
|
||||
string pretty_name = "Merge pipe " + to_string(i);
|
||||
std::string pretty_name = "Merge pipe " + std::to_string(i);
|
||||
m_merge_obj.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps);
|
||||
}
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
|
||||
for(size_t i = 0; i < countof(m_interlace.ps); i++) {
|
||||
ps = m_shader->Compile("interlace.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data());
|
||||
string pretty_name = "Interlace pipe " + to_string(i);
|
||||
std::string pretty_name = "Interlace pipe " + std::to_string(i);
|
||||
m_interlace.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps);
|
||||
}
|
||||
}
|
||||
|
@ -982,10 +982,10 @@ GLuint GSDeviceOGL::CompilePS(PSSelector sel)
|
|||
return m_shader->Compile("tfx.glsl", "ps_main", GL_FRAGMENT_SHADER, m_shader_tfx_fs.data(), macro);
|
||||
}
|
||||
|
||||
void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const PSSelector& sel, int& nb_shader)
|
||||
void GSDeviceOGL::SelfShaderTestRun(const std::string& dir, const std::string& file, const PSSelector& sel, int& nb_shader)
|
||||
{
|
||||
#ifdef __unix__
|
||||
string out = "/tmp/GSdx_Shader/";
|
||||
std::string out = "/tmp/GSdx_Shader/";
|
||||
GSmkdir(out.c_str());
|
||||
|
||||
out += dir + "/";
|
||||
|
@ -993,7 +993,7 @@ void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const
|
|||
|
||||
out += file;
|
||||
#else
|
||||
string out = file;
|
||||
std::string out = file;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
|
@ -1017,7 +1017,7 @@ void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const
|
|||
#endif
|
||||
}
|
||||
|
||||
void GSDeviceOGL::SelfShaderTestPrint(const string& test, int& nb_shader)
|
||||
void GSDeviceOGL::SelfShaderTestPrint(const std::string& test, int& nb_shader)
|
||||
{
|
||||
fprintf(stderr, "%-25s\t\t%d shaders:\t%d instructions (M %4.2f)\t%d registers (M %4.2f)\n",
|
||||
test.c_str(), nb_shader,
|
||||
|
@ -1031,13 +1031,13 @@ void GSDeviceOGL::SelfShaderTestPrint(const string& test, int& nb_shader)
|
|||
|
||||
void GSDeviceOGL::SelfShaderTest()
|
||||
{
|
||||
string out = "";
|
||||
std::string out;
|
||||
|
||||
#ifdef __unix__
|
||||
setenv("NV50_PROG_DEBUG", "1", 1);
|
||||
#endif
|
||||
|
||||
string test;
|
||||
std::string test;
|
||||
m_shader_inst = 0;
|
||||
m_shader_reg = 0;
|
||||
int nb_shader = 0;
|
||||
|
|
|
@ -579,8 +579,8 @@ public:
|
|||
GLuint CreateSampler(PSSamplerSelector sel);
|
||||
GSDepthStencilOGL* CreateDepthStencil(OMDepthStencilSelector dssel);
|
||||
|
||||
void SelfShaderTestPrint(const string& test, int& nb_shader);
|
||||
void SelfShaderTestRun(const string& dir, const string& file, const PSSelector& sel, int& nb_shader);
|
||||
void SelfShaderTestPrint(const std::string& test, int& nb_shader);
|
||||
void SelfShaderTestRun(const std::string& dir, const std::string& file, const PSSelector& sel, int& nb_shader);
|
||||
void SelfShaderTest();
|
||||
|
||||
void SetupIA(const void* vertex, int vertex_count, const uint32* index, int index_count, int prim);
|
||||
|
|
|
@ -125,9 +125,9 @@ bool GSDialog::OnCommand(HWND hWnd, UINT id, UINT code)
|
|||
return false;
|
||||
}
|
||||
|
||||
string GSDialog::GetText(UINT id)
|
||||
std::string GSDialog::GetText(UINT id)
|
||||
{
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
char* buff = NULL;
|
||||
|
||||
|
@ -183,7 +183,7 @@ void GSDialog::ComboBoxInit(UINT id, const vector<GSSetting>& settings, int32_t
|
|||
|
||||
if(s.value <= maxValue)
|
||||
{
|
||||
string str(s.name);
|
||||
std::string str(s.name);
|
||||
|
||||
if(!s.note.empty())
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
INT_PTR DoModal();
|
||||
|
||||
string GetText(UINT id);
|
||||
std::string GetText(UINT id);
|
||||
int GetTextAsInt(UINT id);
|
||||
|
||||
void SetText(UINT id, const char* str);
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
template<class CG, class KEY, class VALUE>
|
||||
class GSCodeGeneratorFunctionMap : public GSFunctionMap<KEY, VALUE>
|
||||
{
|
||||
string m_name;
|
||||
std::string m_name;
|
||||
void* m_param;
|
||||
hash_map<uint64, VALUE> m_cgmap;
|
||||
GSCodeBuffer m_cb;
|
||||
|
@ -219,7 +219,7 @@ public:
|
|||
|
||||
// if(iJIT_IsProfilingActive()) // always > 0
|
||||
{
|
||||
string name = format("%s<%016llx>()", m_name.c_str(), (uint64)key);
|
||||
std::string name = format("%s<%016llx>()", m_name.c_str(), (uint64)key);
|
||||
|
||||
iJIT_Method_Load ml;
|
||||
|
||||
|
|
|
@ -2274,15 +2274,15 @@ bool GSC_SSX3(const GSFrameInfo& fi, int& skip)
|
|||
class AutoReloadLibrary
|
||||
{
|
||||
private:
|
||||
string m_dllPath, m_loadedDllPath;
|
||||
std::string m_dllPath, m_loadedDllPath;
|
||||
DWORD m_minMsBetweenProbes;
|
||||
time_t m_lastFileModification;
|
||||
DWORD m_lastProbe;
|
||||
HMODULE m_library;
|
||||
|
||||
string GetTempName()
|
||||
std::string GetTempName()
|
||||
{
|
||||
string result = m_loadedDllPath + ".tmp"; //default name
|
||||
std::string result = m_loadedDllPath + ".tmp"; //default name
|
||||
TCHAR tmpPath[MAX_PATH], tmpName[MAX_PATH];
|
||||
DWORD ret = GetTempPath(MAX_PATH, tmpPath);
|
||||
if(ret && ret <= MAX_PATH && GetTempFileName(tmpPath, TEXT("GSdx"), 0, tmpName))
|
||||
|
@ -2305,7 +2305,7 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
AutoReloadLibrary( const string dllPath, const int minMsBetweenProbes=100 )
|
||||
AutoReloadLibrary( const std::string dllPath, const int minMsBetweenProbes=100 )
|
||||
: m_minMsBetweenProbes( minMsBetweenProbes )
|
||||
, m_dllPath( dllPath )
|
||||
, m_lastFileModification( 0 )
|
||||
|
|
|
@ -97,7 +97,7 @@ GtkWidget* CreateComboBoxFromVector(const vector<GSSetting>& s, const char* opt_
|
|||
|
||||
for(size_t i = 0; i < s.size(); i++)
|
||||
{
|
||||
string label = s[i].name;
|
||||
std::string label = s[i].name;
|
||||
|
||||
if(!s[i].note.empty()) label += format(" (%s)", s[i].note.c_str());
|
||||
|
||||
|
|
|
@ -2012,7 +2012,7 @@ void GSLocalMemory::ReadTextureBlock4HHP(uint32 bp, uint8* dst, int dstpitch, co
|
|||
|
||||
#include "GSTextureSW.h"
|
||||
|
||||
void GSLocalMemory::SaveBMP(const string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h)
|
||||
void GSLocalMemory::SaveBMP(const std::string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h)
|
||||
{
|
||||
int pitch = w * 4;
|
||||
int size = pitch * h;
|
||||
|
|
|
@ -917,6 +917,6 @@ public:
|
|||
|
||||
//
|
||||
|
||||
void SaveBMP(const string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h);
|
||||
void SaveBMP(const std::string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h);
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ struct {
|
|||
|
||||
namespace GSPng {
|
||||
|
||||
bool SaveFile(const string& file, const Format fmt, const uint8* const image,
|
||||
bool SaveFile(const std::string& file, const Format fmt, const uint8* const image,
|
||||
uint8* const row, const int width, const int height, const int pitch,
|
||||
const int compression, const bool rb_swapped = false, const bool first_image = false)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace GSPng {
|
|||
return success;
|
||||
}
|
||||
|
||||
bool Save(GSPng::Format fmt, const string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped)
|
||||
bool Save(GSPng::Format fmt, const std::string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped)
|
||||
{
|
||||
std::string root = file;
|
||||
root.replace(file.length() - 4, 4, "");
|
||||
|
@ -128,7 +128,7 @@ namespace GSPng {
|
|||
return SaveFile(filename, fmt, image, row.get(), w, h, pitch, compression);
|
||||
}
|
||||
|
||||
Transaction::Transaction(GSPng::Format fmt, const string& file, const uint8* image, int w, int h, int pitch, int compression)
|
||||
Transaction::Transaction(GSPng::Format fmt, const std::string& file, const uint8* image, int w, int h, int pitch, int compression)
|
||||
: m_fmt(fmt), m_file(file), m_w(w), m_h(h), m_pitch(pitch), m_compression(compression)
|
||||
{
|
||||
// Note: yes it would be better to use shared pointer
|
||||
|
|
|
@ -46,11 +46,11 @@ namespace GSPng {
|
|||
int m_pitch;
|
||||
int m_compression;
|
||||
|
||||
Transaction(GSPng::Format fmt, const string& file, const uint8* image, int w, int h, int pitch, int compression);
|
||||
Transaction(GSPng::Format fmt, const std::string& file, const uint8* image, int w, int h, int pitch, int compression);
|
||||
~Transaction();
|
||||
};
|
||||
|
||||
bool Save(GSPng::Format fmt, const string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped = false);
|
||||
bool Save(GSPng::Format fmt, const std::string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped = false);
|
||||
|
||||
void Process(std::shared_ptr<Transaction> &item);
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ void GSRenderer::VSync(int field)
|
|||
|
||||
double fps = 1000.0f / m_perfmon.Get(GSPerfMon::Frame);
|
||||
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
#ifdef GSTITLEINFO_API_FORCE_VERBOSE
|
||||
if(1)//force verbose reply
|
||||
|
@ -356,7 +356,7 @@ void GSRenderer::VSync(int field)
|
|||
{
|
||||
//GSdx owns the window's title, be verbose.
|
||||
|
||||
string s2 = m_regs->SMODE2.INT ? (string("Interlaced ") + (m_regs->SMODE2.FFMD ? "(frame)" : "(field)")) : "Progressive";
|
||||
std::string s2 = m_regs->SMODE2.INT ? (std::string("Interlaced ") + (m_regs->SMODE2.FFMD ? "(frame)" : "(field)")) : "Progressive";
|
||||
|
||||
s = format(
|
||||
"%lld | %d x %d | %.2f fps (%d%%) | %s - %s | %s | %d S/%d P/%d D | %d%% CPU | %.2f | %.2f",
|
||||
|
@ -508,7 +508,7 @@ void GSRenderer::VSync(int field)
|
|||
}
|
||||
}
|
||||
|
||||
bool GSRenderer::MakeSnapshot(const string& path)
|
||||
bool GSRenderer::MakeSnapshot(const std::string& path)
|
||||
{
|
||||
if(m_snapshot.empty())
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class GSRenderer : public GSState
|
||||
{
|
||||
GSCapture m_capture;
|
||||
string m_snapshot;
|
||||
std::string m_snapshot;
|
||||
int m_shader;
|
||||
|
||||
bool Merge(int field);
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
virtual bool CreateDevice(GSDevice* dev);
|
||||
virtual void ResetDevice();
|
||||
virtual void VSync(int field);
|
||||
virtual bool MakeSnapshot(const string& path);
|
||||
virtual bool MakeSnapshot(const std::string& path);
|
||||
virtual void KeyEvent(GSKeyEventData* e);
|
||||
virtual bool CanUpscale() {return false;}
|
||||
virtual int GetUpscaleMultiplier() {return 1;}
|
||||
|
|
|
@ -2009,7 +2009,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
|
|||
{
|
||||
for(auto d : devs)
|
||||
{
|
||||
string path = d.tmppath + "/" + entry;
|
||||
std::string path = d.tmppath + "/" + entry;
|
||||
|
||||
FILE* f = fopen(path.c_str(), "rb");
|
||||
|
||||
|
@ -2092,7 +2092,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
|
|||
|
||||
for(size_t i = 0; i < binaries.size(); i++)
|
||||
{
|
||||
string path = devs[i].tmppath + "/" + entry;
|
||||
std::string path = devs[i].tmppath + "/" + entry;
|
||||
|
||||
FILE* f = fopen(path.c_str(), "wb");
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@ void GSRendererCS::Draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
string str[2];
|
||||
std::string str[2];
|
||||
|
||||
str[0] = format("%d", vs_sel.tme);
|
||||
str[1] = format("%d", vs_sel.fst);
|
||||
|
@ -566,7 +566,7 @@ void GSRendererCS::Draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
string str[2];
|
||||
std::string str[2];
|
||||
|
||||
str[0] = format("%d", gs_sel.iip);
|
||||
str[1] = format("%d", j == 0 ? gs_sel.prim : GS_SPRITE_CLASS);
|
||||
|
@ -605,7 +605,7 @@ void GSRendererCS::Draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
string str[15];
|
||||
std::string str[15];
|
||||
|
||||
str[0] = format("%d", PS_BATCH_SIZE);
|
||||
str[1] = format("%d", context->FRAME.PSM);
|
||||
|
|
|
@ -869,7 +869,7 @@ void GSRendererHW::Draw()
|
|||
{
|
||||
uint64 frame = m_perfmon.GetFrame();
|
||||
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
if (s_n >= s_saven) {
|
||||
// Dump Register state
|
||||
|
@ -1039,7 +1039,7 @@ void GSRendererHW::Draw()
|
|||
{
|
||||
uint64 frame = m_perfmon.GetFrame();
|
||||
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
if(s_save && s_n >= s_saven)
|
||||
{
|
||||
|
|
|
@ -1010,9 +1010,9 @@ void GSRendererOGL::SendDraw()
|
|||
for (const auto& it: m_drawlist)
|
||||
++frequency[it];
|
||||
|
||||
string message;
|
||||
std::string message;
|
||||
for (const auto& it: frequency)
|
||||
message += " " + to_string(it.first) + "(" + to_string(it.second) + ")";
|
||||
message += " " + std::to_string(it.first) + "(" + std::to_string(it.second) + ")";
|
||||
|
||||
GL_PERF("Split single draw (%d sprites) into %zu draws: consecutive draws(frequency):%s",
|
||||
m_index.tail / nb_vertex, m_drawlist.size(), message.c_str());
|
||||
|
|
|
@ -488,7 +488,7 @@ void GSRendererSW::Draw()
|
|||
// It will breaks the few games that really uses 16 bits RT
|
||||
bool texture_shuffle = ((context->FRAME.PSM & 0x2) && ((context->TEX0.PSM & 3) == 2) && (m_vt.m_primclass == GS_SPRITE_CLASS));
|
||||
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
if(s_n >= s_saven)
|
||||
{
|
||||
|
@ -1539,7 +1539,7 @@ void GSRendererSW::SharedData::UpdateSource()
|
|||
{
|
||||
uint64 frame = m_parent->m_perfmon.GetFrame();
|
||||
|
||||
string s;
|
||||
std::string s;
|
||||
|
||||
if(m_parent->s_savet && m_parent->s_n >= m_parent->s_saven)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ GSShaderOGL::~GSShaderOGL()
|
|||
glDeleteProgramPipelines(m_pipe_to_delete.size(), &m_pipe_to_delete[0]);
|
||||
}
|
||||
|
||||
GLuint GSShaderOGL::LinkPipeline(const string& pretty_print, GLuint vs, GLuint gs, GLuint ps)
|
||||
GLuint GSShaderOGL::LinkPipeline(const std::string& pretty_print, GLuint vs, GLuint gs, GLuint ps)
|
||||
{
|
||||
GLuint p;
|
||||
glCreateProgramPipelines(1, &p);
|
||||
|
|
|
@ -45,7 +45,7 @@ class GSShaderOGL {
|
|||
void BindPipeline(GLuint pipe);
|
||||
|
||||
GLuint Compile(const std::string& glsl_file, const std::string& entry, GLenum type, const char* glsl_h_code, const std::string& macro_sel = "");
|
||||
GLuint LinkPipeline(const string& pretty_print, GLuint vs, GLuint gs, GLuint ps);
|
||||
GLuint LinkPipeline(const std::string& pretty_print, GLuint vs, GLuint gs, GLuint ps);
|
||||
|
||||
// Same as above but for not separated build
|
||||
void BindProgram(GLuint vs, GLuint gs, GLuint ps);
|
||||
|
|
|
@ -1553,7 +1553,7 @@ void GSState::FlushWrite()
|
|||
*/
|
||||
/*
|
||||
static int n = 0;
|
||||
string s;
|
||||
std::string s;
|
||||
s = format("c:\\temp1\\[%04d]_%05x_%d_%d_%d_%d_%d_%d.bmp",
|
||||
n++, (int)m_env.BITBLTBUF.DBP, (int)m_env.BITBLTBUF.DBW, (int)m_env.BITBLTBUF.DPSM,
|
||||
r.left, r.top, r.right, r.bottom);
|
||||
|
@ -1750,7 +1750,7 @@ void GSState::Write(const uint8* mem, int len)
|
|||
|
||||
/*
|
||||
static int n = 0;
|
||||
string s;
|
||||
std::string s;
|
||||
s = format("c:\\temp1\\[%04d]_%05x_%d_%d_%d_%d_%d_%d.bmp",
|
||||
n++, (int)blit.DBP, (int)blit.DBW, (int)blit.DPSM,
|
||||
r.left, r.top, r.right, r.bottom);
|
||||
|
@ -1831,7 +1831,7 @@ void GSState::Read(uint8* mem, int len)
|
|||
m_mem.ReadImageX(m_tr.x, m_tr.y, mem, len, m_env.BITBLTBUF, m_env.TRXPOS, m_env.TRXREG);
|
||||
|
||||
if(s_dump && s_save && s_n >= s_saven) {
|
||||
string s= m_dump_root + format("%05d_read_%05x_%d_%d_%d_%d_%d_%d.bmp",
|
||||
std::string s = m_dump_root + format("%05d_read_%05x_%d_%d_%d_%d_%d_%d.bmp",
|
||||
s_n, (int)m_env.BITBLTBUF.SBP, (int)m_env.BITBLTBUF.SBW, (int)m_env.BITBLTBUF.SPSM,
|
||||
r.left, r.top, r.right, r.bottom);
|
||||
m_mem.SaveBMP(s, m_env.BITBLTBUF.SBP, m_env.BITBLTBUF.SBW, m_env.BITBLTBUF.SPSM, r.right, r.bottom);
|
||||
|
|
|
@ -233,7 +233,7 @@ public:
|
|||
bool s_savef;
|
||||
int s_saven;
|
||||
int s_savel;
|
||||
string m_dump_root;
|
||||
std::string m_dump_root;
|
||||
|
||||
public:
|
||||
GSState();
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
virtual bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) = 0;
|
||||
virtual void Unmap() = 0;
|
||||
virtual void GenerateMipmap() {}
|
||||
virtual bool Save(const string& fn, bool dds = false) = 0;
|
||||
virtual bool Save(const std::string& fn, bool dds = false) = 0;
|
||||
virtual uint32 GetID() { return 0; }
|
||||
|
||||
GSVector2 GetScale() const {return m_scale;}
|
||||
|
|
|
@ -93,7 +93,7 @@ void GSTexture11::Unmap()
|
|||
}
|
||||
}
|
||||
|
||||
bool GSTexture11::Save(const string& fn, bool dds)
|
||||
bool GSTexture11::Save(const std::string& fn, bool dds)
|
||||
{
|
||||
CComPtr<ID3D11Texture2D> res;
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0);
|
||||
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0);
|
||||
void Unmap();
|
||||
bool Save(const string& fn, bool dds = false);
|
||||
bool Save(const std::string& fn, bool dds = false);
|
||||
|
||||
operator ID3D11Texture2D*();
|
||||
operator ID3D11ShaderResourceView*();
|
||||
|
|
|
@ -142,7 +142,7 @@ void GSTexture9::Unmap()
|
|||
}
|
||||
}
|
||||
|
||||
bool GSTexture9::Save(const string& fn, bool dds)
|
||||
bool GSTexture9::Save(const std::string& fn, bool dds)
|
||||
{
|
||||
bool rb_swapped = true;
|
||||
CComPtr<IDirect3DSurface9> surface;
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0);
|
||||
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0);
|
||||
void Unmap();
|
||||
bool Save(const string& fn, bool dds = false);
|
||||
bool Save(const std::string& fn, bool dds = false);
|
||||
|
||||
operator IDirect3DSurface9*();
|
||||
operator IDirect3DTexture9*();
|
||||
|
|
|
@ -306,7 +306,7 @@ bool GSTextureCacheSW::Texture::Update(const GSVector4i& rect)
|
|||
|
||||
#include "GSTextureSW.h"
|
||||
|
||||
bool GSTextureCacheSW::Texture::Save(const string& fn, bool dds) const
|
||||
bool GSTextureCacheSW::Texture::Save(const std::string& fn, bool dds) const
|
||||
{
|
||||
const uint32* RESTRICT clut = m_state->m_mem.m_clut;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual ~Texture();
|
||||
|
||||
bool Update(const GSVector4i& r);
|
||||
bool Save(const string& fn, bool dds = false) const;
|
||||
bool Save(const std::string& fn, bool dds = false) const;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
|
@ -103,7 +103,7 @@ void GSDevice11::SetupVS(VSSelector sel, const VSConstantBuffer* cb)
|
|||
|
||||
if(i == m_vs.end())
|
||||
{
|
||||
string str[4];
|
||||
std::string str[4];
|
||||
|
||||
str[0] = format("%d", sel.bppz);
|
||||
str[1] = format("%d", sel.tme);
|
||||
|
@ -168,7 +168,7 @@ void GSDevice11::SetupGS(GSSelector sel, const GSConstantBuffer* cb)
|
|||
}
|
||||
else
|
||||
{
|
||||
string str[4];
|
||||
std::string str[4];
|
||||
|
||||
str[0] = format("%d", sel.iip);
|
||||
str[1] = format("%d", sel.prim);
|
||||
|
@ -209,7 +209,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
|
||||
if(i == m_ps.end())
|
||||
{
|
||||
string str[21];
|
||||
std::string str[21];
|
||||
|
||||
str[0] = format("%d", sel.fst);
|
||||
str[1] = format("%d", sel.wms);
|
||||
|
@ -430,7 +430,7 @@ void GSDevice11::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uin
|
|||
{
|
||||
(bsel.a == 0 ? bd.RenderTarget[0].SrcBlend : bd.RenderTarget[0].DestBlend) = D3D11_BLEND_ONE;
|
||||
|
||||
const string afixstr = format("%d >> 7", afix);
|
||||
const std::string afixstr = format("%d >> 7", afix);
|
||||
const char *col[3] = {"Cs", "Cd", "0"};
|
||||
const char *alpha[3] = {"As", "Ad", afixstr.c_str()};
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ void GSDevice9::SetupVS(VSSelector sel, const VSConstantBuffer* cb)
|
|||
|
||||
if(i == m_vs.end())
|
||||
{
|
||||
string str[5];
|
||||
std::string str[5];
|
||||
|
||||
str[0] = format("%d", sel.bppz);
|
||||
str[1] = format("%d", sel.tme);
|
||||
|
@ -137,7 +137,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
|
|||
|
||||
if(i == m_ps.end())
|
||||
{
|
||||
string str[18];
|
||||
std::string str[18];
|
||||
|
||||
str[0] = format("%d", sel.fst);
|
||||
str[1] = format("%d", sel.wms);
|
||||
|
@ -323,7 +323,7 @@ void GSDevice9::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uint
|
|||
{
|
||||
(bsel.a == 0 ? bs->SrcBlend : bs->DestBlend) = D3DBLEND_ONE;
|
||||
|
||||
const string afixstr = format("%d >> 7", afix);
|
||||
const std::string afixstr = format("%d >> 7", afix);
|
||||
const char *col[3] = {"Cs", "Cd", "0"};
|
||||
const char *alpha[3] = {"As", "Ad", afixstr.c_str()};
|
||||
|
||||
|
|
|
@ -37,5 +37,5 @@ public:
|
|||
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) {return true;}
|
||||
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) {return false;}
|
||||
void Unmap() {}
|
||||
bool Save(const string& fn, bool dds = false) {return false;}
|
||||
bool Save(const std::string& fn, bool dds = false) {return false;}
|
||||
};
|
||||
|
|
|
@ -463,7 +463,7 @@ void GSTextureOGL::GenerateMipmap()
|
|||
}
|
||||
}
|
||||
|
||||
bool GSTextureOGL::Save(const string& fn, bool dds)
|
||||
bool GSTextureOGL::Save(const std::string& fn, bool dds)
|
||||
{
|
||||
// Collect the texture data
|
||||
uint32 pitch = 4 * m_size.x;
|
||||
|
|
|
@ -72,7 +72,7 @@ class GSTextureOGL final : public GSTexture
|
|||
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) final;
|
||||
void Unmap() final;
|
||||
void GenerateMipmap() final;
|
||||
bool Save(const string& fn, bool dds = false) final;
|
||||
bool Save(const std::string& fn, bool dds = false) final;
|
||||
|
||||
bool IsBackbuffer() { return (m_type == GSTexture::Backbuffer); }
|
||||
bool IsDss() { return (m_type == GSTexture::DepthStencil); }
|
||||
|
|
|
@ -85,7 +85,7 @@ void GSTextureSW::Unmap()
|
|||
m_mapped.clear(std::memory_order_release);
|
||||
}
|
||||
|
||||
bool GSTextureSW::Save(const string& fn, bool dds)
|
||||
bool GSTextureSW::Save(const std::string& fn, bool dds)
|
||||
{
|
||||
if(dds) return false; // not implemented
|
||||
|
||||
|
|
|
@ -38,5 +38,5 @@ public:
|
|||
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0);
|
||||
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0);
|
||||
void Unmap();
|
||||
bool Save(const string& fn, bool dds = false);
|
||||
bool Save(const std::string& fn, bool dds = false);
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ class GSUniformBufferOGL {
|
|||
uint8* m_cache; // content of the previous upload
|
||||
|
||||
public:
|
||||
GSUniformBufferOGL(const string& pretty_name, GLuint index, uint32 size)
|
||||
GSUniformBufferOGL(const std::string& pretty_name, GLuint index, uint32 size)
|
||||
: m_index(index), m_size(size)
|
||||
{
|
||||
glGenBuffers(1, &m_buffer);
|
||||
|
|
|
@ -275,7 +275,7 @@ void GSUtil::GetDeviceDescs(list<OCLDeviceDesc>& dl)
|
|||
|
||||
for(auto& device : ds)
|
||||
{
|
||||
string type;
|
||||
std::string type;
|
||||
|
||||
switch(device.getInfo<CL_DEVICE_TYPE>())
|
||||
{
|
||||
|
@ -317,13 +317,13 @@ void GSUtil::GetDeviceDescs(list<OCLDeviceDesc>& dl)
|
|||
}
|
||||
}
|
||||
|
||||
string GSUtil::GetDeviceUniqueName(cl::Device& device)
|
||||
std::string GSUtil::GetDeviceUniqueName(cl::Device& device)
|
||||
{
|
||||
std::string vendor = device.getInfo<CL_DEVICE_VENDOR>();
|
||||
std::string name = device.getInfo<CL_DEVICE_NAME>();
|
||||
std::string version = device.getInfo<CL_DEVICE_OPENCL_C_VERSION>();
|
||||
|
||||
string type;
|
||||
std::string type;
|
||||
|
||||
switch(device.getInfo<CL_DEVICE_TYPE>())
|
||||
{
|
||||
|
|
|
@ -29,9 +29,9 @@ struct OCLDeviceDesc
|
|||
#ifdef ENABLE_OPENCL
|
||||
cl::Device device;
|
||||
#endif
|
||||
string name;
|
||||
std::string name;
|
||||
int version;
|
||||
string tmppath;
|
||||
std::string tmppath;
|
||||
};
|
||||
|
||||
class GSUtil
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
#ifdef ENABLE_OPENCL
|
||||
static void GetDeviceDescs(list<OCLDeviceDesc>& dl);
|
||||
static string GetDeviceUniqueName(cl::Device& device);
|
||||
static std::string GetDeviceUniqueName(cl::Device& device);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
GSWnd() : m_managed(false) {};
|
||||
virtual ~GSWnd() {};
|
||||
|
||||
virtual bool Create(const string& title, int w, int h) = 0;
|
||||
virtual bool Create(const std::string& title, int w, int h) = 0;
|
||||
virtual bool Attach(void* handle, bool managed = true) = 0;
|
||||
virtual void Detach() = 0;
|
||||
bool IsManaged() const {return m_managed;}
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
GSWndGL() : m_ctx_attached(false), m_vsync_change_requested(false), m_vsync(0) {};
|
||||
virtual ~GSWndGL() {};
|
||||
|
||||
virtual bool Create(const string& title, int w, int h) = 0;
|
||||
virtual bool Create(const std::string& title, int w, int h) = 0;
|
||||
virtual bool Attach(void* handle, bool managed = true) = 0;
|
||||
virtual void Detach() = 0;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ LRESULT GSWndDX::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
return DefWindowProc((HWND)m_hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
bool GSWndDX::Create(const string& title, int w, int h)
|
||||
bool GSWndDX::Create(const std::string& title, int w, int h)
|
||||
{
|
||||
if(m_hWnd)
|
||||
throw GSDXRecoverableError();
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
GSWndDX();
|
||||
virtual ~GSWndDX();
|
||||
|
||||
bool Create(const string& title, int w, int h);
|
||||
bool Create(const std::string& title, int w, int h);
|
||||
bool Attach(void* handle, bool managed = true);
|
||||
void Detach();
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ void GSWndEGL::Detach()
|
|||
DestroyNativeResources();
|
||||
}
|
||||
|
||||
bool GSWndEGL::Create(const string& title, int w, int h)
|
||||
bool GSWndEGL::Create(const std::string& title, int w, int h)
|
||||
{
|
||||
if(w <= 0 || h <= 0) {
|
||||
w = theApp.GetConfigI("ModeWidth");
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
GSWndEGL(int platform);
|
||||
virtual ~GSWndEGL() {};
|
||||
|
||||
bool Create(const string& title, int w, int h) final;
|
||||
bool Create(const std::string& title, int w, int h) final;
|
||||
bool Attach(void* handle, bool managed = true) final;
|
||||
void Detach() final;
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ void GSWndOGL::Detach()
|
|||
}
|
||||
}
|
||||
|
||||
bool GSWndOGL::Create(const string& title, int w, int h)
|
||||
bool GSWndOGL::Create(const std::string& title, int w, int h)
|
||||
{
|
||||
if(m_NativeWindow)
|
||||
throw GSDXRecoverableError();
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
GSWndOGL();
|
||||
virtual ~GSWndOGL() {};
|
||||
|
||||
bool Create(const string& title, int w, int h);
|
||||
bool Create(const std::string& title, int w, int h);
|
||||
bool Attach(void* handle, bool managed = true);
|
||||
void Detach();
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ void GSWndWGL::CloseWGLDisplay()
|
|||
// Used by GSReplay. At least for now.
|
||||
// More or less copy pasted from GSWndDX::Create and GSWndWGL::Attach with a few
|
||||
// modifications
|
||||
bool GSWndWGL::Create(const string& title, int w, int h)
|
||||
bool GSWndWGL::Create(const std::string& title, int w, int h)
|
||||
{
|
||||
if(m_NativeWindow) return false;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
GSWndWGL();
|
||||
virtual ~GSWndWGL() {};
|
||||
|
||||
bool Create(const string& title, int w, int h);
|
||||
bool Create(const std::string& title, int w, int h);
|
||||
bool Attach(void* handle, bool managed = true);
|
||||
void Detach();
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ void GSdxApp::Init()
|
|||
m_default_configuration["dump"] = "0";
|
||||
m_default_configuration["extrathreads"] = "2";
|
||||
m_default_configuration["extrathreads_height"] = "4";
|
||||
m_default_configuration["filter"] = to_string(static_cast<int8>(BiFiltering::PS2));
|
||||
m_default_configuration["filter"] = std::to_string(static_cast<int8>(BiFiltering::PS2));
|
||||
m_default_configuration["force_texture_clear"] = "0";
|
||||
m_default_configuration["fxaa"] = "0";
|
||||
m_default_configuration["interlace"] = "7";
|
||||
|
@ -404,9 +404,9 @@ void GSdxApp::Init()
|
|||
m_default_configuration["override_GL_ARB_texture_barrier"] = "-1";
|
||||
m_default_configuration["override_GL_EXT_texture_filter_anisotropic"] = "-1";
|
||||
m_default_configuration["paltex"] = "0";
|
||||
m_default_configuration["png_compression_level"] = to_string(Z_BEST_SPEED);
|
||||
m_default_configuration["png_compression_level"] = std::to_string(Z_BEST_SPEED);
|
||||
m_default_configuration["preload_frame_with_gs_data"] = "0";
|
||||
m_default_configuration["Renderer"] = to_string(static_cast<int>(GSRendererType::Default));
|
||||
m_default_configuration["Renderer"] = std::to_string(static_cast<int>(GSRendererType::Default));
|
||||
m_default_configuration["resx"] = "1024";
|
||||
m_default_configuration["resy"] = "1024";
|
||||
m_default_configuration["save"] = "0";
|
||||
|
@ -441,7 +441,7 @@ void GSdxApp::Init()
|
|||
m_default_configuration["UserHacks_SpriteHack"] = "0";
|
||||
m_default_configuration["UserHacks_TCOffset"] = "0";
|
||||
m_default_configuration["UserHacks_TextureInsideRt"] = "0";
|
||||
m_default_configuration["UserHacks_TriFilter"] = to_string(static_cast<int8>(TriFiltering::None));
|
||||
m_default_configuration["UserHacks_TriFilter"] = std::to_string(static_cast<int8>(TriFiltering::None));
|
||||
m_default_configuration["UserHacks_WildHack"] = "0";
|
||||
m_default_configuration["wrap_gs_mem"] = "0";
|
||||
m_default_configuration["vsync"] = "0";
|
||||
|
@ -511,7 +511,7 @@ void GSdxApp::SetConfigDir(const char* dir)
|
|||
}
|
||||
}
|
||||
|
||||
string GSdxApp::GetConfigS(const char* entry)
|
||||
std::string GSdxApp::GetConfigS(const char* entry)
|
||||
{
|
||||
char buff[4096] = {0};
|
||||
auto def = m_default_configuration.find(entry);
|
||||
|
@ -523,7 +523,7 @@ string GSdxApp::GetConfigS(const char* entry)
|
|||
GetPrivateProfileString(m_section.c_str(), entry, "", buff, countof(buff), m_ini.c_str());
|
||||
}
|
||||
|
||||
return string(buff);
|
||||
return {buff};
|
||||
}
|
||||
|
||||
void GSdxApp::SetConfig(const char* entry, const char* value)
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
T GetConfigT(const char* entry) { return static_cast<T>(GetConfigI(entry)); }
|
||||
int GetConfigI(const char* entry);
|
||||
bool GetConfigB(const char* entry);
|
||||
string GetConfigS(const char* entry);
|
||||
std::string GetConfigS(const char* entry);
|
||||
|
||||
void SetCurrentRendererType(GSRendererType type);
|
||||
GSRendererType GetCurrentRendererType();
|
||||
|
|
|
@ -583,7 +583,7 @@ void GPULocalMemory::Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst,
|
|||
|
||||
#include "GSTextureSW.h"
|
||||
|
||||
void GPULocalMemory::SaveBMP(const string& fn, const GSVector4i& r2, int tp, int cx, int cy)
|
||||
void GPULocalMemory::SaveBMP(const std::string& fn, const GSVector4i& r2, int tp, int cx, int cy)
|
||||
{
|
||||
GSVector4i r;
|
||||
|
||||
|
|
|
@ -82,5 +82,5 @@ public:
|
|||
void Expand16(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
||||
void Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
||||
|
||||
void SaveBMP(const string& fn, const GSVector4i& r, int tp, int cx, int cy);
|
||||
void SaveBMP(const std::string& fn, const GSVector4i& r, int tp, int cx, int cy);
|
||||
};
|
||||
|
|
|
@ -183,7 +183,7 @@ void GPURenderer::VSync()
|
|||
int w = r.width() << m_scale.x;
|
||||
int h = r.height() << m_scale.y;
|
||||
|
||||
string s = format(
|
||||
std::string s = format(
|
||||
"%lld | %d x %d | %.2f fps (%d%%) | %d/%d | %d%% CPU | %.2f | %.2f",
|
||||
m_perfmon.GetFrame(), w, h, fps, (int)(100.0 * fps / m_env.GetFPS()),
|
||||
(int)m_perfmon.Get(GSPerfMon::Prim),
|
||||
|
@ -208,7 +208,7 @@ void GPURenderer::VSync()
|
|||
m_dev->Present(r.fit(m_aspectratio), 0);
|
||||
}
|
||||
|
||||
bool GPURenderer::MakeSnapshot(const string& path)
|
||||
bool GPURenderer::MakeSnapshot(const std::string& path)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
virtual bool Create(void* hWnd);
|
||||
virtual void VSync();
|
||||
virtual bool MakeSnapshot(const string& path);
|
||||
virtual bool MakeSnapshot(const std::string& path);
|
||||
};
|
||||
|
||||
template<class Vertex>
|
||||
|
|
|
@ -58,7 +58,7 @@ void GPUSettingsDlg::OnInit()
|
|||
{
|
||||
m_modes.push_back(mode);
|
||||
|
||||
string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate);
|
||||
std::string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate);
|
||||
|
||||
ComboBoxAppend(IDC_RESOLUTION, str.c_str(), (LPARAM)&m_modes.back(), w == mode.Width && h == mode.Height && hz == mode.RefreshRate);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ protected:
|
|||
int s_n;
|
||||
bool dump_enable = false;
|
||||
|
||||
void Dump(const string& s, uint32 TP, const GSVector4i& r, int inc = true)
|
||||
void Dump(const std::string& s, uint32 TP, const GSVector4i& r, int inc = true)
|
||||
{
|
||||
//if(m_perfmon.GetFrame() < 1000)
|
||||
//if((m_env.TWIN.u32 & 0xfffff) == 0)
|
||||
|
@ -105,12 +105,12 @@ protected:
|
|||
#ifdef DEBUG
|
||||
dir = 2;
|
||||
#endif
|
||||
string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str());
|
||||
std::string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str());
|
||||
|
||||
m_mem.SaveBMP(path, r, TP, m_env.CLUT.X, m_env.CLUT.Y);
|
||||
}
|
||||
|
||||
void Dump(const string& s, int inc = true)
|
||||
void Dump(const std::string& s, int inc = true)
|
||||
{
|
||||
Dump(s, 2, GSVector4i(0, 0, 1024, 512), inc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue