Colobot: fix deadlock on start (disable vsync)

This commit is contained in:
Gerasim Troeglazov
2019-04-01 19:25:52 +10:00
parent 7b1c18b2e7
commit e11566560d
2 changed files with 41 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ humanity and get programming skills!"
HOMEPAGE="https://colobot.info/"
COPYRIGHT="Epsitec and TerranovaTeam"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/colobot/colobot/archive/colobot-gold-$portVersion-alpha.tar.gz"
CHECKSUM_SHA256="38e01a6fb8c670203b86e7a100c79ed4ab4a9a4dcc01fd26a6a57f40fa1a8b5c"
SOURCE_DIR="colobot-colobot-gold-$portVersion-alpha"

View File

@@ -1,11 +1,11 @@
From 04223bb7bc363556df0acd6c48163e2b7ade7f98 Mon Sep 17 00:00:00 2001
From ad6405899157317c9721ae4f19f60d9f8bbebf65 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 15 Oct 2018 19:45:43 +1000
Subject: Add Haiku support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2986ce8..92e27c9 100644
index 0c40e08..164c84b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
@@ -66,10 +66,10 @@ index 2986ce8..92e27c9 100644
# Platform-dependent implementation of system.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e085750..3659ca1 100644
index c58172b..667834d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -54,6 +54,8 @@ elseif(PLATFORM_GNU)
@@ -97,6 +97,8 @@ elseif(PLATFORM_GNU)
elseif(PLATFORM_LINUX)
# for clock_gettime
set(PLATFORM_LIBS "-lrt")
@@ -79,7 +79,7 @@ index e085750..3659ca1 100644
find_library(LIBINTL_LIBRARY NAMES intl libintl)
find_path(LIBINTL_INCLUDE_PATH NAMES libintl.h)
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index b08a0a2..00953ed 100644
index 03771da..fbde859 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -32,6 +32,12 @@
@@ -107,7 +107,7 @@ index b08a0a2..00953ed 100644
+#endif
}
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index b476772..7d00d2a 100644
index f6d0bca..45f0d75 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -5,6 +5,7 @@
@@ -119,10 +119,10 @@ index b476772..7d00d2a 100644
#ifdef PLATFORM_MACOSX
diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp
index ff4ad7c..bf1138b 100644
index 12dc1d3..873f125 100644
--- a/src/common/system/system.cpp
+++ b/src/common/system/system.cpp
@@ -30,6 +30,8 @@
@@ -28,6 +28,8 @@
#include "common/system/system_linux.h"
#elif defined(PLATFORM_MACOSX)
#include "common/system/system_macosx.h"
@@ -131,7 +131,7 @@ index ff4ad7c..bf1138b 100644
#else
#include "common/system/system_other.h"
#endif
@@ -48,6 +50,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
@@ -46,6 +48,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
instance = MakeUnique<CSystemUtilsLinux>();
#elif defined(PLATFORM_MACOSX)
instance = MakeUnique<CSystemUtilsMacOSX>();
@@ -266,3 +266,34 @@ index 0000000..81168d0
--
2.19.1
From ea25b62d587742c85fce4ddbc0fb025686ed00fb Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 1 Apr 2019 19:20:42 +1000
Subject: Disable vsync for Haiku
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 6f86457..587e660 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -814,6 +814,7 @@ bool CApplication::CreateVideoSurface()
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
+#ifndef __HAIKU__
int vsync = 0;
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
{
@@ -839,7 +840,7 @@ bool CApplication::CreateVideoSurface()
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
}
-
+#endif
return true;
}
--
2.19.1