UI: Add helper functions for getting program data dir

Adds C++ functions for getting system-local specific data directories
rather than user-specific data directories
This commit is contained in:
jp9000 committed 2016-07-06 03:47:51 -07:00
1 parent 4f4d7cde7e
commit b3de68fa22
2 files changed
+13

No files matched your search

+10
View File
@@ -1436,6 +1436,16 @@ char *GetConfigPathPtr(const char *name)
}
}
int GetProgramDataPath(char *path, size_t size, const char *name)
{
return os_get_program_data_path(path, size, name);
}
char *GetProgramDataPathPtr(const char *name)
{
return os_get_program_data_path_ptr(name);
}
bool GetFileSafeName(const char *name, std::string &file)
{
size_t base_len = strlen(name);
+3
View File
@@ -136,6 +136,9 @@ public:
int GetConfigPath(char *path, size_t size, const char *name);
char *GetConfigPathPtr(const char *name);
int GetProgramDataPath(char *path, size_t size, const char *name);
char *GetProgramDataPathPtr(const char *name);
inline OBSApp *App() {return static_cast<OBSApp*>(qApp);}
inline config_t *GetGlobalConfig() {return App()->GlobalConfig();}