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.
This commit is contained in:
parent
f6aad70541
commit
03f4c48de1
Notes:
sideshowbarker
2024-07-18 18:50:27 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/03f4c48de12 Pull-request: https://github.com/SerenityOS/serenity/pull/6746
1 changed files with 15 additions and 0 deletions
15
Ports/openttd/patches/perf-timer.patch
Normal file
15
Ports/openttd/patches/perf-timer.patch
Normal file
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue