mirror of https://github.com/PCSX2/pcsx2.git
GS: fix unix compatibility
This commit is contained in:
parent
8bfe851446
commit
1cbd959ae8
|
@ -330,9 +330,9 @@ GSRendererType GSUtil::GetBestRenderer()
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
void GSmkdir(const wchar_t* dir)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (!CreateDirectory(dir, nullptr)) {
|
||||
DWORD errorID = ::GetLastError();
|
||||
if (errorID != ERROR_ALREADY_EXISTS) {
|
||||
|
@ -340,6 +340,8 @@ void GSmkdir(const wchar_t* dir)
|
|||
}
|
||||
}
|
||||
#else
|
||||
void GSmkdir(const char* dir)
|
||||
{
|
||||
int err = mkdir(dir, 0777);
|
||||
if (!err && errno != EEXIST)
|
||||
fprintf(stderr, "Failed to create directory: %s\n", dir);
|
||||
|
|
|
@ -52,7 +52,11 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
void GSmkdir(const wchar_t* dir);
|
||||
#else
|
||||
void GSmkdir(const char* dir);
|
||||
#endif
|
||||
std::string GStempdir();
|
||||
|
||||
const char* psm_str(int psm);
|
||||
|
|
|
@ -49,7 +49,11 @@ public:
|
|||
bool WriteIniString(const char* lpAppName, const char* lpKeyName, const char* pString, const char* lpFileName);
|
||||
int GetIniInt(const char* lpAppName, const char* lpKeyName, int nDefault, const char* lpFileName);
|
||||
|
||||
#ifdef _WIN32
|
||||
bool LoadResource(int id, std::vector<char>& buff, const wchar_t* type = nullptr);
|
||||
#else
|
||||
bool LoadResource(int id, std::vector<char>& buff, const char* type = nullptr);
|
||||
#endif
|
||||
|
||||
void SetConfig(const char* entry, const char* value);
|
||||
void SetConfig(const char* entry, int value);
|
||||
|
|
Loading…
Reference in New Issue