Commit graph

1358 commits

Author SHA1 Message Date
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
Miro Kropacek
76d3706492 BACKENDS: ATARI: Add build scripts
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled

Provide two build scripts:

1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)

This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).

2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)

This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
2023-05-10 22:58:26 +02:00
Miro Kropacek
1870433daf BACKENDS: ATARI: Refactor & optimize dirty rects
This was long overdue. From my observation dirty rects don't need much
care, usually game engines already prepare them in a good shape (no
overlapping).

Also the overhead of calling the rect version of C2P isn't as big as I
was fearing, 256 64x64 rectangles are blitted roughly as quickly
as blitting one 1 MB block.

Removal of the rects traversal significantly speeds up Eco Quest for
instance.
2023-04-08 20:27:44 +02:00
Miro Kropacek
a4e85dab01 BACKENDS: ATARI: Remove double buffering & vsync
ScummVM engines are not built for synchronous screen locking (i.e.
updateScreen() can't be really used for any sort of blocking updates
otherwise performance suffers).

Single buffering now means deliberate tearing as a speed optimization
and triple buffering provides a tearingless picture with slight overhead.
2023-04-08 20:27:43 +02:00
Miro Kropacek
b2103898a7 GRAPHICS: ATARI: Optionally avoid surface pitch align
Some engines are too bound to linear surfaces in 8bpp that it is very
hard to repair them. So instead of polluting the engine with
Surface::init() & delete[] Surface::getPixels() just use this
workaround.

It is also useful as an early fix for newly found engines which may be
fixable later.
2023-04-07 15:54:28 +02:00
Miro Kropacek
611752e55f BACKENDS: ATARI: Update mouse even if not visible
Toonstruck, Discworld and others manage their own cursor and are
interested only in *mouse* position, not in *cursor* drawing. And
indeed, atari backend doesn't go further than rectangle drawing.
2023-04-03 20:19:46 +02:00
Walter Agazzi
2c1741e5c6 GRAPHICS: Preventively remove alpha channel for screenshots
Preserving the alpha channel for screenshots
is not really needed and causes problems in
the AGS engine (and possibily other engines)
2023-04-02 11:38:18 +02:00
Miro Kropacek
cef14a7c6a BACKENDS: ATARI: Small fixes
- fix restoration of dirty rects from overlay
- fix vsync handling (don't try to be too smart; we can't store "vsync"
  from anywhere because that wouldn't play nicely if a game has its own
  "vsync" set) ... so keep the checkbox as is
- overlay restore for 640x400
- never wait for vbl in overlay
- readme.txt
2023-03-29 20:17:43 +02:00
Antoniou Athanasios
8ce6a32ac2 ANDROID: Clean up log code and use Backends::Log 2023-03-26 12:05:12 +03:00
Miro Kropacek
a98ce2c211 BACKENDS: ATARI: Double/triple buffering doesn't enforce fullscreen redraws
Also, massively refactored, single/double/triple/overlay rendering is
finally united.
2023-03-25 21:45:50 +01:00
Miro Kropacek
52f8bd45e2 BACKENDS: ATARI: Use RGB332 for the overlay 2023-03-25 21:45:50 +01:00
Miro Kropacek
6c5e3dbfd5 BACKENDS: ATARI: Refactor 2023-03-25 21:45:50 +01:00
Miro Kropacek
06af761337 GRAPHICS: ATARI: Align surface on a 16-byte boundary
Also implement a CPU-based optimization for the 68040 / 68060.
2023-03-20 22:17:25 +01:00
Le Philousophe
f7ca853d34 OPENGL: Make sure shader has been created before cloning it 2023-03-19 09:46:03 +01:00
Donovan Watteau
18ab6803d6 JANITORIAL: Fix various "an" typos in comments 2023-03-16 14:47:28 +01:00
Thierry Crozat
9f1528e32f SDL: Fix incorrect handling of dirty rect with negative shake offset in SDL1
Instead of shifting the destination to the left, if was moving the source to
the right, which had the effect of shifting the dirty rect. So part of the
surface that should have been copied to the screen was not, and instead it
was copying part of the surface that did not need to be copied.
2023-03-06 22:16:49 +00:00
Scott Percival
dd43a7d2c4 SURFACESDL: Re-add check for _cursorNeedsRedraw
Partially rolls back a change introduced in
2caa338dbddd9429c766a281231c8fb98701d968; Director relies on the notion
of updateScreen() being near-zero cost if there are no changes.
For example, starting director:henachoco05 went from taking a few
milliseconds to taking 11 seconds, and opening the top menu in
director:easternmind only works on 10% of the screens.
2023-03-06 21:26:28 +01:00
Vladimir Serbinenko
263a6bbb82 SDL: Fix shaking with SDL1 and negative offsets
Current code results in a crash
2023-03-06 01:17:16 +01:00
elasota
2841b9931d GRAPHICS: Fix Normal and AdvMame scalers not applying cursor mask to additive texture 2023-03-05 21:13:01 +01:00
elasota
18f947272a GRAPHICS: Properly handle cursor mask texture in GL context teardown/recreate.
Fixes cursor transparency breaking after toggling fullscreen mode on Windows.
2023-03-05 21:13:01 +01:00
Miro Kropacek
4d21a496d2 BACKENDS: ATARI: Add new backend (graphics, mixer, platform)
Compile as:

./configure --backend=atari --host=m68k-atari-mint --enable-release --disable-mt32emu --disable-lua --disable-nuked-opl --disable-16bit --disable-scalers --disable-translation --disable-eventrecorder --disable-tts --disable-bink --opengl-mode=none --enable-verbose-build --prefix=/usr --bindir=/ --datarootdir=share --datadir=data && make -j 16 && m68k-atari-mint-flags -S -r ./scummvm && make install DESTDIR=$PWD/_release/ && mv $PWD/_release/scummvm $PWD/_release/scummvm.ttp
2023-03-04 23:38:42 +01:00
Miro Kropacek
9285e5a66e COMMON: Fix null graphics backend without USE_RGB_COLOR 2023-03-04 23:38:42 +01:00
D G Turner
edf97f385c GRAPHICS: Fix Set-But-Unused-Variable GCC Compiler Warning 2023-02-20 00:43:42 +00:00
elasota
325674ace7 GRAPHICS: Add masked cursor support to SurfaceSdl, fix tests 2023-02-19 23:51:09 +01:00
elasota
3db67a33ac GRAPHICS: Add support for pixels with masks and inverted pixels 2023-02-19 23:51:09 +01:00
Cameron Cawley
8adcc29df9 RISCOS: Use double buffering in full screen mode when V-sync is enabled 2023-02-19 21:27:45 +00:00
Cameron Cawley
971148c9bd SURFACESDL: Allow vsync support to be implemented in subclasses with SDL 1.2 2023-02-19 21:27:45 +00:00
Le Philousophe
c6c73ea0ea OPENGL: Properly take extra pixels into account when using scalers
As in SurfaceSDL, the dirty rect must be grown.
2023-02-13 21:08:53 +01:00
Le Philousophe
dc4acb8745 SURFACESDL: Really fix mouse dirty rectangle
Hotspot was not correctly taken into account when it changed.
Calculations are simplified and only done in one place.
2023-02-12 18:28:04 +01:00
Le Philousophe
4a7d75595d OPENGLSDL: Make sure pipeline is destroyed when Manager is destroyed
When destroying the Manager its context is always destroyed.
Destroying OpenGLGraphicsManager must destroy the pipeline too.
2023-02-12 18:06:21 +01:00
Cameron Cawley
2caa338dbd SURFACESDL: Fix calculating the mouse dirty rectangle 2023-02-07 23:44:17 +01:00
Cameron Cawley
ce9d324a72 SURFACESDL: Fix crash when saving screenshots in paletted screen modes 2023-02-07 23:42:42 +01:00
Le Philousophe
97c8746d2e BACKENDS: OPENGL: Use a floating point cursor size
When scaler shaders are used, cursor size is adapted to scale on the
game screen texture and not on the back buffer so the size is scaled
twice and is imprecise.
Using a float gives more precision without any performance impact as the
OpenGL code already expects floats.
2023-02-05 20:48:51 +01:00
Eugene Sandulenko
e0736936e9
BACKENDS: OPENGL: Use isCLUT8() 2023-02-02 19:33:20 +01:00
Vladimir Serbinenko
a1fdd9df20 MIYOO: Use 640x480 GUI
it looks nice and crisp on this handheld
2023-01-29 10:41:10 +01:00