Commit Graph
1292 Commits
Author SHA1 Message Date
Christian Kündig 7bdadaefae EMSCRIPTEN: GRAPHICS: Fix screenshots 2024-02-27 17:07:13 +01:00
Le Philousophe 6342045cc3 BACKENDS: OPENGL: Don't take the alpha channel from the game texture
It's not always set correctly by engines (AGS) and a fill call to clear
the screen will set it to 0 along with the other components.
Setting the framebuffer to some transparent value is not something we
intend to do as this let the content underneath the drawing texture
visible like it's the case on ChromeOS.
This has been reported here: https://forums.scummvm.org/viewtopic.php?p=99293
2024-02-24 16:43:14 +01:00
Miro Kropacek f41a678ba1 GRAPHICS: ATARI: Utilize dlmalloc
- every malloc is now aligned on 16 bytes

- no need for the hidden pointers

- ct60_vmalloc() is called only once, the rest is handled
  by dlmalloc (SV XBIOS' vmalloc is pretty fragile)
2024-02-24 03:54:54 +01:00
Torbjörn Andersson 57893f8d3a SURFACESDL: Refresh cursor scaler along whith standard scaler (bug #14872)
Otherwise, the cursor scaler and standard scaler may be different types,
which can lead to scaling the cursor with a scaler that normally doesn't
allow it. In this particular bug report, it caused ScummVM to crash.
2024-02-11 16:34:39 +01:00
Miro Kropacek 276103b0aa BACKENDS: ATARI: Fix a crash
_offsettedSurf must have the original screen dimensions, similar as done in
AtariGraphicsManager::Screen::reset().

Strangely, this bug was reproducible only in MagiC and not in FreeMiNT+MP.
2024-01-28 21:59:13 +01:00
Torbjörn Andersson 13996ea3d1 SURFACESDL: Remove redundant _mouseOrigSurface check
It's already checked a few lines above.
2024-01-28 14:07:33 +01:00
Le Philousophe 27c7572bd7 ANDROID: Get HiDPI density from Android metrics 2024-01-24 21:53:07 +01:00
Cameron Cawley 5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe 3c5fe56de6 BACKENDS: OPENGL: Small cleanups on paths 2023-12-24 13:19:25 +01:00
Le Philousophe 2f34975164 COMMON: Make shaders API use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe bfc61439fb COMMON: Make themepath a Path object 2023-12-24 13:19:25 +01:00
Le Philousophe e689166a2c BACKENDS: Make screenshots use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe 2097e32e3d ANDROID: Check for initSurface failures
Without a surface we can't do anything, so error out
2023-12-10 17:39:46 +01:00
Le Philousophe 34c70f148d BACKENDS: OPENGL: Don't update screen if there is no pipeline
This avoids crashes when updateScreen is called when context has been
destroyed and not yet created again.
2023-12-09 18:11:30 +01:00
sluicebox ddc2de5e4f BACKENDS: OPENGL: Fix FakeTexture palette init. PVS-Studio V1086 2023-11-20 12:39:29 +02:00
Rana prathap 97a9ed6e8d OPENGLSDL: add way to force update the window to required resolution 2023-11-17 20:28:39 +01:00
Kaloyan Chehlarski d3976468b1 BACKENDS: LIBRETRO: Fix memory leak
Coverity CID 1502443
2023-11-02 11:41:22 +02:00
Cameron Cawley bcc9259382 BACKENDS: Report if the backend supports cursors with alpha channels 2023-10-29 02:02:11 +02:00
Cameron Cawley a899ee5519 RISCOS: Add support for hardware palettes 2023-10-29 02:02:11 +02:00
Simon Delamarre 9785388f8e GRAPHICS: Fix an incorrect bpp in SurfaceSdl when applying cursor mask
Source bpp is wrongly taken instead of destination bpp, the issue is visible only if the source bpp is != 4.
2023-10-14 10:56:31 +03:00
Lars Sundström a705235d1a IOS7: Add touch mode configurations in menu, 2D & 3D games
In the Android port it's possible to configure differnet touch modes
in ScummVM menus, 2D games and 3D games. Add the same possibility in
the iOS port. In Android it's possible to configure a touch based
game controller as well. That's not in scope for iOS in this commit
but can be added in the future.
2023-10-10 20:55:48 +02:00
Miro Kropacek fb8528ac77 BACKENDS: ATARI: Various fixes
- composer unaligned pitch fix
- error() doesn't work while in OSystem_Atari c-tor
- when a crash occurs, restore at least the cursor
- fix a crash when "data" doesn't exist
2023-09-24 17:48:54 +02:00
Miro Kropacek dcab5d3369 CONFIGURE: Add support for m68k-atari-mintelf
This is basically the same as m68k-atari-mint host os but with a
different compiler/file format.
2023-09-24 17:48:54 +02:00
Miro Kropacek b510eff336 BACKENDS: ATARI: Implement aspect ratio correction 2023-09-24 17:48:54 +02:00
Cameron Cawley 54423ab73d SURFACESDL: Move the AspectRatio class into the graphics manager class 2023-08-26 01:25:51 +02:00
Miro Kropacek 46939cca9b BACKENDS: ATARI: Fix regression in unlockScreen() 2023-08-12 17:38:49 +02:00
Miro Kropacek 7e3b9cceec BACKENDS: ATARI: Direct rendering support
Similar to SuperVidel's but requires an additional C2P pass.

Also, a few optimizations added like cursor is being assumed to be in
a persistent memory so we don't copy it over. And it's using a mask
instead of key.

This graphics mode is not perfect though and works reliably only with
source surfaces allocated via Surface::init() otherwise wrong memory
location is being read.

Still, can gain quite a few CPU cycles, especially on 640x480 screens.
2023-08-12 17:38:49 +02:00
Cameron Cawley d8cca29783 BACKENDS: Allow filling part of the screen with OSystem::fillScreen 2023-08-06 23:03:46 +02:00
Miro Kropacek d9a5de0fe6 BACKEND: ATARI: Screen shaking and some fixes
- surface setup for optimized 4-bit C2P routine wasn't properly detected

- STFA pretends to support Falcon sampling frequencies on TT leading to
  suboptimal sample mixing

- delayMillis() should check also for other events (fixes Future Wars)
  but avoid doing it for SCI as its MIDI timer would call itself in a
  recursive loop

- SuperVidel doesn't need to use VsetScreen() in VBL anymore

- Wetlands, Teen Agent, Shivers and Private Eye need non-aligned
  surface  widths

- However Wetlands and Private Eye use setCursorPalette, see
  https://bugs.scummvm.org/ticket/14524

- Added warning for Phantasmagoria's 630x450, nothing can be done there
  as the game also requires non-aligned surfaces and at the same time
  the buffer has to be aligned on 16 bytes.

- BDF scaling disabled by default
2023-07-19 22:22:11 +02:00
Eugene Sandulenko fad630323a SDL: Added config key disable_saved_screenshot_osd for disabling the OSD message 2023-07-15 11:23:29 +02:00
Le Philousophe 5a84a5fdc1 BACKENDS: OPENGL: Rework shader assets search
Determine in which archive the shader is located and load assets from
the same archive.
When using a FSNode, use the filesystem code to build the base path.
Use a Path object to store the base path to allow proper join of
components.
2023-07-09 21:41:58 +02:00
Le Philousophe e3877d2606 ANDROID: Move game at the top of screen when keyboard is shown 2023-07-09 11:48:27 +02:00
Le Philousophe 4c13924a38 BACKENDS: Let the backend define how screen should be placed 2023-07-09 11:48:27 +02:00
Lars Sundström e6232547d5 IOS7: Add iOSGraphicsManager class
The ios7 backend implements the graphic handling in the backend code.
iOS supports OpenGL through the OpenGL Framework since iOS 2.0. It's
marked as deprecated but is still shipped with the SDKs for iPhoneOS
and tvOS and will hopefully be so for some time.
The ios7 backend can therefore utilize the OpenGLGraphicsManager to
handle all graphics.

Implement an iOSGraphicsManager class that can be used in the ios7
backend. The iOSGraphicsManager will require some callback functions
in the ios7 backend. createOpenGLContext() will be called to ask the
backend to create an OpenGL context in which the graphic manager can
draw. The function returns the ID of the renderbuffer which shall be
used when creating the framebuffer object this differ iOS from other
platforms). A custom RenderBufferTarget class is added to address
this.

destroyOpenGLContext() will be called to make sure that the old GLES
context is not reused. notifyContextDestroy() does call the function
OpenGLContext.reset() but that will not destroy the context.

refreshScreen() will be called to ask the backend to present the
drawn graphics on the screen. getSystemHiDPIScreenFactor() is called
to get the screen scaling factor. getScreenWidth() and
getScreenHeight() are called to get the width and height of the
surface to draw on.

This commit adds the class but the ios7 backend doesn't make use of
it quite yet. To use it require the ios7 to be a child class of the
ModularGraphicsBackend. That change requires a lot of changes which
will be targeted in separate commits.

Update docportal and github ci worker to only disable the feature
opengl_classic_game since opengl and opengl_shaders are required to
compile the OpenGLGraphicsManager.
2023-07-03 21:50:32 +02:00
Le Philousophe adda0dc063 BACKENDS: OPENGL: Allow the backend to specify the render target
For now only backbuffer is used.
2023-07-03 21:50:32 +02:00
Le Philousophe 10714db6f0 BACKENDS: OPENGL: Make setSize a Framebuffer function 2023-07-03 21:50:32 +02:00
Le Philousophe d371b50d30 ANDROID: Add setting to to disable screen rotation 2023-07-01 16:26:19 +02:00
Le Philousophe 3a838c99f9 ANDROID: Various small fixes
- Comment and space fixes
- Remove outdated setting
2023-07-01 16:26:19 +02:00
Le Philousophe bc438d078a ANDROID: When resizing don't reset everything
Only reinitialize the needed bits.
EGLSurface needs to be reset to take the new size into account.
GLSurfaceView in AOSP does the same thing.
2023-06-26 15:25:27 +03:00
Le Philousophe 2d1ca55ffb BACKENDS: OPENGL: Don't depend on USE_ASPECT
USE_ASPECT disables software aspect ratio correction.
In OpenGL it's done by GPU.
2023-06-25 15:14:13 +02:00
antoniou79 8cef7b8b69 JANITORIAL: Fix code indentation 2023-06-17 22:14:37 +03:00
antoniou79 68c293a004 GUI: Ommit aspect ratio checkbox if this feature is missing
Also fix compilation when building for --disable-aspect (buggy end bracket in backends/graphics/surfacesdl/surfacesdl-graphics.cpp)
2023-06-17 20:21:29 +02:00
antoniou79 38e88cde66 BACKENDS: GRAPHICS: Implement scaler scrolling for OpenGL
Using the Ctrl+Alt+0 or 9 keymap

Also added a guard check for kFeatureScalers to allow the actions (kActionNextScaleFilter, kActionPreviousScaleFilter) to change scaler (but not scaler factor) in sdl/sdl-graphics.cpp
2023-06-17 20:21:29 +02:00
Miro Kropacek d9eee7906a BACKENDS: ATARI: Use unordered_set for dirty rects
This allows efficient redraw of surfaces which don't change their
position too much.
2023-06-15 22:58:13 +02:00
Miro Kropacek 5537759c53 BACKENDS: ATARI: Rework
- Atari TT support
- all video and audio is now handled via XBIOS
- reworked IKBD handling using Kbdvbase vectors, esp. Kbdvec()
- video uses proper triple buffer
- arbitrary game screen size support
- many fixes and optimizations
2023-06-15 22:57:55 +02:00
Miro Kropacek 62d3a3c16e BACKENDS: ATARI: work around engines with unaligned pitch
Too complex to investigate so don't align every 8-bit surface on a
16-byte boundary there.
2023-06-10 23:27:57 +02:00
Le Philousophe 906a957b4a SURFACESDL: Apply the key color in the cursor margins
This avoids artefacts on borders when using scalers like AdvMame.
This fixes bug #14308
2023-06-04 18:24:06 +02:00
Le Philousophe a95f42317c BACKENDS: OPENGL: Clear screen using opaque black instead of transparent
This looks like an overlook since the creation of the backend.
Previous Android backend used this and it shouldn't harm other
platforms.
This should fix a bug on ChromeOS.
2023-06-04 18:22:59 +02:00
Miro Kropacek a6a5b8ab42 BACKENDS: ATARI: Handle themes in installation script
- "fat" version uses repacked (zip -0) archives; also separate "data"
  and "themes" folders
- "slim" version doesn't use any external themes (for speed reasons)
2023-05-11 00:03:44 +02:00
Miro Kropacek aa8935e447 BACKENDS: ATARI: grabOverlay() uses accelerated blitting 2023-05-10 22:59:56 +02:00