Fix Web build issues
This commit is contained in:
@@ -96,10 +96,10 @@ public class Platform : EngineModule
|
||||
|
||||
if (EngineConfiguration.WithSDL(options))
|
||||
{
|
||||
options.PublicDependencies.Add("SDL");
|
||||
options.PrivateDependencies.Add("SDL");
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "SDL"));
|
||||
if (options.Platform.Target == TargetPlatform.Linux)
|
||||
options.PublicDependencies.Add("Wayland");
|
||||
options.PrivateDependencies.Add("Wayland");
|
||||
}
|
||||
if (options.Target.IsEditor)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,6 @@ CPUInfo WebPlatform::GetCPUInfo()
|
||||
|
||||
MemoryStats WebPlatform::GetMemoryStats()
|
||||
{
|
||||
// Mock memory stats
|
||||
MemoryStats result;
|
||||
result.TotalPhysicalMemory = emscripten_get_heap_max();
|
||||
result.UsedPhysicalMemory = emscripten_get_heap_size();
|
||||
@@ -116,7 +115,7 @@ void WebPlatform::GetSystemTime(int32& year, int32& month, int32& dayOfWeek, int
|
||||
hour = time.tm_hour;
|
||||
minute = time.tm_min;
|
||||
second = time.tm_sec;
|
||||
millisecond = (int64)emscripten_get_now() % 1000; // Fake it based on other timer
|
||||
millisecond = abs((int64)emscripten_get_now()) % 1000; // Fake it based on other timer
|
||||
}
|
||||
|
||||
void WebPlatform::GetUTCTime(int32& year, int32& month, int32& dayOfWeek, int32& day, int32& hour, int32& minute, int32& second, int32& millisecond)
|
||||
@@ -135,7 +134,7 @@ void WebPlatform::GetUTCTime(int32& year, int32& month, int32& dayOfWeek, int32&
|
||||
hour = time.tm_hour;
|
||||
minute = time.tm_min;
|
||||
second = time.tm_sec;
|
||||
millisecond = (int64)emscripten_get_now() % 1000; // Fake it based on other timer
|
||||
millisecond = abs((int64)emscripten_get_now()) % 1000; // Fake it based on other timer
|
||||
}
|
||||
|
||||
#if !BUILD_RELEASE
|
||||
|
||||
Reference in New Issue
Block a user