From 8eefe76bda1c493000a51805c6d5208975aebfa5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 21 Oct 2021 18:57:26 +0200 Subject: [PATCH] Fixes --- Source/Engine/Platform/Linux/LinuxFileSystem.cpp | 3 ++- Source/Engine/Platform/Linux/LinuxPlatform.cpp | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp index 54a4a492a..6c8491d4b 100644 --- a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp +++ b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp @@ -338,7 +338,8 @@ bool LinuxFileSystem::MoveFile(const StringView& dst, const StringView& src, boo { if (errno == EXDEV) { - if(!CopyFile(dst, src)) { + if (!CopyFile(dst, src)) + { unlink(StringAsANSI<>(*src, src.Length()).Get()); return false; } diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index 9a06dbec1..5cbffe10f 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -836,7 +836,6 @@ int X11ErrorHandler(X11::Display* display, X11::XErrorEvent* event) int32 CalculateDpi() { - //Vector2 size = Platform::GetDesktopSize(); // in X11 a screen is not necessarily identical to a desktop // so we need to stick to one type for pixel and physical size query @@ -847,7 +846,6 @@ int32 CalculateDpi() double ydpi = (heightMM ? X11_DisplayHeight(xDisplay, screenIdx) / (double)heightMM * 25.4 : 0); if (xdpi || ydpi) return (int32)Math::Ceil((xdpi + ydpi) / (xdpi && ydpi ? 2 : 1)); - return 96; }