Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c --HG-- rename : src/SDL_android.cpp => src/core/android/SDL_android.cpp rename : src/SDL_android.h => src/core/android/SDL_android.h
This commit is contained in:
parent
1775cf40fd
commit
b4497865bd
37 changed files with 274 additions and 273 deletions
|
@ -25,14 +25,7 @@
|
|||
#include "SDL_timer.h"
|
||||
|
||||
/* Don't do the check for Visual Studio 2005, it's safe here */
|
||||
#if defined(_MSC_VER)
|
||||
#ifdef _WIN32_WCE
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#endif /* _MSC_VER */
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
|
||||
/* This function is where all the magic happens... */
|
||||
SDL_bool
|
||||
|
@ -40,7 +33,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
|
|||
{
|
||||
#if defined(_MSC_VER)
|
||||
SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
|
||||
return (_InterlockedExchange((long*)lock, 1) == 0);
|
||||
return (InterlockedExchange((long*)lock, 1) == 0);
|
||||
|
||||
#elif defined(__MACOSX__)
|
||||
return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue