mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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:
parent
4f4d7cde7e
commit
b3de68fa22
|
@ -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);
|
||||
|
|
|
@ -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();}
|
||||
|
|
Loading…
Reference in a new issue