aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl
AgeCommit message (Collapse)Author
2017-09-03SDL: Fix unsafe sprintf usageColin Snover
Translation strings come from external data sources and can cause a stack buffer overflow here just by accidentally (or maliciously) being too long.
2017-08-11BACKENDS: SURFACESDL: Add missing break statementEugene Sandulenko
2017-07-06SDL: Only recreate SDL2 window when necessaryColin Snover
Destroying and recreating the SDL window whenever the video mode changes in SDL2 is not necessary and causes several problems: 1. In windowed mode, the game window shifts position; 2. In fullscreen mode in macOS, every time the window is recreated, it causes the OS to play its switch-to-fullscreen animation again and emit system alert noises; 3. The window content flickers; and 4. The engine loses events from the old destroyed window. This patch changes the SDL backend code to avoid destroying and recreating the SDL window when using SDL2, except when switching OpenGL modes, since there is no way to change the OpenGL feature of a window. There are still some outstanding issues with OpenGL where window size ends up getting reset even though the user has resized it; this will probably need to be addressed at some point in another patch. Thanks to @bgK and @criezy for their feedback which made this patch much better. Co-Authored-By: Bastien Bouclet <bastien.bouclet@gmail.com>
2017-05-21BACKENDS: Compress screenshots using PNG if availableColin Snover
Closes gh-948.
2017-04-24SDL: Improve debug and warning messages when saving screenshotsThierry Crozat
In particular this adds a warning when failing to save a screenshot in OpenGL mode (there was already one in SurfaceSDL mode).
2017-04-24SDL: Use dynamic cast instead of C cast to get screenshot pathThierry Crozat
2017-04-24WINDOWS: Change location where screenshot are savedPala
This fixes bug #9701: WINDOWS: Flow of taking screenshots on Windows is broken
2017-03-06SDL: Fix trying to init non-supported shaders (#917)rsn8887
2017-03-05BACKENDS: Fix const'ness which led to warningsEugene Sandulenko
2017-03-05BACKENDS: Fix crash on startupEugene Sandulenko
2017-03-04PSP2: Add Playstation Vita (PSP2) supportcpasjuste
2016-11-13CHEWY: Plug memory leaksEugene Sandulenko
2016-10-18SDL: Fix typo in function nameOri Avtalion
2016-10-13SURFACESDL: Improve toggling filtering on/offThierry Crozat
We don't need to recreate the window when turning filtering on or off. Only the texture needs to be recreated.
2016-10-13SURFACESDL: Add hotkey to enable/disable filteringThierry Crozat
2016-10-13SURFACESDL: Add support for filtering feature when using SDL2Thierry Crozat
This implements the request from ticket #9573: SDL1/2: Different rendering/filtering?
2016-10-03SDL: Switch to full screen updates when the OSD is transparentBastien Bouclet
Previous releases also did full screen updates for transparent OSD messages. There should be no performance regression with that regard. Computing smaller update rects is non trivial, but should be looked into if performance is an issue for OSD icons. Fixes #9598
2016-09-18SDL: Make sure the cloud icon is cleared immediatly after it is hiddenBastien Bouclet
2016-09-13SDL: Switch the surface renderer to use small surfaces for OSD drawingBastien Bouclet
2016-09-03JANITORIAL: Remove trailing whitespacesEugene Sandulenko
2016-09-03SDL: Optimize OSD drawingEugene Sandulenko
2016-08-30SDL: Fix const castWillem Jan Palenstijn
2016-08-24GUI: Fix copyRectOnOSD()Alexander Tkachev
Now it doesn't require full redraw, but asks to redraw the area which is copied to.
2016-08-24GUI: Separate OSD message alpha from OSD surfaceAlexander Tkachev
Now OSD is always drawn.
2016-08-24GUI: Add getOSDFormat() and make OSD 32 bppAlexander Tkachev
2016-08-24GUI: Add clearOSD() methodAlexander Tkachev
So one can erase everything from OSD and then blit something on it.
2016-08-24GUI: Add copyRectToOSD()Alexander Tkachev
I was lazy to implement that in OpenGLGraphicsManager and I'm not sure it's implemented correctly in SurfaceSdlGraphicsManager, but it works for me.
2016-07-01SDL: Fix mouse trailing part of bug #7141Ben Castricum
Overlays are shown with _currentShakePos offset too, so no need to compensate the mousepointer position for overlays. This compensation was done inconsistently in draw/undraw mouse causing the mouse trails.
2016-04-10GCW0: Disable triple buffering.Eugene Sandulenko
Too many artifacts. It is not possible with current ScummVM drawing approaches.
2016-04-10GCW0: Enable triple bufferingEugene Sandulenko
2016-02-17SDL: Work around bug #7038 by limiting mode reset to Win32.Johannes Schickel
Bug is: "IRIX: X BadMatch when trying to start any 640x480 game". 40e019efd45a02261a7dbc69ceaa9188d8c7a269 introduced resetting the pixel depth when unloading modes for SDL output. This was required to make mode listing for OpenGL work on Win8+. This causes issues on non-Win32 platforms though. SDL might not give us a valid a pixel depth, causing the resetting to fail. A particular example is X11 on IRIX, when only 16bit output modes work. Initially SDL tells us that the pixel depth is 32bit. Trying to set this up causes a crash though. Since there is no way to validate SDL's return value, we simply limit the reset to platforms where it is actually required, i.e. Win32.
2015-12-18SDL: Implement initial support for resizable window with SDL2.Johannes Schickel
The code is disabled for now.
2015-12-13SDL: Fix mouse emulation with SDL2.Johannes Schickel
The mouse emulation via keyboard (or other means) was broken with 079037b73990b6107e59c7f1cd971c3a1cc221d1.
2015-12-13SDL: Fix warpMouse for SDL2.Johannes Schickel
Thanks to bgK for noticing.
2015-12-08SDL: Prevent cursor from leaving screen area in fullscreen with SDL2.Johannes Schickel
2015-12-08SDL: Prevent graphics stretching in fullscreen when using SDL2.Johannes Schickel
As a side effect we get better coordinates from mouse move events in fullscreen, i.e. we do not get actual window coordinates but something close to actual viewport coordinates. The easily noticable issue is that mouse coordinates inside black bars are outside of the viewport. For example, the x coordinate can get negative when there's a black bar at the left side.
2015-05-20SDL: Fix compilation with SDL2.Johannes Schickel
2015-05-16SDL: Restore the original video mode when unloading the Surface graphics managerLittleboy
We set a custom video mode that might have a different BPP from the default. To ensure that other graphics managers will get the proper results when listing available video modes, we need to restore the initial BPP when unloading. This fixes an issue when switching to OpenGL on Windows 8 and later. On those OSes, fullscreen OpenGL only has a 32bpp mode. It is correctly listed in the options but we call SLD_SetVideoMode later in the surface graphics manager. When we list the mode again after a switch, the internally selected BPP is still 16 and we fail to find any available fullscreen modes.
2015-02-16SDL: Add basic abstraction class for the SDL window.Johannes Schickel
2015-01-25SDL: Add experimental support for SDL2.Johannes Schickel
This is based upon skristiansson's change set to make ScummVM work with SDL2.
2015-01-25SDL: Refactor WM specific functionality into SdlGraphicsManager.Johannes Schickel
2014-02-18SDL: Make GPL headers consistent in themselves.Johannes Schickel
2014-01-23Merge pull request #409 from lordhoto/rttiJohannes Schickel
Enable RTTI and clean up the code by exploiting the availability of dynamic_cast.
2014-01-11SDL: Avoid having SDL_SRCALPHA set even if we have alpha in the pixelformat.Einar Johan Trøan Sømåen
2014-01-07SDL: Silence unused variable warning when scalers are disabled.Johannes Schickel
2014-01-07SDL: Fix return value of getDefaultGraphicsMode when scalers are disabled.Johannes Schickel
2013-10-24SDL: Further small cleanup related to manager switching.Johannes Schickel
2013-10-24SDL: Make activateManager/deactivateManager SdlGraphicsManager specific.Johannes Schickel
We can do this now that we can use virtual inheritance and dynamic_cast because we enabled RTTI.
2013-10-24SDL: Let SdlGraphicsManager inherit from GraphicsManager.Johannes Schickel
2013-10-23SDL: Do not require a static graphics mode list in OpenGL and SurfaceSDL.Johannes Schickel