Commit Graph
16 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 5bf9dfd7ee Demo mode: Force resolution to that of the demo 2023-01-12 03:38:29 +00:00
Gleb Mazovetskiy 680ab5ec40 Overhaul backbuffer state handling
When rendering directly to the output buffer, we need to maintain the
state of what has been drawn and what needs redrawing per-buffer.

We previously tried to do it implicitly by checking `SDL_DOUBLEBUF` and
other flags. The previous implementation was broken in several
ways, resulting in rendering issues on devices that support 8-bit output
directly.

Changes this mechanism to explicitly maintain buffer state per output
buffer. The new mechanism doesn't require knowledge of the number of
buffers, and thus also works correctly with triple-buffering.

Fixes #5447
2022-11-01 02:43:24 +00:00
Gleb Mazovetskiy 9d2948c782 Loading screen: Free the background early
Frees the background after blitting it once in the loading screen.
This gives the game more RAM for the actual loading.
2022-06-15 12:22:28 +02:00
ephphatha 7f15aa730d Move definition of ghMainWnd to utils/display.cpp
This variable is controlled/set by the code in that file, this also lets other files have more specific/relevant includes instead of the monolith that is diablo.h
2022-05-08 12:09:12 +02:00
Bubio 036171d7ca Fixed issue #4217
DPI Scale is now included in the calculation.
2022-03-27 17:46:16 +02:00
Anders Jenbo 24a15d90e2 Do not recreate the render when switching scalingn quality 2021-12-21 12:55:30 +01:00
Anders Jenbo 7d239d9f89 Scale resolution to true values 2021-12-18 20:55:14 +01:00
Vladimir Olteanu d4d89077cd Don't free PalSurface when it was obtained from SDL_GetVideoSurface 2021-09-13 23:07:04 +02:00
Vladimir Olteanu aab7bf6e91 Make Palette a unique ptr 2021-09-13 23:07:04 +02:00
Vladimir Olteanu cc9ea97e0f Introduce SDLWrap::CreateTexture 2021-09-13 23:07:04 +02:00
qndel 46c8e550ba Revert "Revert "Add explicit cast for LogicalToOutput" (#2334)"
This reverts commit cbfffcbfd4.
2021-07-10 01:48:08 +02:00
qndel cbfffcbfd4 Revert "Add explicit cast for LogicalToOutput" (#2334)
This reverts commit d3c36166df.
2021-07-09 18:28:11 +02:00
ephphatha d3c36166df Add explicit cast for LogicalToOutput
In practice this function is only called with int arguments, can probably change the specialisation to std::is_integral<T>
2021-07-05 08:52:05 -07:00
ephphatha 08ae390643 Add explicit casts for some implicit conversions
Some of these were triggering multiple warnings due to casts applied at times which forced potentially truncating operations.
2021-07-05 08:52:05 -07:00
Anders Jenbo 4eabc6024b Apply various cleanups via Android Studio 2021-07-03 18:27:17 -07:00
Anders Jenbo 8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00