Fixes
This commit is contained in:
@@ -25,7 +25,7 @@ public:
|
||||
/// <summary>
|
||||
/// Describes work result value
|
||||
/// </summary>
|
||||
DECLARE_ENUM_4(Result, Ok, AssetLoadError, MissingReferences, LoadDataError);
|
||||
DECLARE_ENUM_5(Result, Ok, AssetLoadError, MissingReferences, LoadDataError, TaskFailed);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Content/Asset.h"
|
||||
#include "Engine/Content/AssetReference.h"
|
||||
#include "Engine/Content/WeakAssetReference.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
|
||||
/// <summary>
|
||||
@@ -25,6 +26,19 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~LoadAssetTask()
|
||||
{
|
||||
if (Asset)
|
||||
{
|
||||
Asset->Locker.Lock();
|
||||
Asset->_loadFailed = true;
|
||||
Asset->_isLoaded = false;
|
||||
LOG(Error, "Loading asset \'{0}\' result: {1}.", ToString(), ToString(Result::TaskFailed));
|
||||
Asset->_loadingTask = nullptr;
|
||||
Asset->Locker.Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
WeakAssetReference<Asset> Asset;
|
||||
@@ -55,7 +69,6 @@ protected:
|
||||
|
||||
return Result::Ok;
|
||||
}
|
||||
|
||||
void OnEnd() override
|
||||
{
|
||||
Asset = nullptr;
|
||||
|
||||
@@ -236,7 +236,7 @@ bool GDKGamepad::UpdateState()
|
||||
return false;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif PLATFORM_GDK
|
||||
|
||||
void GDKInput::Init()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user