diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-16 14:26:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-16 14:26:56 +0100 |
commit | 9df7ed59fb39e38db30326365adc18afb79903bb (patch) | |
tree | 59d2220e78fe5295dd6ac4aa5607da6501a96eb6 /platform | |
parent | 3914bdb82eafa558bc1512c7cf3c4f77565d0847 (diff) | |
parent | 065e2670af53ae2f71b78d57f8a217b4539cbbe2 (diff) |
Merge pull request #19501 from Zylann/custom_loaders
Added basic support for custom resource savers and loaders
Diffstat (limited to 'platform')
-rw-r--r-- | platform/server/os_server.cpp | 5 | ||||
-rw-r--r-- | platform/server/os_server.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 60f20d6009..5d67e2113f 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -99,7 +99,7 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int _ensure_user_data_dir(); - resource_loader_dummy = memnew(ResourceFormatDummyTexture); + resource_loader_dummy.instance(); ResourceLoader::add_resource_format_loader(resource_loader_dummy); return OK; @@ -118,7 +118,8 @@ void OS_Server::finalize() { memdelete(power_manager); - memdelete(resource_loader_dummy); + ResourceLoader::remove_resource_format_loader(resource_loader_dummy); + resource_loader_dummy.unref(); args.clear(); } diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 0367ec3db9..b5dc7900e6 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -77,7 +77,7 @@ class OS_Server : public OS_Unix { int video_driver_index; - ResourceFormatDummyTexture *resource_loader_dummy; + Ref<ResourceFormatDummyTexture> resource_loader_dummy; protected: virtual int get_video_driver_count() const; |