Commit Graph
105 Commits
Author SHA1 Message Date
Le Philousophe 87bad2cc7d COMMON: Allow games to use overlay for something else than GUI
This can be used for subtitles without changing the mouse coordinates.
2022-11-12 19:12:05 +01:00
Cameron Cawley 79fff69231 COMMON: Use Common::String for OSystem::setShader 2022-10-08 23:39:18 +02:00
Cameron Cawley 64c359b5cb GUI: Replace the options for selecting shaders 2022-10-08 23:39:18 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski 2a7aa00c85 BACKENDS: Remove PixelBuffer leftovers 2021-11-27 21:22:09 +01:00
Cameron Cawley a21961516a GRAPHICS: Split ScalerPluginObject into two classes 2021-11-23 23:32:58 +01:00
Orgad Shaneh 44219dfa1a BACKENDS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Cameron Cawley 5022489277 BACKENDS: Refactor the API for creating Mutexes 2021-11-12 20:19:45 +01:00
Scott Percival 84707ec828 EVENTRECORDER: Prevent recursive call to warpMouse 2021-09-09 19:32:02 +02:00
Scott Percival 5cbcd98963 EVENTRECORDER: Add screen update tracking
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.

This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
2021-09-09 19:32:02 +02:00
Thierry Crozat 6d8462674f COMMON: Add getHiDPIScreenFactor to OSystem 2021-08-13 21:41:33 +01:00
Orgad Shaneh 780c4568c1 GUI: Fix compiler warning
../scummvm/gui/options.cpp: In member function 'virtual void GUI::OptionsDialog::apply()':
../scummvm/gui/options.cpp:647:82: warning: comparison of integer expressions of different signedness: 'uint' {aka 'unsigned int'} and 'int' [-Wsign-compare]
  647 |     else if (scalerPlugins[defaultScaler]->get<ScalerPluginObject>().getFactor() != g_system->getDefaultScaleFactor())
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-06-24 11:34:45 +03:00
Cameron Cawley da5d773924 BACKENDS: Add getDefaultScaler and getDefaultScaleFactor to OSystem 2021-06-23 21:29:53 +02:00
Cameron Cawley 0e6b9c2bb6 SDL: Begin refactoring the API for selecting scalers 2021-06-23 21:29:53 +02:00
Martin Gerhardy 5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Cameron Cawley d33487f641 SDL: Refactor OpenGLSdlGraphics3dManager to inherit from SdlGraphicsManager 2021-04-17 20:32:27 +02:00
Thierry Crozat a509afdf4d COMMON: Remove resetGraphicsScale from OSystem
This function used to be called from the Engine class, but was
not longer used since commit 432fd522. The single remaining use
was an internal use in the SurfaceSdlGraphicsManager, and I kept
the behaviour there while removing the function.
2020-11-12 21:05:36 +00:00
Cameron Cawley a24194b4c9 BACKENDS: Add missing function to ModularGraphicsBackend
Fixes Trac #11778
2020-10-15 12:56:45 +01:00
Paweł Kołodziejski 070d274bf7 BACKENDS: Drop getScreenPixelBuffer() as no longer needed. (#2521) 2020-10-13 22:30:39 +02:00
Paweł Kołodziejski 35b9cccbde ALL: Merge ResidualVM 2020-10-09 19:44:13 +02:00
Pawel Kolodziejski c4b9f966b6 GRIM: Drop side textures feature from backend. 2020-10-05 19:09:58 +02:00
Pawel Kolodziejski d8f2040dba ALL: Drop setupScreen API, use new initGraphics3d from engine API.
Enabled system API for begin/end gfx transactions, initSize, setGraphicsMode.
Function setGraphicsMode will use optional params to trigger 3d rendering
and switch to proper SDL Gfx manager.
2020-10-02 19:14:19 +02:00
Pawel Kolodziejski 01120c9203 BACKENDS: A little more change in layout for 3D GFX manager 2020-09-27 16:41:23 +02:00
Pawel Kolodziejski bfe58d3c77 ALL: Synced with ScummVM - rev: d4db631f9b 2020-09-23 21:52:10 +02:00
Cameron Cawley 31be074893 BACKENDS: Add a function to return if the overlay is visible 2020-09-15 00:09:11 +02:00
Pawel Kolodziejski d5304e2568 ALL: Synced with ScummVM - rev: 33a47d23b8 2020-09-03 02:21:14 +02:00
aryanrawlani28 a089fe47e7 BACKENDS: Display messages on OSD takes in U32Strings for modular backend. 2020-08-30 14:43:41 +02:00
Cameron Cawley b9d2b87085 BACKENDS: Move MixerManager code into ModularMixerBackend 2020-08-24 14:22:35 +02:00
Cameron Cawley 75852a786a BACKENDS: Split ModularBackend into two separate classes 2020-08-24 14:22:35 +02:00
Cameron Cawley 6c22f92301 BACKENDS: Move implementation of getMixer() out of ModularBackend 2020-08-24 14:22:35 +02:00
Pawel Kolodziejski 8f4e1c6cf3 Sync with ScummVM rev. 654b8208b8 2020-06-22 08:14:16 +02:00
Cameron Cawley 8201d58577 BACKENDS: Ensure that _timerManager is deleted before _mutexManager 2020-05-25 20:21:05 +01:00
Pawel Kolodziejski 6e02b9d5d6 SDL: Based on PR #1624 and more sync with ScummVM 2020-05-12 23:46:03 +02:00
Pawel Kolodziejski b586571900 ALL: synced with ScummVM commit 09bf38c120 2020-05-09 20:05:54 +02:00
Cameron Cawley f2db412ba5 GUI: Store the shader name in the config file instead of the ID 2020-03-09 18:01:14 -05:00
Bastien Bouclet feaf9dc365 ALL: Sync with ScummVM rev. 55dba55056 2019-12-08 17:06:42 +01:00
Cameron Cawley 48615cb83e BACKENDS: Move implementation of OSystem::quit() out of ModularBackend 2019-12-01 01:04:06 +02:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
DouglasLiuGamer d4d6e6203b SDL: Implement screenshot saving 2019-02-23 09:52:09 +01:00
Bastien Bouclet 53759fe53a ALL: Sync with ScummVM - rev. 2586ca2345 2018-07-31 21:09:37 +02:00
Thierry Crozat 8526c2c31a OSYSTEM: Add Stretch Mode API 2018-07-08 16:54:51 +01:00
Bastien Bouclet 3ec01653c3 ALL: Merge from ScummVM rev 3a933138ce 2017-12-06 21:41:03 +01:00
Colin Snover d1b77d4b68 BACKENDS: Fix missing mouse events when system cursor cannot be moved
Normally with SDL, a mouse motion event will be sent after the
system mouse cursor has been moved by a call to
SDL_WarpMouseInWindow, but if the system cursor cannot be moved
(e.g. because the window does not have mouse focus), games still
need to receive these mouse events so they can successfully update
the mouse position internally. Otherwise, games continue to think
the mouse is still in the original position and will continue to
try to perform whatever action is associated with that mouse
position.

Refs Trac#9689.
2017-10-15 13:24:21 -05:00
Colin Snover 6e157429b7 BACKENDS: Fix window sizing of games that switch between multiple resolutions 2017-10-07 12:30:29 -05:00
Bastien Bouclet 84e62b6c8d ALL: Sync with ScummVM - rev. 87ebc7140c 2017-09-02 15:04:07 +02:00
cpasjuste 70988527c6 PSP2: Add Playstation Vita (PSP2) support 2017-03-04 15:42:19 -06:00
Pawel Kolodziejski 19bcd1f3bc ALL: Sync with ScummVM 2016-11-12 12:59:06 +01:00
Bastien Bouclet 0802bbd8ee OSYSTEM: Remove the API allowing to draw to the OSD surface directly 2016-09-13 20:41:26 +02:00
Bastien Bouclet 521ba2cb8a OSYSTEM: Introduce a method allowing to draw a background activity icon 2016-09-13 20:25:13 +02:00
Alexander Tkachev 1b9987ddc9 GUI: Add getOSDFormat() and make OSD 32 bpp 2016-08-24 16:07:55 +06:00