tag:github.com,2008:/libsdl-org/sdl12-compat/commits/mainRecent Commits to sdl12-compat:main2024-01-21T14:11:19Ztag:github.com,2008:Grit::Commit/bb2f7ff398e3f1e75edfd7719f278e7aa4ba53d5
README: Document SDL12COMPAT_NO_QUIT_VIDEO
2024-01-21T14:11:19Zsulixhttps://github.com/sulix
<pre style='white-space:pre-wrap;width:81ex'>README: Document SDL12COMPAT_NO_QUIT_VIDEO
This hint was never documented in README.md, even though it was used in
a quirk, and mentioned briefly in COMPATIBILITY.md.
Fixes #329</pre>
tag:github.com,2008:Grit::Commit/97e01d2bf5d50e41ed6c61c077490e3263021bcd
Updated copyright for 2024
2024-01-01T21:45:22Zsloukenhttps://github.com/slouken
<pre style='white-space:pre-wrap;width:81ex'>Updated copyright for 2024</pre>
tag:github.com,2008:Grit::Commit/bc081fd95e193345a821206fa205fd13411f2e3c
sdl.m4: Call $PKG_CONFIG rather than hard-coding pkg-config
2024-01-01T16:26:39Zsmcvhttps://github.com/smcv
<pre style='white-space:pre-wrap;width:81ex'>sdl.m4: Call $PKG_CONFIG rather than hard-coding pkg-config
When cross-compiling, pkg.m4 will set the PKG_CONFIG variable
to a suitable pkg-config executable, which might be a
host-architecture-prefixed name like aarch64-linux-gnu-pkg-config. This
ensures that we will use a suitable search path that is suitable for
the host architecture (the machine we are compiling for) rather than
the build architecture (the machine we are compiling on) to find
dependency libraries like SDL. When using pkg-config as a substitute
for sdl2-config, we will similarly need to use the
host-architecture-prefixed pkg-config.
Setting the PKG_CONFIG environment variable is also the canonical way to
request that a different pkg-config implementation be used, if that
becomes necessary for some reason.
Co-authored-by: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/1059749
Signed-off-by: Simon McVittie <smcv@collabora.com></pre>
tag:github.com,2008:Grit::Commit/c810b6a4c41972b52c348490464332ac5f14cd3b
cdrom: fix 'no track 1' edge case
2023-12-31T16:43:23Ztwolifehttps://github.com/twolife
<pre style='white-space:pre-wrap;width:81ex'>cdrom: fix 'no track 1' edge case</pre>
tag:github.com,2008:Grit::Commit/744cfca92761747683d06147685a751691f7e13c
silenced -Wunused-result for readlink().
2023-12-22T11:56:24Zsezerohttps://github.com/sezero
<pre style='white-space:pre-wrap;width:81ex'>silenced -Wunused-result for readlink().
From sdl2-compat, original patch by Sylvain Becker (@1bsyl).</pre>
tag:github.com,2008:Grit::Commit/5bfdc5ec8c1c958318aa8094f0685a3330a43260
sync dr_mp3 with mainstream.
2023-12-02T07:28:14Zsezerohttps://github.com/sezero
<pre style='white-space:pre-wrap;width:81ex'>sync dr_mp3 with mainstream.</pre>
tag:github.com,2008:Grit::Commit/995af0f1dc5cbf7a822d2640c8def0b04dfd22f8
Patched to compile against older SDL2 headers.
2023-11-29T18:24:56Zicculushttps://github.com/icculus
<pre style='white-space:pre-wrap;width:81ex'>Patched to compile against older SDL2 headers.
(Headers up to the 2.0.9 release need this.)
Fixes #324.</pre>
tag:github.com,2008:Grit::Commit/bfc8f941eb70a57b24885f841bb05b690a659a12
minor warning (C4706) fix
2023-09-30T17:56:04Zsezerohttps://github.com/sezero
<pre style='white-space:pre-wrap;width:81ex'>minor warning (C4706) fix</pre>
tag:github.com,2008:Grit::Commit/189f8f0741efdb7d6ff8308f64e5f23365d97a94
Bumped version to 1.2.69 for future development towards a 1.2.70 rele…
2023-09-26T17:45:10Zicculushttps://github.com/icculus
<pre style='white-space:pre-wrap;width:81ex'>Bumped version to 1.2.69 for future development towards a 1.2.70 release.</pre>
tag:github.com,2008:Grit::Commit/35ef746cf1a4fde8c442dc92fe9b18c3f90d7855
Bumped version to 1.2.68 for release!
2023-09-26T17:43:48Zicculushttps://github.com/icculus
<pre style='white-space:pre-wrap;width:81ex'>Bumped version to 1.2.68 for release!</pre>
tag:github.com,2008:Grit::Commit/f584baa61e5c2dd2bd9c4e8cf6d4886671092a9d
Bumped version to 1.2.67 for future development towards a 1.2.68 rele…
2023-09-14T19:25:17Zicculushttps://github.com/icculus
<pre style='white-space:pre-wrap;width:81ex'>Bumped version to 1.2.67 for future development towards a 1.2.68 release.</pre>
tag:github.com,2008:Grit::Commit/cd1ad69ca0f182696913000669f963e2babb714e
version: Bumping to 1.2.66 for release candidate.
2023-09-14T18:31:11Zicculushttps://github.com/icculus
<pre style='white-space:pre-wrap;width:81ex'>version: Bumping to 1.2.66 for release candidate.
(Actual release will bump to 1.2.68, and then revision control will go
to 1.2.69 for work, next release candidate will be 1.2.70, then 1.2.72, etc.)</pre>
tag:github.com,2008:Grit::Commit/2d9afcbb9b4f4e616ebc715d7515fd8433c9074a
fix -Wsign-compare warnings.
2023-09-14T14:00:10Zsezerohttps://github.com/sezero
<pre style='white-space:pre-wrap;width:81ex'>fix -Wsign-compare warnings.</pre>
tag:github.com,2008:Grit::Commit/52a898ddb12387f2cc9501947dd9d24e927c2c71
Quirks: Hyperspace Delivery Boy should run in 16bpp mode
2023-09-14T13:49:04Zsulixhttps://github.com/sulix
<pre style='white-space:pre-wrap;width:81ex'>Quirks: Hyperspace Delivery Boy should run in 16bpp mode
The LGP port of Hyperspace Delivery Boy has broken colour keys if run in
32-bpp mode (see bug #317). This is because it relies heavily on the
imprecise RGB565->RGB888 conversion in earlier SDL 1.2 versions, when
running in 32-bpp mode.
The game's assets are all in 565 format, and the game converts these to
the screen's format on load. It then sets a colour key. This presents a
problem, because:
- The generic BlitNToN implementation in SDL 1.2 just shifted the
values, so the resulting image was not at full range. Magenta became
(F800F8).
- Early versions of SDL 1.2 fell back to the BlitNToN blitter very
frequently:
https://github.com/libsdl-org/SDL-1.2/commit/6f4a75de61ce7fd63e14aa3207a51a767cac3a48
- So, Hyperspace Delivery Boy calls SDL_MapRGB(0xF8, 0, 0xF8) to get the
colour key, then sets it on the converted surface.
- In SDL 2.0, the blitters now properly do a full-range conversion, so
the magenta becomes (FF00FF), which now doesn't match the hardcoded
(F800F8).
- That being said, in general, it's not guaranteed that SDL_MapRGB()
will do the same format conversion as SDL_CovertSurface(), so the
"correct" way of handling this is to set the colour key before
converting, which works (albeit slowly) in SDL2:
https://github.com/libsdl-org/SDL/issues/1854
- Since the conversion behaviour is different even between SDL 1.2
versions, it's not worth trying to imitate it here, so we just force
the game to run in 16-bpp mode, which works fine.
- (And the game's README recommends it, too.)</pre>
tag:github.com,2008:Grit::Commit/41161424ac5c4f4541b093a4923bfb60350ec0a4
Add a hint to clamp the reported screen bit depth
2023-09-14T13:49:04Zsulixhttps://github.com/sulix
<pre style='white-space:pre-wrap;width:81ex'>Add a hint to clamp the reported screen bit depth
Some games (e.g. Hyperspace Delivery Boy) only work on a 16-bit display,
but request the highest bit-depth available. Add a hint which makes all
queries for a mode (including the current mode, and the implicit format
chosen by providng SDL_SetVideoMode() a bpp of 0) report a bit depth
less than or equal to the value of SDL12COMPAT_FORCE_BPP.
For example:
SDL12COMPAT_FORCE_BPP=16 ./hdb
There are a few interesting "features" of this implementation:
- All video modes are now clamped to 32bit, which is the default value
of the hint. This seems like something we'd probably want anyway, as
many SDL 1.2 apps would have trouble with >32bit video modes anway
(and we never properly supported them).
- This is our first proper integer hint, so add an SDL_GetHintInt()
function.
- Split the BPP -> format conversion into its own helper function.
- This doesn't clamp the bit depth of user-created surfaces, or of the
screen if the application specifically requests a bit depth. It only
changes defaults and reported modes.</pre>
tag:github.com,2008:Grit::Commit/0d818b0f723e9446b8319766fa2f822d274b2ca8
Avoid SDL_GetMouseState(), which returns raw coordinates
2023-09-13T14:19:28Zsulixhttps://github.com/sulix
<pre style='white-space:pre-wrap;width:81ex'>Avoid SDL_GetMouseState(), which returns raw coordinates
sdl12-compat tracks the mouse position in the MousePosition variable,
even when we're not in relative mouse mode. We therefore don't need to
call SDL20_GetMouseState() to update it before entering relative mouse
mode: we already have it from the last SDL_MOUSEMOTION event, and have
already applied any scaling we need.
This is important, because SDL_GetMouseState() returns the _raw_ mouse
coordinates, not the ones scaled by SDL_RenderSetLogicalSize(). So we
end up with a mismatch. This results in a mouse offset on non-OpenGL,
scaled games, like Alpha Centauri in fullscreen (see #318).
We could fix this by calling SDL_RenderWindowToLogical() instead, but
that complicates the codepath as we don't always have an SDL_Renderer
(we might be using OpenGL), so this seems cleaner.
I've tested this with SMAC (where it fixes the bug) and Wolf4SDL (which
was cited in the commit which introduced this check). Both work fine.</pre>
tag:github.com,2008:Grit::Commit/9359cfa28993dca770fd2079351c4c8029a786c2
Quirks: Mark of the Ninja (humble bundle) needs OpenGL scaling disabled.
2023-09-04T04:04:40Zsulixhttps://github.com/sulix
<pre style='white-space:pre-wrap;width:81ex'>Quirks: Mark of the Ninja (humble bundle) needs OpenGL scaling disabled.</pre>
tag:github.com,2008:Grit::Commit/e64f78dd5309ac632398f19998e47c3d0307a82d
update SDL20_include_wrapper.h header after latest SDL2 additions.
2023-08-26T17:51:56Zsezerohttps://github.com/sezero
<pre style='white-space:pre-wrap;width:81ex'>update SDL20_include_wrapper.h header after latest SDL2 additions.</pre>
tag:github.com,2008:Grit::Commit/d86a5312783e721b19be026913d0b901ee2d3822
Allocate video surface object statically as a global
2023-08-26T15:06:36Zsmcvhttps://github.com/smcv
<pre style='white-space:pre-wrap;width:81ex'>Allocate video surface object statically as a global
The SDL Perl bindings incorrectly call SDL_FreeSurface() on the result
of functions that return a "borrowed" pointer to the video surface,
namely SDL_SetVideoMode() and SDL_GetVideoSurface().
(See https://github.com/PerlGameDev/SDL/issues/305)
When we would previously have allocated or freed the video surface
wrapper object, instead allocate or free its contents in-place.
When checking whether the video surface exists, because we never destroy
it, we must now also check whether its underlying SDL2 video surface
exists.
Resolves: https://github.com/libsdl-org/sdl12-compat/issues/305
Signed-off-by: Simon McVittie <smcv@debian.org></pre>
tag:github.com,2008:Grit::Commit/13efe605cc426752dc952522a735337078e03c6c
Factor out enough of SDL_CreateRGBSurface to create surfaces in-place
2023-08-26T15:06:36Zsmcvhttps://github.com/smcv
<pre style='white-space:pre-wrap;width:81ex'>Factor out enough of SDL_CreateRGBSurface to create surfaces in-place
The part before we create the SDL 1.2 surface (creating the SDL 2.0
surface) becomes CreateRGBSurface(), and the part after becomes
Surface12SetMasks().
Signed-off-by: Simon McVittie <smcv@debian.org></pre>