1460 Commits

Author SHA1 Message Date
Le Philousophe 8c443f5fc9 SDL: Make sure window flags are consistent between backends 2026-04-26 17:41:23 +02:00
Le Philousophe 994dc04a85 BACKENDS: OPENGLSDL: Don't store a size for the maximized state
Fix #16666

When restoring from the maximized state while the maximized size was
used when creating the window, the window manager restores to something
sensible instead of using the last restored size we used.
As the maximized size has no real use, don't store and use it.
2026-04-26 17:41:23 +02:00
Miro Kropacek 9bd91b4131 BACKENDS: ATARI: Remove atari_debug 2026-04-20 01:47:37 +02:00
Le Philousophe 066bc346ef ANDROID: Fix sign compare warnings 2026-04-12 17:26:59 +02:00
Eugene Sandulenko 02c2dcc5b1 BACKENDS: OPENGLSDL: Fix compilation with USE_OPENGL_GAME disabled 2026-04-06 18:56:03 +02:00
Cameron Cawley b66cc85b0d OPENGL: Move custom XRGB1555->RGB565 conversion path to common code 2026-04-06 08:08:39 +03:00
Cameron Cawley 730e0e148e SURFACESDL: Reject true colour pixel formats when _isHwPalette is enabled 2026-04-06 01:32:01 +02:00
Le Philousophe f8902028ef SDL: Don't try to avoid downscaling on 3D with arbitrary resolution
Fix #16253
2026-04-06 00:25:49 +02:00
Eugene Sandulenko 420bfb1f07 BACKENDS: SDL: Fix splash screen with ImGui enabled 2026-04-03 16:56:02 +02:00
Orgad Shaneh e14ff21496 BACKENDS: OPENGL: Unpanic warning
Amends commit c80dcca547.
2026-03-05 01:04:07 +01:00
Eugene Sandulenko e74195cca3 BACKENDS: OPENGLSDL: Rename force_resize into dumper_force_resize in ConfMan
This adds more clarity to what does this option belong to
2026-03-02 23:17:27 +01:00
Eugene Sandulenko c80dcca547 BACKENDS: OPENGL: Gracefully ignore incorrect resize request
If we call resize before the context is created, which could happen
during dialog dumping, we just ignore the request
2026-03-02 23:17:27 +01:00
Eugene Sandulenko f8f4a73d09 BACKENDS: OPENGL: Die nicely on insane OpenGL subsystem state 2026-03-02 22:19:46 +01:00
Sebastien Ronsse 4063ca80d4 BACKENDS: SDL: Set getImGuiTexture filtering to nearest 2026-02-11 21:32:26 +02:00
Miro Kropacek 2dd0b13aa3 BACKENDS: ATARI: Fix overlay hiding when starting game from command line 2025-11-20 10:11:48 +10:00
Le Philousophe dda0222ad0 BACKENDS: Fix _overlayInGUI improper usages
Aspect ratio correction doesn't depend on if we are in GUI or not but if
the overlay is shown.
The overlay is never A/R corrected.
2025-11-15 11:16:03 +01:00
Le Philousophe de1f92498e BACKENDS: Allow to ignore safe areas for the game
For the overlay and menus, it's always taken into account by the layout.
2025-11-14 07:55:51 +01:00
Donovan Watteau 69dd0889cc JANITORIAL: Update some HTTP links in comments to HTTPS
The modern web is mostly HTTPS now, and some browsers may start giving
warnings when one uses a plain HTTP connection.

Only update the protocol when the HTTPS connection exists and fully
works.  Code from external projects/tools is kept as is.
2025-10-29 14:22:37 +01:00
sluicebox 38f8a08ce4 SDL: Fix leaked surface in hotswapGFXMode 2025-10-26 03:16:24 +03:00
Le Philousophe 2472ef30c3 GRAPHICS: Don't constrain too much the game screen
The shaking effect can make the game screen go out of bounds and that's
totally fine.
Constraining here breaks it by shrinking the screen instead.

This fixes Trac#16233.
2025-09-27 19:33:46 +03:00
Le Philousophe dd551f3b56 BACKENDS: OPENGL: Fix CID 1611396 2025-08-23 16:08:37 +02:00
Le Philousophe 2dfe736201 BACKENDS: OPENGL: Add missing flags checks.
Fixes CID 1611397
2025-08-23 16:02:51 +02:00
Le Philousophe 90e3fd1ec1 BACKENDS: OPENGL: Fix build when 3D is not available 2025-07-20 17:58:32 +02:00
Le Philousophe 4a7dbd0503 BACKENDS: OPENGL: Don't fault when trying to lock screen in 3D mode
This has never crashed in Android but it seems it was pure luck.
The standard extended save code tries to get a thumbnail from the
screen and causes assertion fault with default implementation.
2025-07-20 17:45:08 +02:00
Le Philousophe 68c27f907a ANDROID: Implement getSafeAreaInsets 2025-07-13 17:26:37 +02:00
Lars Sundström 17085b9ad2 IOS7: Implement getSafeAreaInsets 2025-07-13 17:26:37 +02:00
Le Philousophe d3121b0320 BACKENDS: Implement safe area handling in WindowedGraphicsManager 2025-07-13 17:26:37 +02:00
Lars Sundström 041ea90892 COMMON: Add getSafeOverlayArea as OSystem function
This will let the GUI know where to put its widgets to avoid notches.
2025-07-13 17:26:37 +02:00
Torbjörn Andersson d96f834689 GRAPHICS: Remove unused function 2025-07-11 18:31:48 +02:00
William Bonnaventure df88bb2845 GRAPHICS: remove SDL_GetDesktopDisplayMode in surfacesdl formats
The internal pixel format is forced and may not match the
desktop display mode which will cause pixel format conversion.
2025-07-11 02:41:22 +03:00
William Bonnaventure a0dcff8897 GRAPHICS: Set hwFormat as first supported format in surfacesdl
surfacesdl forces RGB565 pixel format for the hardware screen
but the first supported format returned by detectSupportedFormats()
may be very different (RGB565 VS ABGR8888 on PSP2 for example)
thus a pixel format conversion is done at each blitting when
calling SDL_BlitSurface().
On PSP2 with BladeRunner this conversion + blitting takes ~60ms.
By moving the hardware screen format first on the
detectSupportedFormats() we will use RGB565 for all surfaces.
By removing the format conversion on PSP2 we go down to ~2-3ms per frame.
2025-07-11 02:41:22 +03:00
Cameron Cawley 324ccbb274 GRAPHICS: Allow fast blit functions to be stored for repeated use 2025-07-06 19:02:01 +02:00
Cameron Cawley 8eb0dcba6c OPENGL: Remove TextureSurfaceRGBA8888Swap
Graphics::crossBlit() now contains faster routines that can be used instead.
2025-07-06 19:02:01 +02:00
Christian Kündig 76cf7936a2 BACKENDS: OPENGL3D: Fix builds with USE_FORCED_GLES and without USE_GLAD 2025-07-06 18:44:41 +02:00
Miro Kropacek 9a438b6492 BACKENDS: ATARI: Remove harmful assert
Cursor's srcSurface is formally PIXELFORMAT_CLUT8 but this is not true,
it's 4-bit or 8-bit bitplanes. On the other hand, AtariSurface is
PIXELFORMAT_CLUT8, PIXELFORMAT_RGB332 or PIXELFORMAT_RGB121 so these
can't be asserted for equality.
2025-07-04 14:14:46 +02:00
D G Turner f52a2004ea BACKENDS: OPENGL: Fix Uninitialized Variable
Common::RotationMode is an enum, not a class so needs to be set by
constructor. This was detected using Valgrind.
2025-07-01 21:15:58 +01:00
Cameron Cawley d08702a204 SURFACESDL: Use SDL_PIXELFORMAT_RGBA32 for ImGui textures 2025-06-28 16:38:09 +03:00
Miro Kropacek eb64b14b81 BACKENDS: ATARI: Implement proper cursor clipping
Previous implementation had to create a new surface every time srcRect
has been changed and as a bonus, it would (harmlessly but still) do a
read-modify-write past the screen buffer.
2025-06-25 23:50:35 +02:00
Miro Kropacek 3f47c7a8ce BACKENDS: ATARI: Let Cursor access only AtariSurface instead of Screen 2025-06-25 23:50:35 +02:00
Miro Kropacek e575d1360e BACKENDS: ATARI: Make purpose of _xOffset more explicit
This also cleans up Screen::reset() a bit.

Get rid of the reset cursor flag, it's not that useful in the overlay.
2025-06-25 23:50:35 +02:00
Miro Kropacek f27f045aac BACKENDS: ATARI: Remove references to AtariGraphicsManager from Screen and Cursor 2025-06-25 23:50:35 +02:00
Miro Kropacek ee437e2a42 BACKENDS: ATARI: Move alignRect from AtariGraphicsManager to AtariSurface
And make it static.
2025-06-25 23:50:35 +02:00
Miro Kropacek 0520570a7b BACKENDS: ATARI: Move getBitsPerPixel from AtariGraphicsManager to AtariSurface 2025-06-25 23:50:35 +02:00
Miro Kropacek 3dd96ec7c5 BACKENDS: ATARI: Use hardware-accelerated cursor blitting 2025-06-25 23:50:34 +02:00
Miro Kropacek b3074272da BACKENDS: ATARI: Separate SuperVidel code
- Introduce AtariSurface: a surface which represents either a
  bitplane-based or pixel-based surface (on SuperVidel, as an inherited
  SuperVidelSurface). Screen::surf / Screen::offsettedSurf are its
  instances.

- Graphics::Surface::create / free now handle all Atari-related surfaces
  via dlmalloc: ST RAM (TT/Falcon), VRAM (SuperVidel - 0xA0xxxxxx) and
  VRAM for generic surfaces (SuperBlitter - 0xA1xxxxxx or ST/TT RAM).
  This allowed me to remove all the hacky stuff from atari-graphics and
  atari-superblitter.h.

- blit-atari.cpp now contains only blitting code
  (SuperBlitter/move16/fallback), SV code is in
  atari-supervidel.{cpp,h}.

- Take advantage of Common::ScopedPtr and Graphics::ManagedSurface's
  dispose flag for Screen::surf as well Graphics::ManagedSurface's
  ownership for Screen::offsettedSurf.

- Improve recoverability if an error/assert happens in
  AtariGraphicsManager's c-tor/d-tor.
2025-06-25 23:50:34 +02:00
Miro Kropacek 28507ee8a7 BACKENDS: ATARI: Cleanup fillScreen()
The workaround for Eco Quest was misguided, I was updating whole screen
every time!
2025-06-25 23:50:34 +02:00
Miro Kropacek d452beff82 BACKENDS: ATARI: Remove g_unalignedPitch workaround
It causes more harm than good and I don't think it helps with
performance that much either. Its only semi-valid use case was C2P
direct rendering for sprites (which nobody uses). However, direct
rendering in its current form is about to be removed in a near future,
so...
2025-06-25 23:50:34 +02:00
Miro Kropacek e75b607579 JANITORIAL: Correct indentation 2025-06-25 23:50:34 +02:00
Cameron Cawley 62851abfa1 GRAPHICS: Add helper functions for creating RGBA32 and BGRA32 formats 2025-06-19 14:17:51 +03:00
Cameron Cawley 106fca7f27 OPENGL: Fix copy/paste error with ABGR1555 pixel format 2025-06-18 22:33:50 +03:00