Ryan C. Gordon
131470867d
Replaced a sanity check with an SDL_assert().
2011-09-21 02:42:25 -04:00
Ryan C. Gordon
081fbdf242
Don't call pthread_exit(), returning from RunThread() is equivalent.
2011-09-20 17:48:29 -04:00
Ryan C. Gordon
596099f2c0
Simplified Windows RunThread().
...
Removed checks for things that are always true, free unneeded struct before
calling thread entry point, instead of after thread completes.
2011-09-20 17:42:58 -04:00
Ryan C. Gordon
82283b7279
Implemented x86 and x86-64 spinlock inline asm.
...
Favor it over Mac OS X API for Intel systems (but not GCC atomic intrinsics).
This might get us a little further on Cygwin builds, too.
2011-09-18 03:19:41 -04:00
Ryan C. Gordon
6fcfc35b50
Use an actual #error instead of a bogus symbol if there's no spinlock support.
2011-09-18 02:55:45 -04:00
Ryan C. Gordon
f369e4fa7c
Patched to compile on some platforms.
2011-09-18 02:09:20 -04:00
Andreas Schiffler
1694584d77
Add special cases for empty rectangles in SDL_Rect functions
2011-09-17 22:35:57 -07:00
Ryan C. Gordon
a90884b482
Removed some FIXMEs (Nathan's changes were, in fact, correct).
2011-09-15 23:55:36 -04:00
Ryan C. Gordon
99f00f09bd
Merged Nathan Heisey's Haiku work into the main SDL 1.3 branch.
...
This was a Google Summer of Code 2011 project, sponsored by the Haiku project.
We thank Nathan and the other Haiku developers for their support!
2011-09-15 23:51:07 -04:00
Ryan C. Gordon
15c4fb2a9d
Clean up the win32 compiler warnings for SDL threads, in the 1.3 branch.
...
--HG--
extra : rebase_source : 420916ed06d79e2d3c1d50e5fb40314ac7d94d85
2011-09-12 13:36:38 -04:00
Andreas Schiffler
b1185bef03
Fix regression introducted by added parameter check in SDL_EnclosePoints. Add special case to speedup when no result was requested.
2011-09-12 09:00:01 -07:00
Ryan C. Gordon
d7cb5c41ca
More work on cleaning out compiler warnings.
...
--HG--
extra : rebase_source : ab97ecaafc5a22451ea1bf8d4740380cf56f2f98
2011-09-11 04:02:40 -04:00
Ryan C. Gordon
ad214ecb4b
Some MMX fixes from Patrick Baggett.
...
Original email...
Date: Sat, 10 Sep 2011 13:01:20 -0500
From: Patrick Baggett
To: SDL Development List <sdl@lists.libsdl.org>
Subject: Re: [SDL] SDL_memcpyMMX uses SSE instructions
In SDL_blit_copy.c, the function SDL_memcpyMMX() actually use SSE
instructions.
It is called in this context:
#ifdef __MMX__
if (SDL_HasMMX() &&
!((uintptr_t) src & 7) && !(srcskip & 7) &&
!((uintptr_t) dst & 7) && !(dstskip & 7)) {
while (h--) {
SDL_memcpyMMX(dst, src, w);
src += srcskip;
dst += dstskip;
}
_mm_empty();
return;
}
#endif
This implies that the minimum CPU features are just MMX. There is a
separate SDL_memcpySSE() function.
The SDL_memcpyMMX() function does:
#ifdef __SSE__
_mm_prefetch(src, _MM_HINT_NTA);
#endif
...which tests at compile time if SSE intrinsics are available, not at run
time. It generates the PREFETCHNTA instruction. It also uses _mm_stream_pi()
intrinsic, which generates the MOVNTQ instruction.
If you replace the "MMX" code with:
__m64* d64 = (__m64*)dst;
__m64* s64 = (__m64*)src;
for(i= len / 64; i--;) {
d64[0] = s64[0];
d64[1] = s64[1];
d64[2] = s64[2];
d64[3] = s64[3];
d64[4] = s64[4];
d64[5] = s64[5];
d64[6] = s64[6];
d64[7] = s64[7];
d64 += 8;
s64 += 8;
}
Then MSVC generates the correct movq instructions. GCC (4.5.0) seems to
think that using 2x movl is still better, but then again, GCC isn't actually
that good at optimizing intrinsics as I've found. At least the code won't
crash on my P2 though. :)
Also, there is no requirement for MMX to be aligned to the 8th byte. I
think the author assumed that SSE's 16 byte alignment requirement must
retroactively mean that MMX requires 8 byte alignment. Attached is the full
patch.
Patrick
2011-09-11 01:54:54 -04:00
Ryan C. Gordon
f77b7f703a
Fixed a compiler warning.
2011-09-09 04:48:45 -04:00
Ryan C. Gordon
a65793b807
Added a newline to the end of a file to quiet old versions of GCC.
2011-09-09 02:43:04 -04:00
Ryan C. Gordon
caedc60d07
Removed legacy Mac OS X dlcompat code.
...
It was only needed for Mac OS X 10.0 through 10.2, so it seems silly to keep
it around for SDL 1.3.
I'll leave it in the 1.2 branch for now, though.
2011-09-09 00:34:48 -04:00
Ryan C. Gordon
35ef24dd77
Fixed compiler warning on 32-bit Mac OS X.
2011-09-07 10:54:14 -04:00
Andreas Schiffler
e36c0d8376
Added input parameter validation to some SDL_rect functions
2011-09-04 20:34:48 -07:00
Ryan C. Gordon
d9a9cf5a98
Fixed a compiler warning on Mac OS X.
...
Thanks to Mattias Holm for the patch!
2011-09-02 14:00:57 -04:00
Ryan C. Gordon
96e8606bd5
Fixed a NSLog() format string.
...
Thanks to Mattias Holm for the patch!
2011-09-02 14:00:10 -04:00
Ryan C. Gordon
33981bc8ba
Patched to compile.
2011-09-01 14:02:12 -04:00
Ryan C. Gordon
a622e7c305
Called method on wrong object in Android exception handler.
...
Fixes Bugzilla #1297 .
Thanks to jon @ rafkind for the patch!
2011-09-01 04:42:09 -04:00
Ryan C. Gordon
af022f47ed
Removed unused variable.
2011-09-01 04:34:05 -04:00
Ryan C. Gordon
6b4a7b19a4
Clean up any opened joysticks during SDL_JoystickQuit().
...
Otherwise, these leak memory and maybe operating system handles.
2011-09-01 04:25:15 -04:00
Ryan C. Gordon
d2587c649d
Automated merge with https://bitbucket.org/Markusk/sdl-gsoc
2011-08-29 13:17:07 -04:00
Tim Angus
6f0f508a4f
* Fix many memory leaks in Android FS code
...
* Set SDL error string with Java exception details when one occurs
* Fix tabulation of SDLActivity::getContext
2011-08-26 13:11:53 +01:00
Ryan C. Gordon
0daed19a0e
Removed the MAC_OS_X_VERSION_10_x macros from the 1.3 branch.
2011-08-25 03:11:28 -04:00
Ryan C. Gordon
c3366d1756
Patched to compile on Windows.
2011-08-23 16:47:22 -04:00
Ryan C. Gordon
1ea43749bd
Cleaned out functions deprecated in Mac OS X 10.6 SDK.
2011-08-23 15:17:44 -04:00
Ryan C. Gordon
84d42b9a9f
Fixed wrong datatype for shaders and programs.
...
This is a pointer on Mac OS X, so it risked losing data in 64-bit builds.
2011-08-23 06:27:04 -04:00
Nathan Heisey
b6c26ffe71
Fixed static misnomers
2011-08-22 21:07:16 +00:00
Nathan Heisey
4799ac2b6e
Partially cleaned out code
2011-08-22 11:02:05 +00:00
Nathan Heisey
491df9d730
Temporary mode-setting hack works
2011-08-20 15:16:13 +00:00
Kees Bakker
315893bf28
Split off SDL_uikitviewcontroller in its own module
...
--HG--
extra : rebase_source : 9f436d0751280968fb49307fb522b0d6c72d4409
2011-08-17 23:26:58 +02:00
Ryan C. Gordon
5df7568eec
Further XAudio2 build test cleanups.
2011-08-22 14:56:46 -04:00
Ryan C. Gordon
6412a3147e
Removed SDL_xaudio2.h ... no real need for this to be separate.
2011-08-22 14:37:45 -04:00
Ryan C. Gordon
023503370c
Let XAudio2 target be removed from the build by removing it from SDL_config.h
2011-08-22 14:30:49 -04:00
Ryan C. Gordon
3b667bacd5
Apple's C runtime has the non-const iconv(), too.
2011-08-22 14:25:11 -04:00
Ryan C. Gordon
1f5750981e
Fixed compiler warning on 64-bit builds.
2011-08-22 13:41:35 -04:00
Ryan C. Gordon
747072f8a3
RLE: Don't trash alpha channel in copy_32().
...
It was being set to (mask|value) instead of (value).
Thanks to li zhuo for the bug report!
2011-08-22 13:34:58 -04:00
Ryan C. Gordon
08f49bd2d3
Apparently glXSwapIntervalEXT() _does_ return a value.
...
Revision 6 of the GLX_EXT_swap_control spec has a typo; the function
signature they list is void, but the docs talk about a return value, and the
glxext.h headers list "int".
2011-08-22 02:26:11 -04:00
Ryan C. Gordon
f9268ec876
Fix SDL_GL_ACCELERATED_VISUAL on Windows in the 1.3 branch.
...
Fixes Bugzilla #1254 .
Thanks to Thilo Schulz for the patch!
2011-08-21 12:24:27 -04:00
Ryan C. Gordon
98babc2004
Ported ALSA minimum-sample-count fix from 1.2 branch to 1.3.
2011-08-21 11:52:21 -04:00
Ryan C. Gordon
40480fb3c4
Make sure XAudio2 is supported by the DirectX headers at compile time.
...
--HG--
extra : rebase_source : a461903e0d9d4334a29cb0c9848a36f268d8f0e6
2011-08-21 02:35:13 -04:00
Kees Bakker
afc8e3d312
Convert a few TABs into spaces
2011-08-18 22:43:37 +02:00
Nathan Heisey
d7bd0b0425
Fixed some problems with switching to/from fullscreen
2011-08-17 13:31:18 +00:00
Ryan C. Gordon
531efe97f1
Patched to compile.
2011-08-15 02:51:13 -04:00
Sam Lantinga
3cc0d7d6e4
Don't lose the icon surface if it's freed immediately after SDL_WM_SetIcon()
...
This is a memory leak, but we don't have a good place to free the icon surface a the moment.
2011-08-14 21:57:50 -04:00
Nathan Heisey
23e3df144f
Reduced SEGFAULT occurence on resize?
2011-08-12 16:58:54 +00:00
Nathan Heisey
eb58f97bd3
Fixed OpenGL library loading functions
2011-08-09 16:34:25 +00:00