mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Misc
This commit is contained in:
1 parent
af2245c612
commit
a893d5cdc2
3 files changed
+18
-1
No files matched your search
@@ -124,3 +124,16 @@ void deleteFile(const char *file)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
std::string getDir(const std::string &path)
|
||||
{
|
||||
int n = path.size() - 1;
|
||||
while (n >= 0 && path[n] != '\\' && path[n] != '/')
|
||||
n--;
|
||||
std::string cutpath = path.substr(0, n);
|
||||
for (int i = 0; i < cutpath.size(); i++)
|
||||
{
|
||||
if (cutpath[i] == '\\') cutpath[i] = '/';
|
||||
}
|
||||
return cutpath;
|
||||
}
|
||||
@@ -10,3 +10,5 @@ bool readFileToString(bool text_file, const char *filename, std::string &str);
|
||||
// Beginnings of a directory utility system. TODO: Improve.
|
||||
size_t getFilesInDir(const char *directory, std::vector<std::string> *files);
|
||||
void deleteFile(const char *file);
|
||||
|
||||
std::string getDir(const std::string &path);
|
||||
@@ -37,7 +37,9 @@ bool CompileShader(const char *source, GLuint shader, const char *filename) {
|
||||
ELOG("Error in shader compilation of %s!\n", filename);
|
||||
ELOG("Info log: %s\n", infoLog);
|
||||
ELOG("Shader source:\n%s\n", (const char *)source);
|
||||
exit(1);
|
||||
#ifdef ANDROID
|
||||
exit(1);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user