mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-22 05:54:56 -04: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:
1 parent
4f4d7cde7e
commit
b3de68fa22
2 files changed
+13
No files matched your search
@@ -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();}
|
||||
|
||||
Reference in new issue
Block a user