mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-14 15:42:49 +02:00
VS2005 tweaks (thanks, Ozkan!).
Fixes Bugzilla #2895. His notes: The following trivial changes make SDL2 tree (mostly) compatible with Visual Studio 2005: * SDL_stdlib.c: Similar to VS2010 and newer, VS2005 also generates memcpy(), (it also generates memset(), see below), so propagate the #if condition to cover VS2005. * SDL_pixels.c (SDL_CalculateGammaRamp): VS2005 generates a memset() call for gamma==0 case, so replace the if loop with SDL_memset(). * SDL_windowsvideo.h: Include msctf.h only with VS2008 and newer, otherwise include SDL_msctf.h * SDL_windowskeyboard.c: Adjust the #ifdefs so that SDL_msctf.h inclusion is always recognized correctly.
This commit is contained in:
@@ -279,7 +279,8 @@ __declspec(selectany) int _fltused = 1;
|
||||
#endif
|
||||
|
||||
/* The optimizer on Visual Studio 2010/2012 generates memcpy() calls */
|
||||
#if _MSC_VER >= 1600 && defined(_WIN64) && !defined(_DEBUG)
|
||||
/* Visual Studio 2005 does it too, and it also generates memset() calls */
|
||||
#if (_MSC_VER == 1400 || _MSC_VER >= 1600) && defined(_WIN64) && !defined(_DEBUG)
|
||||
#include <intrin.h>
|
||||
|
||||
#pragma function(memcpy)
|
||||
|
||||
Reference in New Issue
Block a user