Commit graph

18 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
21ba2cffbb DS: Avoid disabling the virtual keyboard if it hasn't been enabled 2022-05-30 22:04:21 +01:00
Cameron Cawley
dd0304fb22 DS: Improve error reporting 2022-05-30 13:51:40 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Cameron Cawley
8c01baaaff DS: Get the virtual keyboard working with the mirrored subscreen 2021-11-01 16:19:15 +00:00
Cameron Cawley
224d626e65 DS: WIP virtual keyboard support 2021-11-01 16:19:15 +00:00
Cameron Cawley
69db8b9b33 DS: Fix compiler warning 2021-08-25 01:18:39 +01:00
Le Philousophe
68a327ecb1 BACKENDS: Harden grabOverlay in all platforms
Use specific copy code where applicable and replace duplicated code by
calls to copyBlit which optimizes blitting
2021-08-04 13:27:07 +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
521303b2ef DS: Handle scaling and scrolling in the Background class 2021-02-04 01:59:14 +01:00
Cameron Cawley
e3fabc803b DS: Only update the palette and cursor when updateScreen() is called 2021-02-04 01:59:14 +01:00
Cameron Cawley
7ddd7e4931 DS: Use the Background class for the game screen 2021-02-04 01:59:14 +01:00
Cameron Cawley
b37843f10d DS: Fix setGraphicsMode signature 2021-02-04 01:59:14 +01:00
Cameron Cawley
a642279e5d DS: Add a Background class for the overlay 2021-02-04 01:59:14 +01:00
Cameron Cawley
0c776013f7 DS: Add RGB colour support 2021-02-04 01:59:14 +01:00
Cameron Cawley
4ac5421c6d DS: Add a generic dmaBlit function and use it in updateScreen 2021-02-04 01:59:14 +01:00
Cameron Cawley
f802c2e88a DS: Add support for RGB cursors 2021-02-04 01:59:14 +01:00
Cameron Cawley
626b6ac4e9 DS: Move graphics code into a separate file 2021-02-04 01:59:14 +01:00