aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
AgeCommit message (Collapse)Author
2017-09-15SDL: Remove USE_RGB_COLOR #ifdefs from detectSupportedFormatsColin Snover
This function is only defined when USE_RGB_COLOR is defined so these additional conditions are redundant.
2017-09-12SDL: Fix compilation on PSP2Colin Snover
2017-09-12SDL: List supported 32bpp pixel formats when using SDL2Colin Snover
_hwscreen is always initialized to 16bpp so the supported 32bpp pixel formats would never be put into the list of supported pixel formats, making it useless for engines to query for usable 32bpp pixel formats. This patch changes things so that the native desktop pixel format is at the top of the supported formats list, and all pixel formats <= the default desktop pixel format will now show up in the list of supported formats. ("Supported" is somewhat of a misnomer here since there is no hardware querying beyond checking the default desktop pixel format. SDL generally accepts a wide variety of pixel formats and tries to convert them to whatever the hardware supports.)
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-08-05OPENGL: Always clear the whole backbufferBastien Bouclet
Previously we were clearing the whole backbuffer for 3 frames after a window size change, and then only clearing the game area. This assumes the OpenGL driver uses at most 3 render buffer and uses them in sequential order. This does not seem to be the case on Linux when using an Intel integrated GPU. Instead we now clear the whole backbuffer on each frame to make sure there are no leftovers remaining on the screen. All semi-recent GPUs should have hardware clear anyway so this should not impact negatively performance. Possibly fixes #10025.
2017-07-10Revert "COMMON: Change way the Singleton instances are instantiated"Eugene Sandulenko
This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e. With this patch ConfigManager is broken.
2017-07-10COMMON: Change way the Singleton instances are instantiatedThierry Crozat
This fixes tons of warnings with clang from a recent xcode version on macOS (and possibly other systems) complaining that an instantiation of _singleton is required but no definition is available.
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-05-08OPENGL: Don't update the cursor's texture when the cursor is invisibleBastien Bouclet
Updating the cursor's texture is not necessary if it is not going to be drawn. Fixes glDrawArrays sometimes failing due to using a framebuffer with an incomplete color attachment. In SCI32 games, the framebuffer is incomplete because the engine does not define pixel data for the cursor.
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-20OPENGLSDL: Fix signed/unsigned comparisonColin Snover
2016-11-13CHEWY: Plug memory leaksEugene Sandulenko
2016-10-29OPENGL: Remove hack to avoid issues with OSD messages from other threadsThierry Crozat
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-13OPENGLSDL: Add hotkey to enable/disable filteringThierry Crozat
Crtl-Alt-f now enables/disables filtering instead of changing the graphics mode. Since there is only one graphics mode now, a hotkey to change it is a bit useless.
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-13OPENGL: Add support for filtering featureThierry Crozat
This replaces the two graphics modes "OpenGL (No filtering)" and "OpenGL". Now there is a single "OpenGL" mode and filtering is controlled by the kFeatureFilteringMode.
2016-10-13OPENGLSDL: Make some OSD messages translatableThierry Crozat
Also change some OSD messages to be the same or similar to messages used by the Surface SDL code.
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-18OPENGL: Make sure the cloud icon is cleared immediatly after it is hiddenBastien Bouclet
2016-09-18SDL: Make sure the cloud icon is cleared immediatly after it is hiddenBastien Bouclet
2016-09-18OPENGL: Remove multithread support from displayActivityIconOnOSDBastien Bouclet
It is no longer being called by another thread.
2016-09-18SDL: Ignore outdated SDL resize event in OpenGL modeThierry Crozat
Those outdated resize events are sent from SDL_DestroyWindow when the window is fullscreen and doesn't have the SDL_WINDOW_FULLSCREEN_DESKTOP flag (thus Surface SDL is not affected). Switching resolutions in fullscreen, or switching from fullscreen to windowed will therefore cause a resize event to be received with the former fullscreen resolution after we have already setup the window to use the new resolution. If we don't ignore this event we end up with a texture size and a window size that are not consistent and for example see only a part of the texture (if the old resolution is bigger than the new one.
2016-09-13OPENGL: Fix dereferencing null pointer in OpenGLGraphicsManagerThierry Crozat
This fixes a crash when calling displayActivityIconOnOSD with a NULL icon, which is used to remove the current activity icon.
2016-09-13OSYSTEM: Remove the API allowing to draw to the OSD surface directlyBastien Bouclet
2016-09-13SDL: Switch the OpenGL renderer to use small textures to draw the OSDBastien Bouclet
2016-09-13SDL: Switch the surface renderer to use small surfaces for OSD drawingBastien Bouclet
2016-09-13OSYSTEM: Introduce a method allowing to draw a background activity iconBastien Bouclet
2016-09-05OPENGL: Implement getOSDFormat and copyRectToOSDThierry Crozat
2016-09-05OPENGL: Add missing USE_OSD defined checks around OSD codeThierry Crozat
2016-09-03LINUXMOTO: Fix OSD performance when OSD is not drawnEugene Sandulenko
2016-09-03GPH: Fix OSD performance when OSD is not drawnEugene Sandulenko
2016-09-03DINGUX: Fix OSD performance when OSD is not drawnEugene Sandulenko
2016-09-03JANITORIAL: Remove trailing whitespacesEugene Sandulenko
2016-09-03SDL: Optimize OSD drawingEugene Sandulenko
2016-09-03LINUXMOTO: Adapt to OSD changesEugene Sandulenko
2016-09-03GPH: Fix formattingEugene Sandulenko
2016-09-03DINGUX: Adapt to new OSD changesEugene Sandulenko
2016-09-02GPH: Attempt to fix OSDEugene Sandulenko
2016-08-30SDL: Fix const castWillem Jan Palenstijn