Commit Graph

4780 Commits

Author SHA1 Message Date
Sam Lantinga
41ea58b0ef Added the ability to update a subrect of a YV12/IYUV texture. 2011-12-30 18:19:35 -05:00
Sam Lantinga
e60d18d093 Fixed bug 1315 - Greenish video when video size smaller than texture
The incoming pixels are contiguous for the update rectangle.
2011-12-30 18:18:42 -05:00
Sam Lantinga
a816157cb4 Initialize timers first so the tick counter is valid by the time the audio and video systems initialize. 2011-12-30 06:41:41 -05:00
Sam Lantinga
53e2399003 Fixed documentation typo 2011-12-29 13:54:22 -05:00
Sam Lantinga
2696dd4032 Fixed so the header is consistent with the source 2011-12-29 13:51:42 -05:00
Sam Lantinga
2da6fd7637 Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction
t.grundner@goto3d.de 2011-09-01 03:59:17 PDT
I figured out what is going on. GCC 4.5.2 assumes the stack is 16 byte aligned
by default. Therefore there are no AND alignment corrections necessary if we
wish to align a stack variable to a 16 byte boundary. That is bad if your OS
ABI is not 16 byte aligned. Windows 32 bit stacks are 4 byte aligned. This
results in the above mentioned SIGSEGV. This is also no problem if I compile
both SDL.dll and my app with MingW because MinGW/GCC inserts a

        andl    $-16, %esp

instruction right in the beginning of the main function. So at least the stack
of the thread calling the main function is 16 byte aligned. But as soon as I
start to use the SDL.dll from an application not compiled by MinGW there is no
ANDL safing my app.

However there is a GCC option that can change the default stack alignment:

        -mpreferred-stack-boundary=num

Setting num=2 assumes a the stack is aligned to a 4 byte boundary. This results
in GCC inserting the necessary

        andl    $-16, %esp

into SDL_FillRect. Rebuilding SDL with

       ./configure "CFLAGS=-mpreferred-stack-boundary=2 -g -O3"

solved the problem.

IMHO this should also be a problem on Solaris.

The following links contain further information:

http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

http://www.agner.org/optimize/calling_conventions.pdf
2011-12-29 05:36:39 -05:00
Sam Lantinga
6b53a98d93 Fixed bug 1338 - Direct3D renderer should set D3DCREATE_FPU_PRESERVE for not behaving vastly different on doubles (causes 3rd party lib crashes!)
Jonas Thiem 2011-11-29 12:28:02 PST
Direct3D renderer should set D3DCREATE_FPU_PRESERVE for not behaving vastly
different to OpenGL/software rendering on doubles and break some libraries
really badly.

Most notable affected example: Lua, which does the most unpredictable things
which are really almost impossible to debug/find out for beginners who never
heard this culprit exists.

Since I believe all renderers should behave the same on that doubles simply
work as expected in a program, this should really be changed! (also this wasted
a few days of my life wondering why everything in my program was so broken)
2011-12-29 05:18:16 -05:00
Sam Lantinga
4ec39d8333 Fixed bug 1336 - Added a timestamp on all SDL events
Gueniffey 2011-11-23 04:11:31 PST

The attached simple patch adds a timestamp to all SDL events. It is useful to
dismiss old events and add UI responsiveness (my application does some
extensive tasks that creates a delay in the event queue handling. With this
patch, I can deal only with the most recent events.
2011-12-29 05:13:55 -05:00
Sam Lantinga
604270e214 Fixed bug 1335 - Added support for different pixel formats in OpenGL ES 2 renderer
Gueniffey 2011-11-23 04:06:31 PST

The attached patch adds native support for
SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888
2011-12-29 05:11:33 -05:00
Ryan C. Gordon
cd497f307b Don't call -[NSView setAcceptsTouchEvents] if the OS doesn't provide it.
Thanks to Dimiter 'malkia' Stanev for the fix!
2011-12-09 02:32:21 -05:00
Sam Lantinga
65ab33c90e Ryan gets fewer nuts. :) 2011-12-07 20:34:43 -05:00
Ryan C. Gordon
9aba292cfc Added SDL_dropevents to the Xcode project files.
Fixes build.
2011-12-06 21:46:19 -05:00
Ryan C. Gordon
cc1616c646 More work to clean up compiler warnings. 2011-12-05 16:45:32 -05:00
Ryan C. Gordon
c3659093f8 Patched to compile. 2011-12-05 13:17:57 -05:00
Ryan C. Gordon
542fffc1f8 Fixed a tabstop. 2011-12-05 13:13:32 -05:00
Ryan C. Gordon
abe9021987 Backed out most of changeset 4b88086910d3, at Andreas's request. 2011-12-05 12:43:50 -05:00
Andreas Schiffler
5e0fdc8f9e Fix buildbot sdl-macosx-unix-x86 and sdl-macosx-amd64 compiler warnings 2011-12-05 07:41:20 -08:00
Andreas Schiffler
7d44cb1995 Updated VS2010 project files 2011-12-04 21:45:34 -08:00
Sam Lantinga
b697ed5818 It works better if you compile it. 2011-11-29 02:28:34 -05:00
Sam Lantinga
0d371acf8e Better fix, iterate backwards over the array so we don't care whether the close code shuffles things down. 2011-11-29 02:27:34 -05:00
Sam Lantinga
1dc86eeece Closing the joystick removes it from the list. 2011-11-29 02:15:39 -05:00
Sam Lantinga
c7f0996903 Invalid assert. It's perfectly legit to initialize the joystick subsystem and get no joysticks. 2011-11-29 02:12:24 -05:00
Sam Lantinga
7345e9d2f6 Yes, let's save 32-bit BMP files, very useful for you know, making a game... 2011-11-29 02:11:39 -05:00
Ryan C. Gordon
1668c3dd20 Another iOS 3.1 compatibility fix.
Thanks to Vittorio Giovara for the patch!
2011-11-27 23:30:02 -05:00
Sam Lantinga
9a81a7fa24 No man pages for SDL 1.3 2011-11-23 13:25:45 -05:00
Sam Lantinga
79494aee9d First pass at a simple drag and drop API, allowing you to accept files dropped into your application. 2011-11-20 19:38:18 -05:00
Ryan C. Gordon
162e2c3270 Make +sharedAppDelegate return a generic object instead of a SDLUIKitDelegate.
This way subclasses can use it without a lot of casting.

Thanks to Vittorio Giovara for the patch!
2011-11-19 19:23:33 -05:00
Ryan C. Gordon
eb19bd06d2 Check for selectors UIScreen responds to, not the base system version.
Thanks to Vittorio Giovara for the patch!
2011-11-19 19:18:20 -05:00
Ryan C. Gordon
464d3855ca Fix iOS build when SDL_POWER_UIKIT isn't defined.
Thanks to Vittorio Giovara for the patch!
2011-11-19 19:13:55 -05:00
Sam Lantinga
359b89cc7e Fixed the aux directory to be the one recognized by automake.
This isn't strictly needed by SDL, but it's a good example for other projects.
2011-11-17 00:43:44 -05:00
Sam Lantinga
b76ca8acf5 Fixed where we set the content scale - it's used by the renderbufferStorage:GL_RENDERBUFFER_OES call. 2011-11-17 00:41:07 -05:00
Ryan C. Gordon
052948dc6e Patched to compile on newer FreeBSD releases.
Thanks to Marcus von Appen for the patch!
2011-11-16 05:13:40 -05:00
Sam Lantinga
2ddecd140d Fixed issues with the touch coordinates in landscape mode.
In landscape mode the frame stays the same, and the transform property is modified with the appropriate rotation.
The touch coordinates are rotated by the transform, so if I want to normalize them by the frame rect, I have to transform the frame rect first.
2011-11-15 01:38:27 -05:00
Sam Lantinga
fb26595d0d Fixed whitespace 2011-11-10 06:38:26 -05:00
Sam Lantinga
1a10b41f28 Work in progress fixing support for rotated video modes 2011-11-10 03:48:59 -05:00
Sam Lantinga
a59d3e6f2f Fixed issues closing lines with the OpenGL ES renderer. 2011-11-10 00:22:44 -05:00
Sam Lantinga
1bb72d783a Fixed an offset issue with glDrawTexiOES() when the viewport is set. 2011-11-10 00:22:01 -05:00
Sam Lantinga
5fedcb50d8 GIMP wrote bmp files in RGBX format. Huh. 2011-11-09 22:53:44 -05:00
Sam Lantinga
fe31953a46 Fixed creating a fullscreen window on iOS 2011-11-09 02:35:49 -05:00
Ryan C. Gordon
b7ab18db4c Fixed compiler warnings for uninitialized variables. 2011-11-09 00:27:44 -05:00
Ryan C. Gordon
57427cf80f Fixed uninitialized variable. 2011-11-08 19:45:41 -05:00
Ryan C. Gordon
83f9d9b276 Merge from https://bitbucket.org/keestux/sdl ... SDL_gesture code cleanup. 2011-11-08 16:24:02 -05:00
Sam Lantinga
858f6f21de To answer the FIXME, no, we shouldn't force this. The fullscreen flag implies borderless behavior even though the flag isn't set on the window (in case fullscreen is toggled) 2011-11-08 00:17:41 -05:00
Sam Lantinga
5cee776161 The iOS driver sets the fullscreen and shown flags on the window during creation, so we need the mode code to be aware of that, since none of the other fullscreen/shown code paths get run.
FIXME: Maybe we need a better way of detecting that?
2011-11-08 00:03:54 -05:00
Sam Lantinga
aaf891d9c8 Fixed a typo, we should set the driverdata if we are 3.2 or newer. 2011-11-08 00:02:47 -05:00
Sam Lantinga
e30ec4d8ce Fixed list loop caused when there are two entries in the list and the one being returned is already at the head. 2011-11-07 23:10:49 -05:00
Sam Lantinga
4305c920da Fixed SDL applications being killed immediately after being backgrounded, because they were trying to draw while minimized. 2011-11-07 23:07:00 -05:00
Sam Lantinga
c932d63cdb Need to send a key up, silly. 2011-11-07 02:24:52 -05:00
Sam Lantinga
76714d4f99 Fixed a typo in the header. 2011-11-07 02:25:01 -05:00
Sam Lantinga
6a5a074397 Fixed double-free in the shader cache at shutdown 2011-11-07 00:45:13 -05:00