[Commits] [wesnoth/wesnoth] 449aed: Fix Bug #23908 - Crash on resize with SDL2.
GitHub
noreply at github.com
Mon Oct 12 12:53:01 UTC 2015
Branch: refs/heads/sdl2
Home: https://github.com/wesnoth/wesnoth
Commit: 449aed0a64e6b00e3f53d450a2a9dcaefebab306
https://github.com/wesnoth/wesnoth/commit/449aed0a64e6b00e3f53d450a2a9dcaefebab306
Author: Andreas Löf <andreas at alternating.net>
Date: 2015-10-13 (Tue, 13 Oct 2015)
Changed paths:
M src/events.cpp
M src/events.hpp
M src/gui/widgets/grid.cpp
M src/hotkey/hotkey_preferences_display.cpp
M src/loadscreen.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Fix Bug #23908 - Crash on resize with SDL2.
SDL2 uses shared memory to communicate with the graphics system when
using a software renderer. A resize event will cause SDL2 to
invalidate the SDL_surface that relies on shared memory and any
subsequent calls to will be SDL_GetWindowSurface will cause the shared
memory do be unmapped as the old surface is released. This is
problematic when it occurs during a rendering cycle, because the
software rendered may also invoke SDL_GetWindowSurface, making any
references to that surface that the game contains become stale. This
will in turn cause a segmentation fault during blitting.
More information about the Commits
mailing list