This commit is contained in:
Wojtek Figat
2021-10-21 18:57:26 +02:00
parent 8926fa57c1
commit 8eefe76bda
2 changed files with 2 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;
}