Commit Graph

51349 Commits (5afa1b93eba08224e88f69b10b241da4bd76dc8f)
 

Author SHA1 Message Date
Michael Lutz 436cdf1fc8 Fix #8825: [OpenGL] Don't clear cursor cache from the game loop thread. 4 years ago
translators ee69a0dc29 Update: Translations from eints
lithuanian: 5 changes by devbotas
portuguese (brazilian): 8 changes by Greavez
4 years ago
Patric Stout 8946b41d20 Fix: ensure switching blitter happens in the main thread
This because video-drivers might need to make changes to their
context, which for most video-drivers has to be done in the same
thread as the window was created; main thread in our case.
4 years ago
Patric Stout e56d2c63c3 Add: [Video] move GameLoop into its own thread
This allows drawing to happen while the GameLoop is doing an
iteration too.

Sadly, not much drawing currently can be done while the GameLoop
is running, as for example PollEvent() or UpdateWindows() can
influence the game-state. As such, they first need to acquire a
lock on the game-state before they can be called.

Currently, the main advantage is the time spend in Paint(), which
for non-OpenGL drivers can be a few milliseconds. For OpenGL this
is more like 0.05 milliseconds; in these instances this change
doesn't add any benefits for now.

This is an alternative to the former "draw-thread", which moved
the drawing in a thread for some OSes. It has similar performance
gain as this does, although this implementation allows for more
finer control over what suffers when the GameLoop takes too
long: drawing or the next GameLoop. For now they both suffer
equally.
4 years ago
Michael Lutz 3a4a15cc93 Codechange: don't set the window position when changing blitter
There really is no need to make an extra call to the OS in
these cases.
4 years ago
Patric Stout b9eac7c6dc Codechange: remove the unused lock around Blitter 4 years ago
Patric Stout 4610aa7ae3 Remove: [Video] no longer draw in a thread
Drawing in a thread is a bit odd, and often leads to surprising
issues. For example, OpenGL would only allow it if you move the
full context to the thread. Which is not always easily done on
all OSes.
In general, the advise is to handle system events and drawing
from the main thread, and do everything else in other threads.
So, let's be more like other games.

Additionally, putting the drawing routine in a thread was only
done for a few targets.

Upcoming commit will move the GameLoop in a thread, which will
work for all targets.
4 years ago
dP 56911a86ea Add: Buttons to open global goals from company goals and vice versa 4 years ago
dP 818bee3961 Change: Don't show global goals in company goal windows 4 years ago
Didac Perez Parera 3878c4781e
Fix #8817: keep NewGRF order for object class sorting (#8818) 4 years ago
Patric Stout 04db99749b
Fix #8784: using alt+enter didn't update the fullscreen toggle visibly (#8820)
Basically, the window was not invalidated, so it was never redrawn.
This made it look like it wasn't working, but it really was.
4 years ago
Eddi-z d3179709b1
Change: Clarify what effect town interactions have (#8744) 4 years ago
Michael Lutz 25656a10cb Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping the video buffer. 4 years ago
Michael Lutz ae1f7bd695
Fix 937d60f2: Broken company colours for 40bpp-blitter. (#8821) 4 years ago
Patric Stout b93d7dd3cb
Add: Option to (dis-)allow accelerated video drivers. (#8819)
The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
4 years ago
Didac Perez Parera 6e2a96c133
Add: filter for "engines only" in build train window (#8733) 4 years ago
TELK 267d6d2891 Update: Korean translation for v0.40.4 4 years ago
Jonathan G Rennison 63d1fe4419 Version: Committing version data for tag: jgrpp-0.40.4 4 years ago
Jonathan G Rennison b25cbc969c Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/brazilian_portuguese.txt
#	src/lang/tamil.txt
#	src/station_cmd.cpp
4 years ago
Dídac Pérez Parera 8d9aeb3d4e Fix: keep NewGRF order for object class sorting
(cherry picked from commit 83d67fe46bd24cf88272fe2774954c8dc9bb6497)
4 years ago
translators f70aa8fabe Update: Translations from eints
estonian: 6 changes by siimsoni
catalan: 3 changes by J0anJosep
latvian: 37 changes by lexuslatvia
portuguese (brazilian): 8 changes by Greavez
polish: 1 change by azabost
4 years ago
Jonathan G Rennison 25909b06d2 Fix #8809: Crash when removing airport when hangar window open 4 years ago
Jonathan G Rennison 1b146b3bff Fix crash when removing/upgrading airport with hangar window open
See: https://github.com/OpenTTD/OpenTTD/issues/8809
4 years ago
translators 2860de7bf4 Update: Translations from eints
chinese (traditional): 5 changes by benny30111
estonian: 1 change by siimsoni
italian: 1 change by AlphaJack
ukrainian: 4 changes by StepanIvasyn
tamil: 37 changes by Aswn
portuguese (brazilian): 19 changes by Greavez
4 years ago
Jonathan G Rennison 9bf6d1407f Add screenshot type: whole map at current zoom level 4 years ago
Jonathan G Rennison d6e2b32132 Merge branch 'master' into jgrpp
# Conflicts:
#	src/screenshot.h
4 years ago
Jonathan G Rennison dc7ffb5dc6 Add unset hotkey for industry chains window 4 years ago
Jonathan G Rennison 1c51b7253f Allow following vehicles at all non-map zoom levels 4 years ago
translators f536fd55d8 Update: Translations from eints
swedish: 1 change by kustridaren
spanish (mexican): 4 changes by absay
estonian: 80 changes by siimsoni
arabic (egypt): 13 changes by AviationGamerX
ukrainian: 1 change by StepanIvasyn
dutch: 1 change by Afoklala
portuguese (brazilian): 15 changes by Greavez
4 years ago
Patric Stout 06a3c0cb26 Fix dddf885f: use IConsoleError to produce console errors 4 years ago
Patric Stout 8c6b5e52fd Add: allow making heightmap screenshot via console 4 years ago
Patric Stout ac5e77ea3b Feature: allow custom width/height of screenshot via console
Reworked how the screenshot command works while keeping it backwards
compatible. It can now more freely understand arguments, and has
the ability to make SC_DEFAULTZOOM screenshots.
4 years ago
translators 879eb9c348 Update: Translations from eints
estonian: 22 changes by siimsoni
korean: 1 change by telk5093
serbian: 41 changes by nkrs
german: 1 change by Wuzzy2
romanian: 14 changes by ALEX11BR
russian: 5 changes by Ln-Wolf
finnish: 5 changes by hpiirai
ukrainian: 2 changes by StepanIvasyn
lithuanian: 105 changes by devbotas
spanish: 3 changes by MontyMontana
french: 5 changes by MalaGaM
portuguese (brazilian): 13 changes by Greavez
4 years ago
Jonathan G Rennison 70f3993a55 CMake: Fix host strgen/settingsgen importing 4 years ago
Jonathan G Rennison 92eb93561c Github: Add workflow dispatch trigger for CI builds 4 years ago
Jonathan G Rennison eab32e8861 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/blitter/32bpp_optimized.cpp
#	src/lang/serbian.txt
4 years ago
glx22 349dc568ea Fix: [CMake] Remove timestamps from regression output 4 years ago
glx22 1d79f55a46 Fix: [CMake] Skip detection for unused libs for dedicated builds 4 years ago
glx22 db0993f500 Change: [Actions] Also check dedicated build 4 years ago
Jonathan G Rennison 5a364d3e8c Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_optimized.cpp
#	src/lang/serbian.txt
4 years ago
Jonathan G Rennison d566a152bb Skip GfxDetermineMainColours contents in dedicated compiles
Fixes linker error
4 years ago
Patric Stout 0243ae4654
Fix #8799: NGameAllowedSorter() is not imposing strict weak ordering relation (#8801)
In other words, it should only (!) return true if A comes for B.
This promise was broken for the situation where two values are
identical. It would return true in these cases too. This is of
course not possible: if two values are identical, neither come
before the other. As such, the sorter was not imposing strict
weak ordering relations.

libstdc++ handled this scenario just fine, but libc++ crashes
badly on this, as it allowed comparing of [begin, end] instead
of [begin, end).
libc++ considered this not a bug (and by specs, they are correct;
just this way of crashing is of course a bit harsh):
https://bugs.llvm.org/show_bug.cgi?id=47903
4 years ago
Jonathan G Rennison 5724f6e3db
Merge pull request #219 from telk5093/jgrpp
Update: Korean translation
4 years ago
Jonathan G Rennison 152e258d80
Merge pull request #221 from Lastorder-DC/patch-1
Fix #220 build fail due to missing var
4 years ago
Lastorder f3b850623c
Fix #220 build fail due to missing var
Removed from merge commit dfecdf3afb
4 years ago
TELK 6f4d45f61f Update: Korean - GUI setting for shading trees on slopes 4 years ago
TELK 3b135935c7 Change: Improve Korean translation 4 years ago
Jonathan G Rennison 7ec10dd677 Version: Committing version data for tag: jgrpp-0.40.3 4 years ago
Jonathan G Rennison 26dcd0734e Github: Disable release upload jobs 4 years ago
Jonathan G Rennison 7e62af94ee Remove OVEERIDE macro 4 years ago