Commit graph

5595 commits

Author SHA1 Message Date
Sam Lantinga
e09b99c523 We're using the alpha component of the palette entries, let's name it appropriately. 2013-03-24 09:56:45 -07:00
Sam Lantinga
8f9ae94235 The palette unused value is treated as alpha and updated when setting the colorkey.
This fixes issues loading palettized images that have a colorkey with the same RGB values as another entry in the palette (e.g. bug 1746)
2013-03-24 09:51:01 -07:00
Sam Lantinga
890d7ee576 Updated the license listed in the header, fixing bug 1768 2013-03-23 13:03:36 -07:00
Sam Lantinga
404d8c5429 Make SDL support the X11 clipboard TARGETS protocol, which advertises what formats text is available in from the application. This is necessary for many Linux programs to interact well with the clipboard. 2013-03-22 11:42:31 -07:00
Sam Lantinga
3f660cc9ad Removed old file from the Android build 2013-03-19 23:24:24 -07:00
Sam Lantinga
6dddee5200 Added missing files for the Android build 2013-03-19 23:07:49 -07:00
Sam Lantinga
3c610adc98 Fixed bug 1700 - Joysticks not supported in Android 2013-03-19 23:03:57 -07:00
Sam Lantinga
282adb772b Fixed bug 1759 - Updates to testjoystick.c
ny00

A minor patch is attached, with the following few changes to testjoystick.c:
- Unused constant definitions have been removed.
- Output for all analog axes is drawn, even when there is an odd number of axes. (I have a controller with 5 analog axes.)
- Buttons are now drawn on two rows, so there's room for more. In fact, it has been used for testing a proposed joystick patch for Android, where large button ID numbers have been involved (20 and up). For more details see http://bugzilla.libsdl.org/show_bug.cgi?id=1700.
- A few adaptations have been done for the Android platform, assuming joystick support is ever applied to it. One of them is that the very first joystick (in the enumeration of all joysticks) is opened for testing, if there is any.
- It is now possible to quit from the calibration by pressing on a mouse button, tapping on a touchscreen or pressing/tapping on the "Back" button of an Android device. Technically, a press on a key identified by key code SDLK_AC_BACK results in that.
2013-03-19 22:25:02 -07:00
Sam Lantinga
e13a74ec9a Fixed bug 1760 - Update README.android about local.properties
ny00

At the moment, the README.android file mentions this as one step in building an app:

"
5. Edit <project>/local.properties to point to the Android SDK directory
"

However, the local.properties file has recently been removed from the repository, so an update is desired. For instance:

"
5. Create <project>/local.properties and use that to point to the Android SDK directory, by writing a line with the following form:
sdk.dir=/Users/slouken/android-sdk-macosx
2013-03-19 22:15:07 -07:00
Sam Lantinga
db141a68e8 Fixed bug 1764 - Integer Precision Loss During Compilation
Phil Sampson

/Library/Frameworks/SDL2.framework/Headers/SDL_stdinc.h:345:28: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
2013-03-19 22:02:34 -07:00
Sam Lantinga
fecccf1718 Fixed bug 1763 - Constify SDL_UpdateWindowSurfaceRects()
Ryan C. Gordon

With this function...
   SDL_UpdateWindowSurfaceRects(SDL_Window * window, SDL_Rect * rects, int numrects);
...is there any reason rects isn't "const SDL_Rect *" ?
2013-03-19 21:53:33 -07:00
Sam Lantinga
63b082da83 Removed unused window size constants 2013-03-17 09:47:25 -07:00
Sam Lantinga
e64abd6e47 The platform define for the PSP is __PSP__ 2013-03-17 09:45:40 -07:00
Sam Lantinga
3afbe992d5 Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
Sam Lantinga
72befa7332 We have a new platform, yay! 2013-03-17 09:21:08 -07:00
Captain Lex
47dac69dc7 Add PSP support 2013-03-17 20:07:02 +08:00
Sam Lantinga
f227d45db9 Fixed more const issues with C++ 2013-03-16 11:00:04 -07:00
Sam Lantinga
6509d6080b Fixed XIM crash when locale is set to something not supported by X11. 2013-03-15 11:59:16 -07:00
Sam Lantinga
77815e31db Fixed const correctness issue with C++, and fixed building SDL_memcpy4 with 32-bit gcc. 2013-03-15 11:56:28 -07:00
Sam Lantinga
6ea7a3490d Clarified inline function documentation, removed obsolete Metrowerks compiler directive. 2013-03-14 23:10:51 -07:00
Ryan C. Gordon
a26645f7b1 Replace all the "static __inline__" functions with SDL_FORCE_INLINE. 2013-03-15 01:09:19 -04:00
Ryan C. Gordon
7e934f8f75 Improvements to stdlib.
All SDL_* functions are always available as real symbols, so you can always
link against them as a stable ABI. By default, however, all the things that
might have dithered down to macros in your application are now force-inlined,
to give you the same effect as before and theoretically better performance,
but still solve the classic macro problems.

Elsewhere, we provide real functions for these things that simply wrap the
inline functions, in case one needs to have a real function available.

Also: this exposed bugs: SDL_abs() does something different if you had the
macro vs the libc function, SDL_memcpy() returns a void* in the function
but not the macro, etc.
2013-03-15 01:01:20 -04:00
Ryan C. Gordon
e79e3b2343 Added an SDL_FORCE_INLINE macro. 2013-03-15 01:02:30 -04:00
Sam Lantinga
124288fdb9 XDnD implementation from Davey Taylor, need some cleanup 2013-03-13 21:41:43 -07:00
Andreas Schiffler
d1c430023f Reformat SDL_VS2010.sln so WindowsExplorer VS type detection works again 2013-03-13 09:14:45 -07:00
Andreas Schiffler
42a673ce23 Fix bug 122 - SDL_RWops bug fixes: set RWops.type field, add input validation, add test coverage 2013-03-13 08:35:03 -07:00
Jørgen P. Tjernø
ae480eecfd Missing comma in one gamepad mapping. 2013-03-12 18:28:40 -07:00
Jørgen P. Tjernø
fc436807a8 Add GameController mappings for popular controllers.
This adds mappings for:
  - Another type of wired X360 controller
  - A wireless X360 controller
  - Logitech F710 (XInput and DInput modes)
  - Logitech F310 (XInput mode)
  - Logitech Cordless RumblePad 2
2013-03-12 18:28:36 -07:00
Andreas Schiffler
6a2bff0cd1 Fix bug 1560 - SDL_RWFromConstMem write operation returns -1 but should return 0. 2013-03-12 09:10:37 -07:00
Sam Lantinga
f25403ba28 Fixed bug 1751 - Direcftb renderer viewport behaviour differs from API description.
tomaszewski.p

According to API description:
SDL_RenderSetViewport - Use this function to set the drawing area for rendering on the current target.

DirectFB renderer in DirectFB_UpdateViewport function just sets clip on surface, instead of moving drawing area.

Attached patch uses set clip rectangle to move {x,y} coordinates during draw and blit operations to be compatible with API description.
2013-03-10 21:10:10 -07:00
Andreas Schiffler
5bffed4b32 Fix bug 1574 - updaterev.sh fails when path contains spaces 2013-03-10 16:28:20 -07:00
Ryan C. Gordon
8181152c53 Patched to compile on Visual Studio. 2013-03-10 13:36:20 -04:00
Ryan C. Gordon
f34606e325 Fixed compiler warning. 2013-03-10 13:31:55 -04:00
Ryan C. Gordon
2e19fefe52 Attempt to get XInput haptics building on Cygwin (or rather, avoid building). 2013-03-10 13:28:39 -04:00
Ryan C. Gordon
3d572bdf89 First shot at Windows XInput haptics.
--HG--
extra : rebase_source : 52e691a0917d173e891e67714a135373daea0ef5
2013-03-10 13:05:47 -04:00
Sam Lantinga
203b9839d2 Fixed bug 1750 - Directfb renderer does not support SDL_RENDERER_TARGETTEXTURE
tomaszewski.p

DirectFB renderer does not support SDL_RENDERER_TARGETTEXTURE what makes it incompatible with GL or GLES(2) renderers.

Attached patched:
- adds support for SDL_RENDERER_TARGETTEXTURE,
- DirectFB RenderCopy converts destination rectangle from floats to ints,
- fixes whitespaces to be the same in whole file.
2013-03-10 09:09:31 -07:00
Sam Lantinga
2422c520ac Fixed bug 1749 - SDL_GL_CreateContext() causes fatal X11 protocol errors that should just be caught instead
Lee Salzman

When using SDL_GL_CreateContext() to create a >= 3.0 version or core/forward-compatible context, internally glXCreateContextAttribsARB is used. Mesa in particular seems to be having trouble with this call and returning all sorts of errors, so it is dangerous to poll for the highest GL version by using calls to SDL_GL_CreateContext unless you are sure, a priori, that the call will suceed, defeating the point of its use.

X11 protocol errors are of the following form, with varying details depending on user, but the cause is always SDL_GL_CreateContext as above...

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  34 ()
  Serial number of failed request:  215
  Current serial number in output stream:  221

These sorts of errors can be temporarily filtered out by setting an X11 error handler to catch and ignore them, which is safe with respect to SDL_GL_CreateContext behavior because this function is allowed to return NULL to indicate failure.

A patch is attached to do this temporary filtering/catching of errors generated by trying to use glXCreateContextAttribs and friends...
2013-03-10 09:07:23 -07:00
Sam Lantinga
1bb2a06fc7 Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files.
Philipp Wiesemann

SDL's README files seem to contain multiple errors and mistakes. I attached a patch with changes and updates.

README:
 * removed Windows CE because no more supported

README-SDL.txt:
 * corrected spelling mistake

README.DirectFB:
 * corrected spelling mistakes

README.MacOSX:
 * corrected spelling mistakes

README.Platforms:
 * changed Android version to match AndroidManifest.xml

README.Porting:
 * added missing directories from list
 * removed cdrom directories from list

README.android:
 * updated required NDK revision
 * add project.properties to list
 * changed lower limit for to android-10 and removed upper
 * added a statement why older devices not supported
 * added correct dates to statements about OpenGL ES
 * added info about Google's device numbers and date
 * corrected spelling mistakes

README.gesture:
 * corrected spelling mistakes

README.pandora:
 * corrected spelling mistake

README.touch:
 * changed that values are no in range 0..1
 * updated the names of some functions
 * updated the notes about usage
 * corrected spelling mistakes
 * added info that API changed near original author contact
2013-03-10 09:03:38 -07:00
Sam Lantinga
7ce1b4475f Fixed bug 1744 - DirectFB video and renderer API is not updated
tomaszewski.p

Recent changes in SDL_sysrenderer.h and SDL_sysvideo.h had no impact on directfb backend.

Attached patch:
- updates interface,
- resolves uninitialized variable reading,
- changes logging tio use SDL_Log API,
- updates configure to use DIRECTFBCONFIG variable instead direct call to directfb-config.
2013-03-09 10:35:12 -08:00
Andreas Schiffler
c51712467d Fix SDL_TryLockMutex compile error when FAKE_RECURSIVE_MUTEX is defined 2013-03-09 09:24:43 -08:00
Andreas Schiffler
edbf26b139 Add parameter checking to SetWindowSize functions; add tests to video suite 2013-03-08 23:33:07 -08:00
Andreas Schiffler
5916b2bc1e Fix Bug 1533 - SDL_Keycode value range allows segfaults with negative values; add test coverage to keyboard suite 2013-03-08 23:04:53 -08:00
Sam Lantinga
f41de44a36 Updated SDL_HINT_GAMECONTROLLERCONFIG documentation to reflect that it only takes effect before init. 2013-03-08 16:27:05 -08:00
Ryan C. Gordon
bd9fdb8099 Changed SDL_INIT_EVERYTHING to only request currently-known subsystems. 2013-03-08 11:38:08 -05:00
Sam Lantinga
7f2340dc6a Don't re-read the hints when opening the game controller. Instead use SDL_GameControllerAddMapping() to add hints after initialization. 2013-03-08 10:09:51 -08:00
Gabriel Jacobo
3f118b42fe README.android updates regarding the use of dirty rectangles rendering technique 2013-03-08 11:30:25 -03:00
Sam Lantinga
1494812f7c Put the real SDL_AtomicCAS() and SDL_AtomicCASPtr() symbols into the library. 2013-03-07 20:42:55 -08:00
Sam Lantinga
c6388c87c1 Changed the name of SDL_mutexP() SDL_mutexV() 2013-03-07 20:12:40 -08:00
Sam Lantinga
0707530b35 Load the game controller mapping hint when opening a game controller. 2013-03-07 15:37:08 -08:00
Sam Lantinga
1dec4dd800 Fixed read after free bug in the game controller. 2013-03-07 15:17:06 -08:00