Age | Commit message (Collapse) | Author | |
---|---|---|---|
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 | |
2021-02-24 | Codechange: [OSX] GameLoop is really more like MainLoop | Patric Stout | |
MainLoop() is used to bootstrap OSX, where later a callback is done to GameLoop() to execute OpenTTD. All other video drivers don't need that, so what is in GameLoop is in MainLoop for all other drivers. This is rather confusing. So, instead, name GameLoop MainLoopReal to be more in sync with the other drivers. | |||
2021-02-24 | Codechange: [Video] move InteractiveRandom() to the VideoDriver | Patric Stout | |
2021-02-24 | Codechange: [Video] make the prototype of PollEvent() the same for all drivers | Patric Stout | |
Additionally, call it from the draw-tick. | |||
2021-02-23 | Codechange: Switch to explicit wide strings | Niels Martin Hansen | |
2021-02-23 | Remove: [Win32] Last pretenses of being able to build for Windows 95 | Niels Martin Hansen | |
2021-02-22 | Fix 8706c36f: Change RELEASE code, too. | Michael Lutz | |
2021-02-22 | Add: [OSX] OpenGL video driver. | Michael Lutz | |
2021-02-22 | Codechange: [OpenGL] Separate context state setup from general init. | Michael Lutz | |
2021-02-22 | Codechange: [OSX] Add support for (un)locking the video buffer. | Michael Lutz | |
2021-02-22 | Codechange: [OSX] Separate video driver into a base and a Quartz implementation. | Michael Lutz | |
2021-02-22 | Codechange: [SDL2] Split driver in base-part and default backend | Michael Lutz | |
2021-02-22 | Feature: [SDL2] OpenGL support | Patric Stout | |
2021-02-22 | Codechange: [SDL] Move dirty_rect to class scope. | Michael Lutz | |
2021-02-22 | Codechange: [SDL2] Allow several places to hook into the SDL driver | Patric Stout | |
This allows future subdrivers to use these to manage their own flow. | |||
2021-02-22 | Codechange: [SDL2] Move functions and variables to class-scope | Patric Stout | |
This allows future subdrivers to override them. | |||
2021-02-22 | Codechange: [SDL2] Move SDLSurface code to its own function | Patric Stout | |
This increases readability, and allow future subdrivers to not use SDLSurface to draw. | |||
2021-02-22 | Codechange: [SDL2] Split Start() in a few more functions | Patric Stout | |
This makes it a bit easier to follow what is going on, and allow future subdrivers to hook into a few of these functions. Reworked the code slighly while at it, to return early where possible. | |||
2021-02-22 | Codechange: [OpenGL] Let OpenGL clear the pixel buffer if possible. | Michael Lutz | |
2021-02-22 | Codechange: [OpenGL] Use persistently mapped pixel buffers when supported. | Michael Lutz | |
2021-02-22 | Add: [OpenGL] Support for a separate animation buffer that stores the ↵ | Michael Lutz | |
palette values of the screen in addition to the colour buffer. | |||
2021-02-22 | Change: [Win32] Prioritize the OpenGL video driver over the GDI one. | Michael Lutz | |
2021-02-22 | Add: [OpenGL] Accelerated mouse cursor drawing. | Michael Lutz | |
2021-02-22 | Codechange: [OpenGL] Initialize backing store to opaque alpha to allow ↵ | Michael Lutz | |
blending effects. | |||
2021-02-22 | Codechange: Allow video drivers to handle the cursor themselves. | Michael Lutz | |
2021-02-22 | Codechange: [Win32] Use an OpenGL core context instead of a compatibility one. | Michael Lutz | |
2021-02-22 | Add: [OpenGL] Support for 8bpp blitters. | Michael Lutz | |
2021-02-22 | Codechange: [OpenGL] Explicitly assign which framebuffer target receives the ↵ | Michael Lutz | |
colour values. |