aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2017-11-26 01:36:21 +0000
committerThierry Crozat2017-11-26 01:56:48 +0000
commit2d88a308037a2025e38bc588b85a86927ff82fa2 (patch)
treedb809b22ad5c3d0844adf05ace0cada5d30e7e57
parent9d61d70c0d51bbc4ec75051f40ef57e9b0d2622d (diff)
downloadscummvm-rg350-2d88a308037a2025e38bc588b85a86927ff82fa2.tar.gz
scummvm-rg350-2d88a308037a2025e38bc588b85a86927ff82fa2.tar.bz2
scummvm-rg350-2d88a308037a2025e38bc588b85a86927ff82fa2.zip
Revert "SDL: Use RLE acceleration for SDL2 transparent surfaces"
This reverts commit 6b4195a542083c97f696c843b9823d578b018996. There seemed to be no clear benefit in using RLE for transparent surfaces, and there were a few reports that it might cause crashes on Windows. So to be on the safe side I prefer to revert this commit.
-rw-r--r--backends/platform/sdl/sdl.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 68a987bc61..f6ab180897 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -765,13 +765,10 @@ int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha) {
if (SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE)) {
return -1;
}
- SDL_SetSurfaceRLE(surface, 0);
} else {
if (SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)) {
return -1;
}
- if (flag & SDL_RLEACCEL)
- SDL_SetSurfaceRLE(surface, 1);
}
return 0;
@@ -779,13 +776,7 @@ int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha) {
#undef SDL_SetColorKey
int SDL_SetColorKey_replacement(SDL_Surface *surface, Uint32 flag, Uint32 key) {
- if (SDL_SetColorKey(surface, SDL_TRUE, key)) {
- return -1;
- }
-
- if (flag & SDL_RLEACCEL)
- SDL_SetSurfaceRLE(surface, 1);
- return 0;
+ return SDL_SetColorKey(surface, SDL_TRUE, key) ? -1 : 0;
}
#endif