Commit graph

3838 commits

Author SHA1 Message Date
Sam Lantinga
5c9e54ea34 Added the ability to get the UIKit window through the SDL API.
You can also do this through the native API:
	UIWindow *window = [[UIApplication sharedApplication] keyWindow];

Also needed to name the union for events and window info.
2011-01-20 16:05:59 -08:00
Ryan C. Gordon
aed4e90c9a Disable .hgeol for now...it doesn't work well at the moment.
--HG--
rename : .hgeol => .DISABLED-hgeol
2011-01-20 11:51:23 -05:00
Ryan C. Gordon
e17ec2763f Added .hgeol to handle file EOL conversion.
Don't forget to add "eol =" to the "[extensions]" section of your .hgrc!
2011-01-20 11:23:15 -05:00
Sam Lantinga
62dddd624d Fixed bug #1026
Vittorio Giovara      2010-07-16 19:09:28 PDT

i was reading SDL_renderer_gles and i noticed that every time we there
is some gl call the gl state is modified with a couple of
glEnableClientState()/glDisableClientState.
While this is completely fine for desktops systems, this is a major
performace kill on mobile devices, right where opengles is
implemented.
Normal practice in this case is to update the glstate once, keep it
always the same and disable/enable other states only in very special
occasions.

On the web there's plenty of documentation (on the top of my head
http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Performance/Performance.html#//apple_ref/doc/uid/TP40008793-CH105-SW5
) and i personally tried this.
I modified my code and got a 10 fps boost, then modified SDL_render_gles and
shifted from 40 fps to 50 fps alone -- considering that i started from ~30fps i
got an 80% performance increase with this technique.

I have attached a dif of my changes, hope that it will be included in
mainstream.
2011-01-19 23:56:16 -08:00
Sam Lantinga
92b3d10a29 Fixed bug #1028
pelya      2010-07-21 04:54:41 PDT

GLES_UpdateTexture() ignores pitch value, because of that some textures created
with SDL_CreateTextureFromSurface() are drawn incorrectly, especially if image
width is not multiplier of 2.
2011-01-19 23:47:50 -08:00
Sam Lantinga
7a1c6519f4 Fixed bug #1027
Vittorio Giovara      2010-07-17 19:21:36 PDT

fix the double free error

in SDL_uikitview the variable 'textfield' is initialialized and set to
autorelease.
however in the dealloc method a second [release] is sent.
If the textfield has not been set to nil before (with a viewDidUnload for
example) this can lead to awful hard-to-find crashes when the SDL code
terminates.

the error message is
-[textfield release] message sent to deallocated instance 0x4e5fa90

the fix is simple, just release the object as soon as it is added to the
subview, see attached patch
2011-01-19 23:45:29 -08:00
Sam Lantinga
6642f38cf1 SDL doesn't depend on GLU, and overwhelming feedback from the mailing list is that people don't want it included in SDL_opengl.h 2011-01-19 22:55:51 -08:00
Sam Lantinga
0595ce74e3 John Wilson 2010-08-17 17:09:16 PDT
The are no event handlers for the middle mouse button, right mouse buttons, and
mouse wheel in the latest HG revision 4636. It has been like this for 3 months.
I made a patch for this, though I'm not sure if the Xbutton or mouse wheel code
is "correct" by your standards.
2011-01-19 22:39:02 -08:00
Sam Lantinga
c4d74517e7 PS3 Linux is no more... 2011-01-19 22:25:40 -08:00
Sam Lantinga
008911fd8a Nobody has stepped up to maintain an svgalib driver. Bye bye! :) 2011-01-19 22:21:31 -08:00
Sam Lantinga
75ed99ed6a Clearing the API changes for the 1.3.0 release 2011-01-19 22:20:44 -08:00
Sam Lantinga
90a214c4e9 Nobody has stepped up to maintain a framebuffer console driver. Bye bye! :) 2011-01-19 22:18:45 -08:00
Sam Lantinga
c14d8951f3 Removed debug print statements 2011-01-19 19:51:04 -08:00
Sam Lantinga
e34085307a Florian Forster to sdl
in SDL 1.3 (revision 5508 from SVN), the method used to calculate the
bits per pixel from a “int format” differ between “SDL_ListModes” (which
always uses the “SDL_BITSPERPIXEL” macro) and “SDL_PixelFormatEnumTo-
Masks” (which uses either “SDL_BITSPERPIXEL” or “SDL_BYTESPERPIXEL * 8”,
depending on the value of “SDL_BYTESPERPIXEL”).

Because the values are later compared in “SDL_ListModes” this may lead
to some valid video modes not being returned. In my case the only mode
returned by “SDL_GetNumDisplayModes” was dismissed and NULL was
returned. (This led to the calling application sticking its head in the
sand.)

The attached patch copies the method used within “SDL_PixelFormatEnumTo-
Masks” to “SDL_ListModes”. This solved the problem for me though I don't
fully understand the method used by “SDL_PixelFormatEnumToMasks”.
2011-01-19 16:06:47 -08:00
Sam Lantinga
1e7f74dc1b Window move events have the same problem as size events on Windows 2011-01-19 16:02:15 -08:00
Sam Lantinga
f69bce6999 Fixed using the native iconv library 2011-01-19 15:28:01 -08:00
Sam Lantinga
7c85ff217e Fixed test for libiconv 2011-01-19 15:02:11 -08:00
Sam Lantinga
de8bd33888 Use the debug C runtime for the debug configuration 2011-01-19 13:50:53 -08:00
Sam Lantinga
e18725689b Normalized line endings 2011-01-19 13:44:55 -08:00
Sam Lantinga
7f8a24afe8 Raw input is no longer used. Yay! 2011-01-19 13:44:44 -08:00
Sam Lantinga
a7486944ea The clipboard API was missing from the 2010 project 2011-01-19 13:44:21 -08:00
Sam Lantinga
546a3a8d30 Added post build step to copy SDL and data files into the test projects 2011-01-19 13:07:25 -08:00
Sam Lantinga
10d46c3beb Added testshape to the Debug configuration 2011-01-19 13:07:06 -08:00
Sam Lantinga
e73252548b Added post build step to copy SDL and data files into the test projects 2011-01-19 11:35:54 -08:00
Sam Lantinga
2c7a66fb27 Removed extra space 2011-01-19 11:35:31 -08:00
Sam Lantinga
1507fa272f Added XFlush() so changes happen immediately instead of waiting for the next event loop. 2011-01-19 10:14:11 -08:00
Sam Lantinga
7c00f79cb1 Greg Jandl to SDL
I *think* the patch below works correctly: sdl-config gets the -march
flag and SDL builds fine. Perhaps there's a better way to get the
-march flag into both CFLAGS and SDL_FLAGS w/o dragging along more
cruft, but adding it to BASE_CFLAGS seemed the best bet to my eyes.
2011-01-19 00:07:43 -08:00
Sam Lantinga
b3dd448c5c Greg Jandl to SDL
I did some digging, and I think I've found a better solution. By
including some additional .m4 macros in the acinclude directory
(http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html,
http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html and
http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html)
then using the patch below (same as previous patch + one line change
to configure.in), SDL will build correctly out of the box.

The arch can then be overridden by --with-gcc-arch=<arch> (most will
probably want to build with i686 there for general distribution) or
--without-gcc-arch, to disable setting the arch all together.

On my Atom netbook, I get -march=PentiumPro by default, which works
great, as does --with-gcc-arch=i686.
2011-01-18 22:40:45 -08:00
Sam Lantinga
5601ecaeae Whoops, good catch from Greg Jandl 2011-01-18 22:10:37 -08:00
Sam Lantinga
67334dadbb Fixed building with the latest iOS SDK (4.2) 2011-01-18 17:23:44 -08:00
Sam Lantinga
dd33ce32e7 Fixed building with the latest iOS SDK (4.2) 2011-01-18 16:55:03 -08:00
Sam Lantinga
5467b02793 Fixed missing source files in static library target
Fixed building SDL test programs
2011-01-18 16:47:14 -08:00
Sam Lantinga
06aed12790 Not all MinGW compilers have intrin.h, so we'll only use this with Visual Studio.
That's actually okay, since gcc has the builtin atomic intrinsics. :)
2011-01-18 15:07:53 -08:00
Sam Lantinga
c4fe663b76 Fixed building with the latest iOS SDK (4.2) 2011-01-18 15:02:59 -08:00
Sam Lantinga
7083935583 Fixed building with the latest iOS SDK (4.2) 2011-01-18 15:00:56 -08:00
Sam Lantinga
c53fea3bcc Fixed build against 10.4 SDK 2011-01-18 14:57:39 -08:00
Sam Lantinga
d16468c1cb Fixed compiler error with the latest Xcode package 2011-01-18 14:26:30 -08:00
Sam Lantinga
e8d5bc7c67 Updated the snapshot script for Mercurial 2011-01-18 14:21:10 -08:00
Sam Lantinga
42a3df6fd3 Michael gave permission to use his test code 2011-01-18 10:57:28 -08:00
Sam Lantinga
0928bae0cd SDL_atomic.h is safe to include in the main header now. 2011-01-17 14:08:00 -08:00
Sam Lantinga
b04eaeedc5 Fixed compiler warnings using Windows intrinsics 2011-01-17 14:07:15 -08:00
Sam Lantinga
cdb1bda300 Use compiler intrinsics on Windows 2011-01-17 14:05:43 -08:00
Sam Lantinga
6654cd07b3 Fixed compiler error 2011-01-17 14:05:14 -08:00
Sam Lantinga
f82346f528 Fixed compiler errors 2011-01-17 13:54:13 -08:00
Sam Lantinga
2216518b9a Use compiler intrinsics, where available 2011-01-17 13:53:31 -08:00
Sam Lantinga
68afae139d Use the portable intrinsic 2011-01-17 13:52:40 -08:00
Sam Lantinga
2bd8b29550 Added testatomic test project 2011-01-17 13:42:24 -08:00
Sam Lantinga
24cfae7d89 Minor documentation consistency cleanup 2011-01-17 09:09:15 -08:00
Sam Lantinga
ce2e619ac9 Fixed compiler warning 2011-01-16 17:48:04 -08:00
Sam Lantinga
264e590e65 Fixed compiler warning about symbol redefinition 2011-01-16 17:47:52 -08:00