Commit Graph
1308 Commits
Author SHA1 Message Date
scemino 4a1209da9f IMGUI: Use docking branch
This is is imgui commit fee0210592b9cb5b1a778f005ffb1fe76b19ced0
2024-05-24 16:35:55 +02:00
Hubert Maier f06976637a JANITORIAL: Fix receive typo in surfacesdl-graphics.cpp 2024-05-18 13:52:31 +02:00
Hubert Maier 09879b225b JANITORIAL: Fix choosen typo in openglsdl-graphics.cpp 2024-05-18 13:52:31 +02:00
Eugene Sandulenko 34be774f4b BACKENDS: IMGUI: Bump ImGui to v1.90.6 2024-05-17 22:19:46 +02:00
Eugene Sandulenko 4cd62e3398 BACKENDS: IMGUI: Renamed modified files to minimize diff with upstream 2024-05-17 01:46:45 +02:00
Eugene Sandulenko c59ac26f97 BACKENDS: Remove obsolete gph/caanoo/gp2x/gp2xwiz port 2024-05-10 13:38:20 +02:00
scemino 936109fe4f BACKENDS: Update ImGui callbacks in OSystem and fix engines 2024-05-03 20:25:01 +02:00
scemino 8e07681356 BACKENDS: Update setImGuiRenderCallback in OSystem 2024-05-03 20:04:30 +02:00
Eugene Sandulenko 9bfba6bacc JANITORIAL: Fix code formatting 2024-04-28 22:04:23 +02:00
Le Philousophe a04fe8ef2f OPENGL: Don't always force redraw when ImGui is enabled
Only do it when ImGui is enabled by the engine and move the check in SDL
backend where ImGui is supported.
This makes the OpenGL backend independent of ImGui.
2024-04-28 21:48:10 +02:00
Le Philousophe e6a7d6bc9b OPENGLSDL: Don't compile code when not on SDL 2.0 2024-04-28 21:48:10 +02:00
Le Philousophe 3822d9d644 BACKENDS: Move setImGuiRenderCallback in OSystem and hide implementation
This avoids dynamic casts and having a variable defined in
backends not supporting ImGui
2024-04-28 21:48:10 +02:00
scemino b721f95ffe BACKENDS: Add imgui in OpenGL backend 2024-04-28 13:59:31 +02:00
Eugene Sandulenko 9965ee0c3e SURFACESDL: Fix crash on specifying gfx mode via command line
`./scummvm -g surfacesdl` was crashing since there is no previous
scaler
2024-04-10 00:14:11 +02:00
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
scemino 8807ab74db BACKENDS: New imgui proposition 2024-03-07 20:08:26 +01:00
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