mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-27 22:48:47 +08:00
add a new function: GetResPath
This commit is contained in:
@@ -4732,6 +4732,19 @@ enum emResReturn {
|
|||||||
RES_RET_INUSED //the res or object is in used, cannot be unloaded
|
RES_RET_INUSED //the res or object is in used, cannot be unloaded
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn const char* GetResPath (void)
|
||||||
|
* \brief Get the currrent user's resource path.
|
||||||
|
*
|
||||||
|
* \param path The path which store the resources. It can be an absolute path or relative path.
|
||||||
|
*
|
||||||
|
* \return the user's resource path; NULL if have not been set.
|
||||||
|
*
|
||||||
|
* \sa SetResPath
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
MG_EXPORT const char* GetResPath (void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \fn int SetResPath (const char* path);
|
* \fn int SetResPath (const char* path);
|
||||||
* \brief Set user's resource path into the search paths of resource manager.
|
* \brief Set user's resource path into the search paths of resource manager.
|
||||||
@@ -4742,6 +4755,8 @@ enum emResReturn {
|
|||||||
*
|
*
|
||||||
* \return RES_RET_OK for success or error code.
|
* \return RES_RET_OK for success or error code.
|
||||||
*
|
*
|
||||||
|
* \sa GetResPath
|
||||||
|
*
|
||||||
**/
|
**/
|
||||||
MG_EXPORT int SetResPath (const char* path);
|
MG_EXPORT int SetResPath (const char* path);
|
||||||
|
|
||||||
|
|||||||
@@ -498,6 +498,11 @@ int AddResPath(const char* paths)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char* GetResPath (void)
|
||||||
|
{
|
||||||
|
return usr_res_path;
|
||||||
|
}
|
||||||
|
|
||||||
int SetResPath(const char* path)
|
int SetResPath(const char* path)
|
||||||
{
|
{
|
||||||
if(path == NULL) {
|
if(path == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user