Age | Commit message (Collapse) | Author | |
---|---|---|---|
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. | |||
2021-01-03 | Codechange: [OSX] Re-arrange the OSX video driver code by combining all ↵ | Michael Lutz | |
drawing code and moving the window/event handling to a different file. This is just a code move/rename, not a functionality change. | |||
2020-12-27 | Codechange: Convert some more FIO functions to take std::string. | Michael Lutz | |
2020-12-27 | Codechange: Use std::string in FIO search path handling. | Michael Lutz | |
2020-12-27 | Codechange: Store file search paths as std::string. | Michael Lutz | |
2020-12-27 | Codechange: Replace assert_compile macro with static_assert | Charles Pigott | |
2020-12-21 | Doc: some comments for the win32 video driver (#8409) | Patric Stout | |
Co-authored-by: Niels Martin Hansen <nielsm@indvikleren.dk> | |||
2020-12-19 | Fix: [OSX] Warning about ambiguous method (-Wobjc-multiple-method-names). ↵ | Michael Lutz | |
(#8399) | |||
2020-12-15 | Add: [Emscripten] use "relative mouse mode" with SDL2 | Patric Stout | |
This mode doesn't wrap the mouse constantly, but requests SDL to lock the mouse pointer. This is needed, as with Emscripten you are not allowed to change the mouse poisition (only to lock it into place). | |||
2020-12-15 | Add: support for emscripten (play-OpenTTD-in-the-browser) | Patric Stout | |
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl> | |||
2020-12-15 | Codechange: unroll the SDL2 main loop | Patric Stout | |
This commit prepares for the next commit, as Emscripten needs to have a way to trigger a single iteration of the main loop. To keep the real changes more clear, this commit only unrolls the loop, and makes no changes to the logic itself. | |||
2020-09-25 | Codechange: Make codestyle for CMake files consistent for 'control' statements | Charles Pigott | |
2020-06-18 | Fix #8104: Always add WINDOW_RESIZABLE flag to SDL2 (#8211) | nikolas | |
This fixes a bug that can reproduced with these steps: * Start openttd in fullscreen mode * Turn off fullscreen mode * Try to resize the window. The window can't be resized. | |||
2020-06-07 | Cleanup: Correct typographic errors in code comments. | TechGeekNZ | |
2020-06-05 | Add: introduce CMake for project management | Patric Stout | |
CMake works on all our supported platforms, like MSVC, Mingw, GCC, Clang, and many more. It allows for a single way of doing things, so no longer we need shell scripts and vbs scripts to work on all our supported platforms. Additionally, CMake allows to generate project files for like MSVC, KDevelop, etc. This heavily reduces the lines of code we need to support multiple platforms from a project perspective. Addtiionally, this heavily improves our detection of libraries, etc. | |||
2020-06-04 | Codechange: Realign SDL driver with SDL2 driver to ease maintenance and ↵ | TechGeekNZ | |
emphasise differences. | |||
2020-06-01 | Fix #8066: Try another fallback colourspace if first one fails | Niels Martin Hansen | |
2020-05-21 | Codechange: Use std::string in the driver and blitter selection code. | Michael Lutz | |
2020-04-12 | Remove: [OSX] Stuff that is pre-10.7 from the Cocoa/Quartz video driver. | Michael Lutz | |
2020-04-12 | Remove: [OSX] Old fullscreen subdriver for pre 10.7 systems. | Michael Lutz | |
Since the move to C++11, building for pre 10.7 is not possible with the native Apple tools. Also, due to bitrot, the file doesn't even compile anymore. While this could be fixed, it shows that this subdriver is basically never used anymore. | |||
2020-04-12 | Remove: [OSX] QuickDraw video subdriver used for OSX versions up to 10.4. | Michael Lutz | |
Since the C++11 move, getting OpenTTD to compile and run for anything below 10.7 basically requires building a custom compiler and libc++. Also, the QuickDraw subdriver crashes on more modern OSX version. While this is fixable, keeping the driver around is probably pointless. | |||
2020-03-30 | Fix #7644: [Cocoa] Manually set colorspace to sRGB | Sebastian Pauka | |
2020-01-15 | Fix: [SDL2] Correct name of the video driver in debug log | xdavidwu | |
SDL_GetVideoDriver(0) returns name of first video driver included in the library, not the driver currently used. SDL_GetCurrentVideoDriver() does what we want here. |