mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
Fixed a crash caused by the stack being unaligned when entering ThreadImpl::entryPoint if compiled by GCC or clang and run on Windows XP 32-bit. (#412)
This commit is contained in:
parent
337df1ea5f
commit
520025d904
@ -31,6 +31,17 @@
|
|||||||
#include <SFML/System/NonCopyable.hpp>
|
#include <SFML/System/NonCopyable.hpp>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
// Fix for unaligned stack with clang and GCC on Windows XP 32-bit
|
||||||
|
#if defined(SFML_SYSTEM_WINDOWS) && (defined(__clang__) || defined(__GNUC__))
|
||||||
|
|
||||||
|
#define ALIGN_STACK __attribute__((__force_align_arg_pointer__))
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define ALIGN_STACK
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
@ -81,7 +92,7 @@ private :
|
|||||||
/// \return OS specific error code
|
/// \return OS specific error code
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static unsigned int __stdcall entryPoint(void* userData);
|
ALIGN_STACK static unsigned int __stdcall entryPoint(void* userData);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
|
Loading…
Reference in New Issue
Block a user