Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-02-13 | Change: [OSX] Use a layer-backed view to speed up drawing. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Align backing buffer pitch for a tiny bit performance. | Michael Lutz | |
2021-02-13 | Cleanup: [OSX] Move event loop into video driver file. | Michael Lutz | |
2021-02-13 | Remove: [OSX] Startup splash screen. | Michael Lutz | |
It wasn't displayed anyway as it was never copied to the bundle. | |||
2021-02-13 | Codechange: [OSX] Move key event handling to our view. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Move mouse event handling to our NSView. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Move some things from video driver to our NSView. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Use newer mouse tracking API. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Split drawing into its own subview. | Michael Lutz | |
This allows the drawing backend code to be independent of any event or command handling. | |||
2021-02-13 | Codechange: [OSX] Drain autoreleased objects in each game loop cycle. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Split Window and back buffer creation in Cocoa video driver. | Michael Lutz | |
2021-02-13 | Cleanup: [OSX] Doxygen comment style in video driver. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Inline some functions that are used in only one place. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Replace #define with modern code. | Michael Lutz | |
2021-02-13 | Codechange: [OSX] Fold remaining Cocoa video subdriver into the main driver. | Michael Lutz | |
2021-02-13 | Change: [OSX] Replace screen resolution list with suggested window sizes. | Michael Lutz | |
We never change the real screen resolution on OSX. As such, offering a list of resolutions is pointless. Instead of that, offer the user a list of commonly used window sizes up to the current screen size. | |||
2021-02-13 | Codechange: [OSX] There is only one subdriver left, remove virtual dispatch. | Michael Lutz | |
2021-02-11 | Change: [SDL2] Remove unneeded delay of redrawing the screen | Patric Stout | |
In testing, I could find no reason why this statement is here. The comment is rather unclear (it states what it does, but not why it would be needed). This line of code was introduced with f4f40448, which gives no further insight on why it would be needed to have it here. As such, let's remove it and see if anyone else reports any problems with it. If so, this commit can be reverted and a more clear comment should be added what this line of code is dealing with (the WHY, not the WHAT). | |||
2021-02-11 | Codechange: [SDL2] Don't use globals if we can do with locals | Patric Stout | |
2021-02-11 | Codechange: [SDL2] Name paint function Paint(), like other drivers do | Patric Stout | |
This reduces confusion when reading different drivers. | |||
2021-02-11 | Fix 30e69c51: palette was not marked dirty when creating a new | Patric Stout | |
This means the code depended that the caller did this for us before MakePalette() is executed, which is neither a requirement nor a promise the code makes. | |||
2021-02-06 | Fix #8029: [SDL2] disable draw-thread on wayland SDL video driver (#8648) | Patric Stout | |
When the wayland SDL video driver is used, an EGL context is created in the main thread. It is not allowed to update this context from another thread, which is exactly what our draw-thread is trying. The other solution would be to move all of SDL into the draw-thread, but that would introduce a whole scala of different problems. The wayland SDL backend is significantly faster than the X11 SDL backend, but there is a performance hit nevertheless. | |||
2021-02-05 | Codechange: Apply coding style (#8640) | SamuXarick | |
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove space | |||
2021-01-30 | Codechange: [SDL2] Use MakeDirty() to force a redraw | Patric Stout | |
The original code is "strictly correct", but just reads really weird, and we use MakeDirty() in several other places instead too. | |||
2021-01-30 | Codechange: [SDL2] Rework how palette is updated | Patric Stout | |
It now follows more what the Win32 driver does, and has far less exceptions and special casing. MakePalette creates the Palette and prepares surface. UpdatePalette updates the Palette. CheckPaletteAnim checks if UpdatePalette needs to be called and marks the whole screen dirty so DrawSurfaceToScreen will do a full redraw. | |||
2021-01-30 | Fix: [SDL2] Display why SDL_CreateWindow() failed in case it does | Patric Stout | |
All SDL_NNN errors print SDL_GetError, except for this one place. | |||
2021-01-30 | Codechange: [SDL2] Split away CreateMainWindow from CreateMainSurface | Patric Stout | |
This makes the code a bit more readable, as both intentions are more clear, and there is less nesting in the main function. | |||
2021-01-30 | Codechange: [SDL2] reworked the different surfaces to make it more readable | Patric Stout | |
2021-01-30 | Codechange: [SDL2] Only prepare "caption" if you are going to us it | Patric Stout | |
2021-01-30 | Codechange: [SDL2] Minor code cleanup to remove silly variable | Patric Stout | |
2021-01-30 | Codechange: [SDL2] Only set _cur_palette, never _local_palette | Patric Stout | |
2021-01-30 | Codechange: [SDL2] Move FindStartupDisplay to its own function | Patric Stout | |
2021-01-30 | Codechange: [SDL2] reworked FindResolutions to be more like the rest | Patric Stout | |
There was no default resolution fallback, and the code was different from the win32 driver. It is now named the same and much more similar. | |||
2021-01-30 | Codechange: [SDL2] remove include-protection | Patric Stout | |
This is already done by CMake: if SDL2 is not detected, this file is not included. | |||
2021-01-17 | Codechange: [SDL2/Win32] Be consistent how 0bpp blitters are not allowed | Patric Stout | |
Sometimes it returned an usererror(), sometimes Start() failed. Now it always fails on Start(), so nothing else has to check again what blitter is used. AfterBlitterChange() can never change to a 0bpp, so it is sufficient to guard this with an assert(). | |||
2021-01-17 | Codechange: [Win32] Use _local_palette for most operations | Patric Stout | |
Other drivers do this too, and this makes the world a bit more the same. | |||
2021-01-17 | Codechange: [Win32] use CSleep() instead of Sleep() like everywhere else | Patric Stout | |
Functional it is identical. Just helps future-us when searching for sleeps. | |||
2021-01-17 | Codechange: [Win32] Use return-early in RegisterWndClass() | Patric Stout | |
2021-01-17 | Codechange: [Win32] Remove Windows 95 specific mouse tracking work-around. | Michael Lutz | |
2021-01-16 | Fix 0e62a398c7f: Only center the window, when it is smaller than the screen. ↵ | frosch | |
(#8581) | |||
2021-01-14 | Add: [SDL2] video driver parameter to put OpenTTD on a particular display on ↵ | frosch | |
start. By default use the display where the mouse cursor is. (#8572) | |||
2021-01-14 | Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) | Michael Lutz | |
2021-01-08 | Codechange: Remove min/max functions in favour of STL variants (#8502) | Charles Pigott | |
2021-01-03 | Revert 4ce53cb8: [OSX] Delayed fullscreen switch is not needed anymore. | Michael Lutz | |
The fix for #8067 solves the real issue, making this workaround unneeded. | |||
2021-01-03 | Fix #8067: [OSX] Calculate title bar height instead of assuming a fixed value. | Michael Lutz | |
2021-01-03 | Fix: [OSX] Quitting in fullscreen mode would loose the original window size. | Michael Lutz | |
This replicates the behaviour on e.g. Windows, which saves the original window size. | |||
2021-01-03 | Change: [OSX] Hide Dock and menu during fullscreen mode. | Michael Lutz | |
2021-01-03 | Codechange: [OSX] Silence some annoying warnings. | Michael Lutz | |
2021-01-03 | Cleanup: [OSX] Remove cargo cult back-buffer alpha setting on show/hide and ↵ | Michael Lutz | |
instead simply initialise the buffer on allocation. | |||
2021-01-03 | Change: [OSX] Compiling the Cocoa/Quartz video driver cannot be disabled ↵ | Michael Lutz | |
anymore. |