summaryrefslogtreecommitdiff
path: root/Ports/openttd/patches
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-04-29 23:45:51 +0200
committerLinus Groh <mail@linusgroh.de>2021-05-01 09:02:57 +0200
commit03f4c48de12ab101d6942b73c6afa696f1224dcc (patch)
tree06e3f83a96cea999f240c281ec572ca8a7009964 /Ports/openttd/patches
parentf6aad705413712fe93a72ad649e5de0f0f93685c (diff)
downloadserenity-03f4c48de12ab101d6942b73c6afa696f1224dcc.zip
Ports: Disable GetPerformanceTimer() for OpenTTD
OpenTTD calls gettimeofday() so many times per second that the game becomes unusable after joining a reasonably active network game.
Diffstat (limited to 'Ports/openttd/patches')
-rw-r--r--Ports/openttd/patches/perf-timer.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/Ports/openttd/patches/perf-timer.patch b/Ports/openttd/patches/perf-timer.patch
new file mode 100644
index 0000000000..fb8535e21c
--- /dev/null
+++ b/Ports/openttd/patches/perf-timer.patch
@@ -0,0 +1,15 @@
+diff -Naur openttd-1.11.0/src/framerate_gui.cpp openttd-1.11.0.serenity/src/framerate_gui.cpp
+--- openttd-1.11.0/src/framerate_gui.cpp 2021-04-29 23:45:25.247427868 +0200
++++ openttd-1.11.0.serenity/src/framerate_gui.cpp 2021-04-29 23:41:57.679926623 +0200
+@@ -222,8 +222,9 @@
+ */
+ static TimingMeasurement GetPerformanceTimer()
+ {
+- using namespace std::chrono;
+- return (TimingMeasurement)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
++ //using namespace std::chrono;
++ //return (TimingMeasurement)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
++ return 0;
+ }
+
+