Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-05-29 | Codechange: rename str_validate to StrMakeValid(InPlace) (#9304) | Patric Stout | |
This to be more explicit the function changes the value, and not returns yes/no. | |||
2021-05-23 | Fix: [OpenGL] Increase timeout when waiting for the GPU to be done with the ↵ | Michael Lutz | |
drawing buffer. The old timeout could be too short if v-sync was on on lower refresh rates. | |||
2021-05-12 | Change: reworked the debug levels for network facility (#9251) | Patric Stout | |
It now follows very simple rules: 0 - Fatal, user should know about this 1 - Error, but we are recovering 2 - Warning, wrong but okay if you don't know 3 - Info, information you might care about 4 - 5 - Debug #1 - High level debug messages 6 - Debug #2 - Low level debug messages 7 - Trace information | |||
2021-05-12 | Fix 91b8ce07: dedicated servers could no longer create screenshots (#9232) | Patric Stout | |
Although most commands are not useful on a dedicated server, screenshot commands should be dequeued. | |||
2021-05-02 | Codechange: Acquire video buffer before taking game state lock to prevent ↵ | Milek7 | |
erratic fast forward behaviour (#9140) | |||
2021-05-02 | Codechange: Generalise the delayed blitter change to a generic video driver ↵ | Michael Lutz | |
command queue. | |||
2021-04-30 | Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. | Peter Nelson | |
2021-04-25 | Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. (#9100) | Michael Lutz | |
2021-04-22 | Change: [Win32] Limit the OpenGL video driver to OpenGL 3.2 or newer on Windows. | Michael Lutz | |
2021-04-22 | Codechange: [Win32] Try getting an OpenGL 4.5 context first before aiming at ↵ | Michael Lutz | |
3.2. | |||
2021-04-21 | Fix: [OpenGL] Check maximum supported texture size against screen resolution. | Michael Lutz | |
2021-04-12 | Fix #9028: [OpenGL] Clear cursor cache on destroying the OpenGL backend. | Michael Lutz | |
2021-04-12 | Fix: [win32] buffer_locked state not initialised, causing _screen.dst_ptr to ↵ | Rubidium | |
be potentially not set | |||
2021-04-12 | Fix: [Video] fast forward boolean states not initialised, potentially ↵ | Rubidium | |
causing unstoppable fast forward | |||
2021-04-12 | Fix: [SDL] buffer_locked state not initialised, causing _screen.dst_ptr to ↵ | Rubidium | |
be potentially not set | |||
2021-04-11 | Fix: Check for a validly mapped OpenGL screen buffer during driver init. (#9007) | Michael Lutz | |
2021-04-11 | Feature: allow a toggle to enable/disable vsync | Patric Stout | |
Vsync should be off by default, as for most players it will be better to play without vsync. Exception exist, mainly people who play in fullscreen mode. | |||
2021-04-10 | Fix: Data races on cursor state in OpenGL backends | Jonathan G Rennison | |
2021-04-10 | Fix: Thread unsafe use of sprite cache in OpenGLBackend::DrawMouseCursor | Jonathan G Rennison | |
See also: #8870 See also: #8977 | |||
2021-04-09 | Fix #8930: [Win32] Don't handle printable keys on keydown if an edit box is ↵ | Michael Lutz | |
in focus. Handle printable input only when the matching WM_CHAR message is incoming. Without an edit box, do the handling in keydown as usual to support hotkeys. | |||
2021-04-07 | Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of ↵ | Niels Martin Hansen | |
static buffers | |||
2021-04-05 | Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call. ↵ | Michael Lutz | |
(#8944) | |||
2021-03-25 | Change: Do not disallow persistent buffer mapping on AMD GPUs, as it is ↵ | Milek7 | |
actually faster. | |||
2021-03-21 | Fix f0f96e31: [OpenGL] Broken window resizing due to invalid buffer pitch on ↵ | Michael Lutz | |
texture creation. | |||
2021-03-21 | Fix f0f96e31: [OpenGL] warning: comparison of integer expressions of ↵ | frosch | |
different signedness. (#8881) | |||
2021-03-20 | Fix #8871: [OpenGL] Initialize all buffers after resize and clear back ↵ | Michael Lutz | |
buffer. (#8877) | |||
2021-03-10 | Add: make modal windows update more smooth | Patric Stout | |
Basically, modal windows had their own thread-locking for what drawing was possible. This is a bit nonsense now we have a game-thread. And it makes much more sense to do things like NewGRFScan and GenerateWorld in the game-thread, and not in a thread next to the game-thread. This commit changes that: it removes the threads for NewGRFScan and GenerateWorld, and just runs the code in the game-thread. On regular intervals it allows the draw-thread to do a tick, which gives a much smoother look and feel. It does slow down NewGRFScan and GenerateWorld ever so slightly as it spends more time on drawing. But the slowdown is not measureable on my machines (with 700+ NewGRFs / 4kx4k map and a Debug build). Running without a game-thread means NewGRFScan and GenerateWorld are now blocking. | |||
2021-03-09 | Add: Display refresh rate game option (#8813) | sean | |
2021-03-08 | Fix #8825: [OpenGL] Don't clear cursor cache from the game loop thread. | Michael Lutz | |
2021-03-08 | Fix: ensure switching blitter happens in the main thread | Patric Stout | |
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. | |||
2021-03-08 | Add: [Video] move GameLoop into its own thread | Patric Stout | |
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. | |||
2021-03-08 | Codechange: don't set the window position when changing blitter | Michael Lutz | |
There really is no need to make an extra call to the OS in these cases. | |||
2021-03-08 | Codechange: remove the unused lock around Blitter | Patric Stout | |
2021-03-08 | Remove: [Video] no longer draw in a thread | Patric Stout | |
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. | |||
2021-03-08 | Fix #8784: using alt+enter didn't update the fullscreen toggle visibly (#8820) | Patric Stout | |
Basically, the window was not invalidated, so it was never redrawn. This made it look like it wasn't working, but it really was. | |||
2021-03-08 | Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping ↵ | Michael Lutz | |
the video buffer. | |||
2021-03-08 | Add: Option to (dis-)allow accelerated video drivers. (#8819) | Patric Stout | |
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> | |||
2021-03-01 | Fix #8775: [Win32] Don't create the main window when alt-tabbing back into ↵ | Michael Lutz | |
fullscreen. | |||
2021-03-01 | Fix: [Win32] Original window size was lost when tabbing in and out of ↵ | Michael Lutz | |
fullscreen. | |||
2021-03-01 | Fix c4df0f95: bootstrap was only showing a black screen (#8788) | Patric Stout | |
The bootstrap has the _switch_mode to SM_MENU, and never leaves this mode. Neither is it considered a modal window (while in some sense it really is). So .. we need to add another "draw anyway" exception, to make sure bootstrap is being drawn. | |||
2021-03-01 | Fix: [OSX] Hide dock when entering fullscreen | Owen Rudge | |
2021-02-28 | Add: settings to limit your fast-forward game speed | Patric Stout | |
By default this setting is set to 2500% normal game speed. | |||
2021-02-28 | Fix #8763: [OpenGL] Cursor sprite origin can be negative. | Michael Lutz | |
2021-02-27 | Fix: [OpenGL] Don't use OpenGL on MESA software renderers. | Michael Lutz | |
Performance in this case is worse than not using OpenGL, so just let OTTD fall back to a different video driver. | |||
2021-02-27 | Fix: [SDL2] set GL attributes to get the best GL context possible (#8759) | Patric Stout | |
2021-02-27 | Fix: OpenGL cursor did not consider sprite offsets of cursor sprites. | frosch | |
2021-02-27 | Codechange: remove _realtime_tick variable | Patric Stout | |
2021-02-25 | Codechange: [OpenGL] Load all OpenGL functions dynamically. | Michael Lutz | |
2021-02-25 | Codechange: [OpenGL] Simplify loading OpenGL extension functions. | Michael Lutz | |
2021-02-24 | Fix #8734: [OpenGL] Apply palette remap to cursor sprites. (#8742) | Michael Lutz | |