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 2016-07-06 01:34:16 -07:00
parent 4f4d7cde7e
commit b3de68fa22
2 changed files with 13 additions and 0 deletions

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);

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();}