Commit Graph

860 Commits

Author SHA1 Message Date
Sam Lantinga
5426a79715 attached is a patch to support DirectFB in include/SDL_syswm.h. It
defines SDL_SYSWM_DIRECTFB as a subsystem.
This allows developers to e.g. access DirectFB's video and picture
providers.

Kind regards,

André
2010-09-27 00:50:46 -07:00
Sam Lantinga
84cee89a18 Fixed documentation typo 2010-09-25 17:06:41 -07:00
Sam Lantinga
864edec6b4 Fixed grammar, thanks to Sheena's suggestion. 2010-09-18 17:12:19 -07:00
Sam Lantinga
823c38786d Fixed documentation 2010-09-14 21:57:29 -07:00
Sam Lantinga
f5f5c845ae Documentation consistency 2010-08-29 22:34:50 -07:00
Sam Lantinga
c9ac1fe3e5 Documentation consistency 2010-08-29 22:28:38 -07:00
Sam Lantinga
4913c48bba Fixed typo in header 2010-08-29 22:22:27 -07:00
Sam Lantinga
a14a177d5f Documentation clarification 2010-08-29 22:12:59 -07:00
Sam Lantinga
e7789ad75b Suspending the screensaver defaults off. 2010-08-29 21:41:11 -07:00
Sam Lantinga
256b2c3990 Compiling in atan()/atan2() implementation on Visual Studio 2008. 2010-08-29 16:55:58 -07:00
Sam Lantinga
7a7d43524f Added atan implementation from uClibc 2010-08-29 16:51:48 -07:00
Sam Lantinga
317cd0515f Added atan2 implementation from uClibc 2010-08-29 16:05:34 -07:00
Sam Lantinga
b66ae96de5 Documentation clarification 2010-08-29 15:26:12 -07:00
Sam Lantinga
39db467ca6 While you can actually write to the error buffer, conceptually it's read-only. 2010-08-29 12:00:09 -07:00
Sam Lantinga
f0480c0501 Added a typedef for the thread function to simplify documentation 2010-08-28 22:56:52 -07:00
Sam Lantinga
3c0f319cce Fixed documentation typo 2010-08-22 17:19:10 -07:00
Sam Lantinga
993db1a6aa Fixed obsolete documentation 2010-08-22 15:34:28 -07:00
Sam Lantinga
b7c5d88e6a Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows 2010-08-22 13:45:56 -07:00
Sam Lantinga
d4d88abae0 Merged Daniel's Google Summer of Code work from SDL-gsoc2010_IME 2010-08-22 12:39:27 -07:00
Sam Lantinga
4df9989dd4 Removed spurious carriage returns 2010-08-22 12:34:31 -07:00
Sam Lantinga
ac80a80f6a Merged Paul's Google Summer of Code work from SDL-gsoc2010_android 2010-08-22 12:23:55 -07:00
Sam Lantinga
7f6ad8e572 Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Jim Grandpre
e9d12a479a Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture 2010-08-15 00:36:28 -04:00
egottlieb
1dac65bd3a Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now! 2010-08-14 16:14:36 -04:00
Sam Lantinga
0f67a475f9 Fixed documentation error 2010-08-14 12:28:43 -07:00
Sam Lantinga
8ed311fcbf Updated with the latest version of glext.h 2010-08-14 12:22:06 -07:00
Eli Gottlieb
12b0fa8c5e Fixed a bug in X11 shaping that refused to use color-key mode. 2010-08-10 16:10:26 -04:00
Jim Grandpre
db352f3b39 Fixed gestureMulti. Disabled dollar gesture temporarily. 2010-08-04 23:17:30 -04:00
egottlieb
63f5546ab0 Implemented shaped windows for Cocoa. Still need to see if they actually work. 2010-08-03 21:56:05 -04:00
dewyatt
a83ba70ce5 Added SDL_wcslcpy and SDL_wcslcat. 2010-08-03 16:52:10 -04:00
egottlieb
4a74542b6e Got basic, pre-actually-writing-anything Cocoa to build. 2010-08-03 00:47:33 -04:00
Eli Gottlieb
122c35caa0 Why wasn't this in the repository? 2010-08-02 23:58:22 -04:00
Sam Lantinga
0b1069a725 Fixed various type and print format issues 2010-07-31 20:38:37 -07:00
jimtla
05c264c774 Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working). 2010-07-31 20:02:54 +04:00
jimtla
214939549f Upgraded touchId/fingerId to long. Changed position variables to floats. 2010-07-30 23:18:35 +04:00
Sam Lantinga
b8b0d2faaa Documentation updates 2010-07-29 20:24:05 -07:00
Sam Lantinga
617542daf6 Merged Sunny's XRender changes from SDL-gsoc2010_xrender 2010-07-28 00:54:23 -07:00
Paul Hunkin
eb38d6aa71 - Cleaned up a bunch of code
- Added 'feature' enable/disable so we're not running accel/sound/whatever in Java when we don't need to be
- More work on the sound system. But it still crashes pretty horribly, not sure why yet.
2010-07-27 21:21:24 +02:00
Paul Hunkin
daa451a473 Oops, I wasn't using pthreads. Fixed so we can have mutexes and stuff 2010-07-27 15:23:09 +02:00
Paul Hunkin
10203b606f Updated test app to init the sound system 2010-07-27 11:35:06 +02:00
Eli Gottlieb
5416c894f4 Added color-key mode and redid the code to work with it. 2010-07-22 23:11:01 -04:00
Sunny Sachanandani
2fcfc81241 Advertise support for all supported texture formats. 2010-07-22 10:53:41 +05:30
Sam Lantinga
741880b4dc Added support for keyboard repeat (only tested on Windows so far) 2010-07-20 23:25:24 -07:00
Sunny Sachanandani
51b997ebad Integrate XFixes and XDamage into the build system. 2010-07-19 20:05:53 +05:30
Eli Gottlieb
f35e180363 Added #define's for error codes returned from SDL shaped-window API. 2010-07-18 22:24:52 -04:00
Sam Lantinga
d6cb212829 RedHat patch: SDL-1.2.14-byteorder.patch 2010-07-18 11:23:34 -07:00
dewyatt
ea01e5af61 Merge with main repo (mainly for non-printable character fix) 2010-07-18 13:48:23 -04:00
Sam Lantinga
ac279884c4 Fixed typo in the documentation 2010-07-17 22:59:28 -07:00
Jim Grandpre
d18ef30119 Bug fixes, now using RWops instead of File pointers. 2010-07-16 20:48:43 -04:00
Jim Grandpre
4b707013d1 Added alternative finger tracking method. Still prefer IPHONE_TOUCH_EFFICIENT_DANGEROUS. 2010-07-13 18:31:09 -04:00
dewyatt
d3a558d55e Added SDL_utf8strlcpy to copy at UTF-8 character boundaries.
Changed SDL_SendKeyboardText and SDL_SendEditingText to use SDL_utf8strlcpy.
2010-07-13 15:05:45 -04:00
Ryan C. Gordon
bf17cebd40 Add XShape test to configure scripts. 2010-07-13 02:43:10 -04:00
Sam Lantinga
6f2000e6d2 Merged changes from the main SDL codebase 2010-07-12 21:09:23 -07:00
dewyatt
5155fd21d2 Changed Start/StopTextInput back to not take any parameters.
We call SDL_GetKeyboardFocus internally now.
2010-07-12 14:17:43 -04:00
Sam Lantinga
b07db7e9c3 Implemented X11 system window manager info for SDL 1.3. It's simple. Really. 2010-07-12 01:20:57 -07:00
Sam Lantinga
6540320beb Fixed compile warnings 2010-07-12 00:35:14 -07:00
Jim Grandpre
9e7603a6ba Added some files I had previosuly missed 2010-07-11 01:15:39 -04:00
dewyatt
42439abb5e Changed StopTextInput to take an SDL_Window parameter. 2010-07-10 13:15:47 -04:00
Jim Grandpre
bdbb130028 Moved $1 Gestures into the SDL Library 2010-07-09 00:50:40 -07:00
Sam Lantinga
ddf0465549 Added an event when the clipboard is updated, triggered after the window gains the keyboard focus. 2010-07-08 22:54:03 -07:00
Sam Lantinga
e4fe1bb40f Simplified clipboard API for sanity's sake.
A complete clipboard implementation would support multiple formats that could be queried at runtime, events for when the clipboard contents changed, support for HTML, images, etc.  We're not going that crazy, at least for now. :)
2010-07-07 23:54:03 -07:00
Sam Lantinga
2612b4c651 Whoops, updated the copyright date 2010-07-07 23:26:07 -07:00
Sam Lantinga
261b8d8865 First pass at clipboard API, still very much in progress 2010-07-07 23:24:04 -07:00
dewyatt
e24912e909 Changed StartTextInput to take an SDL_Window parameter. 2010-07-08 01:35:47 -04:00
Sam Lantinga
a517ddf4a5 Added SDL_FOURCC() 2010-07-07 21:36:09 -07:00
Sam Lantinga
e983e5bb65 Updated iPhone keyboard code (which builds and runs on the iPad and iPhone simulator now)
Updated iPhone demos (which build and run again)
2010-07-07 18:58:51 -07:00
Jim Grandpre
9d8bd2bcf5 Moved Multi finger gesture recognition into the library. 2010-07-07 04:13:08 -07:00
Eli Gottlieb
02cc7bc991 Updated test code, updated win32 code a bit (still not complete, but hopefully tonight), and removed the last vestiges of ellipse and polygon drawing support. 2010-07-06 22:05:22 -04:00
Eli Gottlieb
749298e6c2 Finished X11 shaped-window functionality and removed ellipse+polygon rendering. 2010-06-30 16:19:44 -04:00
Sam Lantinga
672bd0bbc6 Typo in documentation 2010-06-27 23:17:36 -07:00
Eli Gottlieb
756b99c69f Added Andreas's fixes to the header and stub file for SDL_shape. 2010-06-21 23:08:10 -04:00
Eli Gottlieb
c20899a378 Replaced the model of treating a window's shape as a render target with treating a window's shape as a surface passed into an SDL_SetWindowShape() function. I'll send this off to Andreas and Sam and start coding. 2010-06-19 23:10:57 -04:00
Jim Grandpre
4e7b6a96a5 Fixed bugs in input, cleaned up $1 2010-06-18 01:43:02 -04:00
Sam Lantinga
d89ec9302c Hello Sam.
I did fix/update the SDL 1.3 pandora port today ( 11 june 2010 ) and you can find the "hg diff" attached :)

David Carré ( Cpasjuste )
2010-06-17 22:23:20 -07:00
Eli Gottlieb
390be0affb Doxygen commenting is all finished up. 2010-06-10 17:50:38 -04:00
Eli Gottlieb
847ce12a33 Stubbed out the new get/set parameter functions, added the start of the enum, union, and struct for those parameters themselves, and added doxygen comments throughout the SDL_shape.h header. 2010-06-10 17:37:19 -04:00
Paul Hunkin
61ddab05c6 Added (partially implemented) android video backend and associated files needed to build 2010-06-10 18:54:23 +12:00
Sam Lantinga
3a228f30bf Fixed wording for consistency 2010-06-06 21:09:45 -07:00
Eli Gottlieb
2ace9d0f8c Removed and added back SDL_shape.{c,h} wholesale. Will this get them tracked properly? 2010-06-05 15:07:14 -04:00
Eli Gottlieb
9f0bc591c6 Updated SDL_shape.h by adding a line break... somehow it's not being tracked correctly.` 2010-06-05 15:01:40 -04:00
jimtla
ea0c984c8e Addition of VC project for touchTest.c 2010-06-05 01:58:56 -04:00
Eli Gottlieb
0566e957f7 Fixed up new functions and files so that they build as part of SDL. 2010-06-03 17:21:40 -04:00
Eli Gottlieb
b24db2415a Stubbed out the new drawing, filling, and geometry functions for ellipses and polygons. 2010-06-03 16:21:04 -04:00
Eli Gottlieb
46c89257a5 Added management and drawing functions for ellipses and polygons. 2010-06-03 14:43:38 -04:00
Jim Grandpre
60450688f9 Added include/touch.h Now reading in resolution of touch pad. 2010-06-01 02:54:33 -04:00
Sunny Sachanandani
bc6683eed7 Modified configure.in to allow building with Xrender. Fixed all problems that prevented compilation.
Builds fine now :)
2010-05-31 13:27:27 +05:30
Jim Grandpre
80ecbb9011 Added pressure support for touch events. 2010-05-29 02:09:16 -04:00
Jim Grandpre
a1401afe42 Added reading of event* for touch events. 2010-05-28 01:26:52 -04:00
Eli Gottlieb
fee0949a87 Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build. 2010-05-27 16:44:35 -04:00
Jim Grandpre
4a3ed7b859 Added touch event definitions. Heavily modified events/SDL_touch*. 2010-05-27 01:21:37 -04:00
Sam Lantinga
b8da79e726 SDL_KillThread() is no longer supported - it was always dangerous! :) 2010-05-24 22:56:36 -07:00
Eli Gottlieb
46a886a498 Changed API for shaped windows to make it much, much simpler. A shaped window's shape mask is now accessed as a render target, which means we can get at it with blit and draw functions, as well as (most likely) OpenGL. 2010-05-25 00:23:41 -04:00
Eli Gottlieb
89f8f1be75 I'm actually going to have to alter this proposed API a fair bit, but it's coming along. I want to keep it as orthogonal to the rest of SDL as possible. 2010-05-23 01:27:09 -04:00
Paul Hunkin
99ccaa6680 Added some android build stuff 2010-05-23 15:18:16 +12:00
Paul Hunkin
6b8d32ccde Fix compile errors under Android toolchain. Seems to have the same issue as the NDS. 2010-05-23 15:10:18 +12:00
Paul Hunkin
3ca3ae0c70 Fixed comment style 2010-05-23 15:08:30 +12:00
Eli Gottlieb
1e5d71184b Moved SDL_shape.h, and building out the API as needed by SDL_Eyes. 2010-05-21 17:28:12 -04:00
Sunny Sachanandani
7551aa6dd9 Adding a few #defines for Xrender support. 2010-05-19 18:58:28 +05:30
Paul Hunkin
205e65f689 Initial commit, adding __ANDROID__ to the platform list 2010-05-17 15:14:34 +12:00
Sam Lantinga
4b1c945432 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
2010-05-09 20:47:22 -07:00
Sam Lantinga
98918d160e Updated with the SDL 1.3 list of supported operating systems 2010-05-09 09:53:57 -07:00
Ryan C. Gordon
8524311b24 Implemented SDL power APIs for iPhoneOS. 2010-04-30 00:39:31 -04:00
Sam Lantinga
23267677ee esigra 2010-04-17 03:53:57 PDT
If this header file is supposed to be includable from C++ code, the code should
of course use one of the SDL_*_cast macros from SDL_stdinc.h.
2010-04-23 02:15:05 -07:00
Sam Lantinga
6c556c1780 Minor cleanup on Jiang's patch 2010-04-15 22:27:01 -07:00
Sam Lantinga
b87ae3913b changeset: 4433:25667ea797fa
tag: tip
user: Jiang Jiang <gzjjgod@gmail.com>
date: Thu Apr 15 12:01:46 2010 +0800
summary: Add windowID to text editing event
2010-04-15 22:14:26 -07:00
Sam Lantinga
b740fb4389 Fixed bug 944
Tatu Kilappa      2010-02-11 12:13:20 PST

When compiling with -Wconversion, gcc complains about a cast in SDL_endian.h
that might change the result as we are casting from an int into an Uint16. This
is of course not visible unless we are on a non-x86 platform where the
assembler is not available.

While it's not really an error, the warning is really annoying. To fix, change
SDL_endian.h line 87 to:

  return(Uint16)((x<<8)|(x>>8));

Thank you.
2010-04-13 22:01:14 -07:00
Sam Lantinga
b0847f3de2 General improvements for user custom event registration
* Switched event type to enum (int32)
* Switched polling by mask to polling by type range
* Added SDL_RegisterEvents() to allow dynamic user event registration
* Spread events out to allow inserting new related events without breaking binary compatibility
* Added padding to event structures so they're the same size regardless of 32-bit compiler structure packing settings
* Split SDL_HasEvent() to SDL_HasEvent() for a single event and SDL_HasEvents() for a range of events
* Added SDL_GetEventState() as a shortcut for SDL_EventState(X, SDL_QUERY)
* Added SDL_FlushEvent() and SDL_FlushEvents() to clear events from the event queue
2010-03-25 01:08:26 -07:00
Sam Lantinga
c863037677 Fixed bug #961
Kalle Olavi Niemitalo      2010-02-28 09:15:50 PST

It seems the SDLK_LMETA and SDLK_RMETA constants have been removed from SDL
1.3.  I grepped for them in the SDL source tree and these were the only hits:

./include/SDL_compat.h:230:#define SDLK_LSUPER SDLK_LMETA
./include/SDL_compat.h:231:#define SDLK_RSUPER SDLK_RMETA
./src/video/bwindow/SDL_BWin.h:194:        keymap[0x66] = SDLK_LMETA;
./src/video/bwindow/SDL_BWin.h:195:        keymap[0x67] = SDLK_RMETA;

I don't know how compatible SDL 1.3 is supposed to be with applications
designed for SDL 1.2.  However, as you can see, SDL itself is still trying to
use the removed constants, and that is clearly a bug.

Because SDL_compat.h defines KMOD_LMETA as KMOD_LGUI, I suppose it should also
define SDLK_LMETA as SDLK_LGUI, and SDLK_RMETA likewise.
2010-03-09 06:07:48 +00:00
Sam Lantinga
d2520173cd Removed reference to compatibility function 2010-03-05 15:43:46 +00:00
Ryan C. Gordon
0b60050ea1 Changed revision details to be a string (an hg changeset) instead of an int. 2010-02-28 02:07:40 -05:00
Sam Lantinga
fae1ae3788 Removed reference to compatibility function 2010-02-26 04:50:38 +00:00
Sam Lantinga
77c0f695f9 Fixed typo in the comment 2010-02-26 03:34:10 +00:00
Sam Lantinga
7052036491 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010
2010-01-24 21:10:53 +00:00
Sam Lantinga
102fd54847 Fixed bug #935
Patrice Mandin

Hello,

I originally added pth support for threads in SDL 1.2 because on the Atari
platform we did not have any thread library.

I think pth support could be removed from SDL 1.3 for two reasons:

- Atari platform removed

- pth does not provides real (preemptive) threads, because it is user space,
and expect the application to call one of its function to give CPU to another
thread. So it is not exactly useful for applications, that expect threads to
run simultaneously.
2010-01-24 20:47:20 +00:00
Sam Lantinga
8de28c8753 Documentation consistency 2010-01-22 06:50:17 +00:00
Sam Lantinga
e0a31b4dbb Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance. 2010-01-21 06:21:52 +00:00
Sam Lantinga
e2618f14d2 Fixed bug #930
The PS2 video driver is obsolete and not going to be updated unless someone wants to maintain it.
2010-01-18 14:27:30 +00:00
Sam Lantinga
4416d51d59 Fixed compiler warning 2010-01-18 14:16:47 +00:00
Ryan C. Gordon
62b6ab68d0 Clean up assertion API for public use. 2010-01-13 19:29:33 +00:00
Ryan C. Gordon
adbfb16246 Friendly warning comment. 2010-01-13 16:21:26 +00:00
Ryan C. Gordon
e7c41b8a1b Whitespace tweak. 2010-01-13 16:10:25 +00:00
Ryan C. Gordon
e6b26beb4e Fixed comment. 2010-01-13 16:09:27 +00:00
Sam Lantinga
056bd9865b Moved SDL_FUNCTION out so it's always available, and added SDL_FILE and SDL_LINE 2010-01-13 08:25:16 +00:00
Sam Lantinga
8b4a9fce45 Allow configure to override assertion settings, but by default this comes from the build optimization level. 2010-01-13 08:06:32 +00:00
Sam Lantinga
0db463843f Automatically figure out the appropriate assertion level 2010-01-13 07:52:53 +00:00
Sam Lantinga
8e978babaa Fixed release level assertions 2010-01-13 07:36:00 +00:00
Sam Lantinga
2936f4a45d Check for signal.h before using it, don't assume unix is available or required 2010-01-13 07:32:25 +00:00
Sam Lantinga
a112207d03 The config sets the default assertion level so people can override it for their own use in application code. 2010-01-13 07:25:28 +00:00
Sam Lantinga
5f76c6b2d5 First pass at Ryan's assertion code, minor tweaks to come. 2010-01-13 06:47:17 +00:00
Ryan C. Gordon
0a3afaa588 Merged r5194:5195 from branches/SDL-1.2: coldfire cpu arch support. 2010-01-10 08:21:19 +00:00
Sam Lantinga
53023c5ff5 The OS/2 support has been removed, so we don't need this now. 2010-01-07 04:38:58 +00:00
Ryan C. Gordon
1fad5ac7c1 Merged r4717:4718 from branches/SDL-1.2: minor OS/2 DECLSPEC/SDLCALL fixes.
I reworked this a little. The 1.2 branch isn't really very elegant about this.
2010-01-06 20:58:03 +00:00
Ryan C. Gordon
d3e020766d Merged r4412:4413 from branches/SDL-1.2: rwops documentation fix. 2010-01-06 07:39:35 +00:00
Sam Lantinga
25ddd3c390 Removed in the interest of actually finishing 1.3. :)
They can be done later, either by me or by someone else.
2009-12-30 19:10:41 +00:00
Sam Lantinga
c3629ff44a Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine().
Added API for rectangle drawing (as opposed to filling)
Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay.
Optimized software line drawing quite a bit.
Added support for Wu's anti-aliased line drawing, currently disabled by default.
2009-12-23 01:55:00 +00:00
Sam Lantinga
786e01f737 In the process of adding rectangle drawing 2009-12-18 07:03:09 +00:00
Sam Lantinga
4a157f0629 Added support for querying the number of CPUs available on Linux. This also happens to work on Mac OS X. 2009-12-17 03:04:04 +00:00
Ryan C. Gordon
61382a9f93 Initial band-aids on SDL_GetMouseState() API breakage. More work to come.
Fixes Bugzilla #758.
2009-12-16 19:50:51 +00:00
Ryan C. Gordon
f644ae86a9 Implemented SDL_setenv(), moved SDL_putenv() to compat.
Fixes Bugzilla #779.
2009-12-16 10:59:51 +00:00
Sam Lantinga
dc1ed9e7ef Added SDL_GetCPUCount() to see how many cores are available. 2009-12-16 06:53:53 +00:00
Sam Lantinga
75e75ae0c3 Fixed bug #741
The thread ID is an unsigned long so it can hold pthread_t so people can do naughty things with it.

I'm going to be adding additional useful thread API functions, but this should prevent crashes in people's existing code on 64-bit architectures.
2009-12-16 04:48:11 +00:00
Sam Lantinga
6484431a44 Fixed bug #685
Added missing keysym shortcuts
2009-12-16 01:06:48 +00:00
Sam Lantinga
fbcae020cf Fixed bug #642
Gerry JJ      2008-11-09 02:11:49 PST

The SDL_MouseMotionEvent struct has a field named "tilt" (currently marked "for
future use"), for tablet stylus tilt information.  However, one value is not
enough for this, as tilt is two-dimensional.  Reserving only one field for
future use is no good when you're going to need two, so there should be two
fields, tilt_x and tilt_y.
2009-12-16 00:44:53 +00:00
Sam Lantinga
a4cb5a9a72 Fixed bug #815
Daniele Forghieri      2009-10-12 02:57:03 PDT

Patch to use stdlib.h with Open Watcom

Open Watcom 1.8 has <stdlib.h> so instead of patch the single part when stdlib
features are used we use directly the include file as with GCC.
2009-12-15 20:14:50 +00:00
Ryan C. Gordon
59ea17f263 Added a warning comment to SDL_putenv().
"Fixes" Bugzilla #779.
2009-12-15 18:00:16 +00:00
Sam Lantinga
df50338fda Add a dummy function if SDL doesn't have STDIO support 2009-12-15 05:34:58 +00:00
Sam Lantinga
2ac49a53bd The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code. 2009-12-14 23:29:37 +00:00
Sam Lantinga
9bf59c5687 The SDL_PaletteWatch structure is really internal-only. 2009-12-13 08:00:25 +00:00
Sam Lantinga
ed8e1e54ad Name the audio callback for documentation clarity. 2009-12-13 06:21:22 +00:00
Sam Lantinga
4f4f40f930 Minor documentation fix 2009-12-12 20:30:25 +00:00
Sam Lantinga
dd8238d718 Switch to mixed case for consistency with other enumerations 2009-12-10 08:28:26 +00:00
Sam Lantinga
70a40d51b2 Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
    SDL_BlendPoints()
    SDL_BlendLines()
    SDL_DrawLines()
    SDL_FillRects()
    SDL_BlendRects()
    SDL_RenderPoints()
    SDL_RenderLines()
    SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()
2009-12-09 15:56:56 +00:00
Sam Lantinga
586f3e0dda Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows
2009-12-06 08:03:38 +00:00
Sam Lantinga
a90e5b78ce Made the window flag comments more consistent 2009-12-05 05:13:17 +00:00
Sam Lantinga
428aa51c43 Added related functions 2009-12-05 04:39:59 +00:00
Sam Lantinga
8adb9fc3cc Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height.  It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.
2009-12-01 05:57:15 +00:00
Sam Lantinga
1636b263b6 Joe 2009-11-23 21:31:10 PST
If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
367     *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN
uses
368     *  the first three \c dir parameters.  The cardinal directions would
be:
369     *   - North:  0,-1, 0
370     *   - East:  -1, 0, 0
371     *   - South:  0, 1, 0
372     *   - West:   1, 0, 0

typedef struct SDL_HapticDirection
{
    Uint8 type;         /**< The type of encoding. */
    Uint16 dir[3];      /**< The encoded direction. */
} SDL_HapticDirection;

An unsigned int can't store negative values and I don't see an alternate way to
encode them in the docs or source. The best I have been able to come up with is
using a negative magnitude for the effect but this will only get me 2 of the 4
quadrants in the plane for 2d effects. I looked at the win32 and linux
implementations and I believe is is safe to use signed ints in the direction
struct. I am unfamiliar with the darwin haptics API so I don't know if it is
safe.
2009-11-27 19:29:27 +00:00
Sam Lantinga
eb0a552878 SDL_CreateWindowFrom() is actually going to be supported. :) 2009-11-25 07:42:23 +00:00
Sam Lantinga
3d2358c109 Clarified the windowID parameter 2009-11-25 06:24:15 +00:00
Sam Lantinga
9943aa0b1b Eric Wing to Sam, hfutrell
This one is quite puzzling. I found a partial workaround, but I don't fully understand the reasons yet.

First, the console is complaining about not finding a nib for MainWindow.
I tried removing the entry for this in the info.plist, and the message went away, but it didn't really change anything.

Second, I stepped through this with the debugger and broke up some lines. It seems that the basic act of calling
       view = [SDL_uikitopenglview alloc];

or even
       view = [SDL_uikitview alloc]

will crash the program. The debugger messages plus the stack trace make me think it's not finding the SDL_uikitview classes for some reason. But I don't understand why this would be.

view = [UIView alloc] will not crash the program.

For kicks, I added a new definition of a class called SDL_object which subclasses NSObject in the same files as SDL_uikitopenglview and then call
       view = [SDL_object alloc];

This does not crash the program.

So, then I modified SDL_object to subclass UIView. No crash.

Next, I made SDL_object subclass UIView<UITextFieldDelegate> . This crashes.

So it is the act of conforming to the UITextFieldDelegate protocol that is crashing things.

I don't understand why it would crash on alloc though. I'm guessing either a delegate needs to be set somewhere or one of the required methods needs to be implemented. But in the former case, I would not expect a crash, but a silent message to nil and something else doesn't work. And in the latter case, I would expect a compiler warning and an exception thrown instead of a crash.

Anyway, my temporary workaround is to change the interface declaration for SDL_uikitview to look like:

#if SDL_IPHONE_KEYBOARD
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
#else
@interface SDL_uikitview : UIView {
#endif

And then disable the keyboard support in the SDL_config_iphoneos.h file.
/* enable iPhone keyboard support */
#define SDL_IPHONE_KEYBOARD 0


-Eric

On Nov 23, 2009, at 1:43 AM, Sam Lantinga wrote:

> I ran into a blocking startup crash with the Happy demo on iPhone OS 3.1.2 on my new iPhone:
>
> #0    0x323fea14 in _class_isInitialized
> #1    0x323fea68 in _class_initialize
> #2    0x32403e92 in prepareForMethodLookup
> #3    0x32401244 in lookUpMethod
> #4    0x323fea10 in _class_lookupMethodAndLoadCache
> #5    0x323fe746 in objc_msgSend_uncached
> #6    0x323feb26 in _class_initialize
> #7    0x323fea58 in _class_initialize
> #8    0x32403e92 in prepareForMethodLookup
> #9    0x32401244 in lookUpMethod
> #10   0x323fea10 in _class_lookupMethodAndLoadCache
> #11   0x323fe746 in objc_msgSend_uncached
> #12   0x000554dc in UIKit_GL_CreateContext at SDL_uikitopengles.m:103
> #13   0x0004f89e in SDL_GL_CreateContext at SDL_video.c:3155
> #14   0x000579e8 in GLES_CreateRenderer at SDL_renderer_gles.c:282
> #15   0x0004d7b8 in SDL_CreateRenderer at SDL_video.c:1509
> #16   0x00002bc2 in SDL_main at happy.c:156
> #17   0x000571b2 in -[SDLUIKitDelegate postFinishLaunch] at
> SDL_uikitappdelegate.m:77
> #18   0x313f9ef2 in __NSFireDelayedPerform
> #19   0x32567bb2 in CFRunLoopRunSpecific
> #20   0x3256735c in CFRunLoopRunInMode
> #21   0x32912cbe in GSEventRunModal
> #22   0x32912d6a in GSEventRun
> #23   0x32b6276e in -[UIApplication _run]
> #24   0x32b61472 in UIApplicationMain
> #25   0x00057088 in main at SDL_uikitappdelegate.m:50
>
> Any ideas?
>
> See ya!
> --
>       -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
2009-11-24 08:12:32 +00:00
Sam Lantinga
2634a34422 Made the comment actually mean something. :) 2009-11-22 20:00:00 +00:00
Sam Lantinga
cd1a4a74e5 Scott to slouken
Heres the wiz patch and additional files. (I think I got everything)
2009-11-17 04:53:15 +00:00
Sam Lantinga
7a40c23469 You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :)
2009-11-16 07:13:07 +00:00
Sam Lantinga
c12a32c64b Added a utility function to convert blocks of pixels 2009-11-15 09:21:46 +00:00
Sam Lantinga
b66aacd5f4 Fixed gcc warning 2009-11-09 15:12:31 +00:00
Sam Lantinga
3ab0a5fe79 Fixed bug #878
Jack Jansen      2009-11-05 14:20:22 PST

I'm building "fat" SDL 1.3 libraries for MacOSX, but now I am running into the
issue that audio does not work on PowerPC macintoshes if you build the library
on an Intel.

The problem is that configure hard-codes the byteorder, which is then stored in
SDL_config.h
2009-11-09 04:13:51 +00:00
Sam Lantinga
27294b7a4e Partial fix for bug #859
Header file update from Ken for improved doxygen output
2009-10-19 13:31:58 +00:00
Sam Lantinga
890a3b9f25 Merged improvements to SDL_SoftStretch() from SDL 1.2 2009-10-18 17:49:40 +00:00
Sam Lantinga
0874c3ae84 iPhone interruption patch / SDL 1.3
Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.
2009-10-17 07:36:45 +00:00
Sam Lantinga
473fff5cb6 We don't need dlvsym() for ALSA anymore, yay! 2009-10-13 07:02:19 +00:00
Sam Lantinga
73b823bca8 Adapted from Debian patch: 215_kfreebsd_gnu.diff 2009-10-10 09:36:12 +00:00
Sam Lantinga
d772434d29 Made typedef for SDL_bool the same as the other typedefs.
If this causes problems on any compiler, please report a bug to
http://bugzilla.libsdl.org/
and include the platform and version of compiler you're using.
2009-10-10 09:22:20 +00:00
Sam Lantinga
4148ddc4be Eric Wing to Sam
Also noticed the SDL.h header in 1.3 didn't have the /** for the methods while testing. Attached is a quick fix patch.
2009-10-06 03:34:10 +00:00
Sam Lantinga
9313a4ad5f Fixed bug #826
Ken Bull      2009-10-04 09:51:30 PDT

2009/10/4 E. Wing <ewmailing@gmail.com>:
> Hi Kenneth,
> I noticed that SDL_SetColorKey and SDL_GetColorKey start with
> /*
> instead of
> /**
> in SDL_Surface.h in SDL 1.3.
>
> I haven't scrutinized the headers and I don't know if you had an
> automated process to add these, but I thought I would let you know in
> case there might be others that have the same problem.
>
> Thanks,
> Eric
>

The attached patch corrects this and other documentation errors in
SDL_surface.h
2009-10-04 19:14:30 +00:00
Sam Lantinga
bd908a682f Fixed bug #777
Implemented SDL_GetPlatform()
2009-09-26 10:32:14 +00:00
Sam Lantinga
c3a7520d8d Whoops, need both the header and the library! 2009-09-21 11:31:28 +00:00
Sam Lantinga
9d68c389ed Fixed bug #714
fuzzyTew@gmail.com      2009-03-14 15:18:45 PDT

patch to change HAVE_ICONV to HAVE_ICONV_H

There are two separate iconv checks in configure -- one for the header file and
one for the library.  include/SDL_stdinc.h uses the library define to see
whether or not it should reference the types defined in the header, which
naturally breaks if the library exists and the header does not.
2009-09-21 11:04:01 +00:00
Sam Lantinga
a1ee906546 Fixed bug #615
Scott McCreary      2008-08-21 10:48:14 PDT

This patch adds support for Haiku.
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/libsdl/SDL-1.2.13-haiku.diff
Haiku is an open-source recreation of BeOS.  It has better POSIX compliance
than beOS did, and other improved features, which in some cases causes us to
have to "undo" previous BeOS workarounds.
Here's our port log entry for it, showing the steps to force the changes into
configure and Makefile:
http://ports.haiku-files.org/wiki/media-libs/libsdl/1.2.13/1
Note that this was only tried on 1.2.13 stable so far.
Haiku is using a newer config.guess / config.sub that doesn't yet seem to be in
the released libtool, so we are having to copy it in for now.
http://haiku-files.org/files/optional-packages/
2009-09-21 09:21:00 +00:00
Sam Lantinga
4f9b38f7c8 Oh yeah, we have GLX support too. 2009-09-21 09:02:05 +00:00
Sam Lantinga
8a966799e8 Fixed bug #577
Pierre Phaneuf      2008-05-01 10:29:16 PDT

SDL_VIDEO_DRIVER_X11 is not defined in SDL_config_macosx.h

There's a number of SDL_VIDEO_DRIVER_xxx defined in SDL_config_macosx.h, but
not that one, even though it is actually present.
2009-09-21 08:40:04 +00:00
Sam Lantinga
2d97efbd4d Removed outdated Atari support 2009-09-20 04:15:19 +00:00
Sam Lantinga
95c8f7a517 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009 2009-09-19 13:29:40 +00:00
Sam Lantinga
78130bd9c4 Removed outdated VGL support 2009-09-19 07:30:29 +00:00
Sam Lantinga
17fbad0010 Removed outdated wscons support 2009-09-19 07:28:59 +00:00
Sam Lantinga
cf54df8c3e Removed outdated Nano-X support 2009-09-19 07:26:51 +00:00
Sam Lantinga
fe586cb3f9 Removed outdated OS/2 support 2009-09-19 07:22:07 +00:00
Sam Lantinga
6bb854b1d4 Removed outdated Dreamcast support 2009-09-19 07:21:22 +00:00
Sam Lantinga
5bee043a89 Removed outdated OS/2 support 2009-09-19 06:43:45 +00:00
Sam Lantinga
e4cbb96720 Removed outdated iPodLinux support 2009-09-19 06:24:07 +00:00
Bob Pendleton
9861510378 The new, cleaner, version of the atomic operations. The dummy code is what you should start working with to port atomic ops.
The linux code appears to be complete and *should* be the base of all Unix and GCC based versions. The macosx and win32 versions
are currently just copies of the dummy code. I will begin working on the windows version as soon as this check in is done. I
need someone to work on the Mac OS X version.

I'm afraid that this check in will break QNX (Sorry!)
2009-09-17 20:35:12 +00:00
Sam Lantinga
36d2461292 Merged Martin's code changes from Google Summer of Code 2009 2009-09-07 04:51:29 +00:00
Sam Lantinga
b856e71f8d Fixed issues building 64-bit Windows binary 2009-09-05 23:37:35 +00:00
Sam Lantinga
2a96e84434 CD-ROM support is so passé :) 2009-09-05 09:11:03 +00:00
Sam Lantinga
33472500be Bye bye SoundManager, you are officially obsolete... 2009-09-05 09:03:35 +00:00
Sam Lantinga
2105c37ec0 Fixed a few issues compiling with Mac OS X 10.6
Unfortunately the audio and cdrom systems do not build at all, and if you
disable those, SDL still fails to link with these errors:

Undefined symbols:
  "_OBJC_IVAR_$_NSScreen._frame", referenced from:
      -[NSScreen(NSScreenAccess) setFrame:] in SDL_cocoamodes.o
  "_KLGetKeyboardLayoutProperty", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
      _UpdateKeymap in SDL_cocoakeyboard.o
  "_KLGetCurrentKeyboardLayout", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
ld: symbol(s) not found
2009-09-05 07:33:54 +00:00
Sam Lantinga
be4f43bbd1 Updated glext.h 2009-09-05 07:13:01 +00:00
Bob Pendleton
7e05ef1526 Start of redesign, getting rid of 8 and 16 bit operations in .h and test files. 2009-08-11 21:27:19 +00:00
Sam Lantinga
0449f9f82c Fixed bug #746
Fixed freeze when trying to memset with 0 length
2009-08-07 10:20:10 +00:00
Sam Lantinga
7195141c35 Clarified API documentation 2009-08-02 18:39:57 +00:00
Sam Lantinga
24775fd01d Better check which includes #define used in stdint.h 2009-08-02 12:54:59 +00:00
Sam Lantinga
85a708db37 Don't redefine types if HAVE_STDINT_H is defined 2009-08-02 12:45:20 +00:00
Bob Pendleton
a71b57e1f0 volitile... duh, yeah the variable need to be labeled volitile 2009-07-09 21:31:27 +00:00
Sam Lantinga
11bb913576 Documentation fix fix 2009-07-07 14:02:57 +00:00
Bob Pendleton
e40496bf79 Documentation fix. 2009-07-06 21:48:52 +00:00
Bob Pendleton
db14860f8a Another documentation fix, Thanks to Mason Wheeler for finding these. 2009-07-02 16:53:56 +00:00
Bob Pendleton
2efcc6f4eb Documentation fix. 2009-07-02 16:15:55 +00:00
Bob Pendleton
ffadc2b7ab Corrected documentation error for SDL_RenderFill. 2009-06-30 22:19:10 +00:00
Bob Pendleton
e53cd95852 I've made so many changes I don't dare continue until I check the current stuff in.
/test/testatomic.c performs absolutely basic tests to show that the function work as expected. Need a second test to do more detailed tests.

/include/SDL_atomic.h provides declarations for all included functions.

/src/atomic/linux/SDL_atomic.c provided all the functions. On a generic built the 64 bit functions work, but they are emulated. On a build for -march=pentium and above the 64 bit functions use native instructions
/src/atomic/dummy/SDL_atomic.c emulates all the operations using SDL_mutex.h.
/src/atomic/win32/SDL_atomic.c is a copy of dummy
/src/atomic/macosx/SDL_atomic.s is a copy of dummy

These versions of SDL_atomic.c provide a frame work for building the library with a mixture of native and emulated functions. This allows the whole library to be provided on all platforms. (I hope.)
I hope this fits with the SDL philosophy of either providing a common subset or emulating when the platform is missing a feature.

I have not added dummy, macosx, or win32 to the build. They are there as place holders for future work.

I have modified congifure.in to compile sources in /src/atomic/linux. (The SDL configure.in file is an amazing piece of work and I hope I didn't mess it up. :-)
2009-06-29 19:54:43 +00:00
Bob Pendleton
0b5bc4d23b This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
It also update configure.in to compile the linux version of the library. The three versions are all dummies
implementations that do nothing. They are being checked in as place holders. Mostly, I just wanted to get
place holders and the configure.in checked in.
2009-06-24 20:04:08 +00:00
Sam Lantinga
dd18a26edd Fixed bug #750
Since many different event structures include windowID it should be placed near
the beginning of the structure (preferably right after type) so it's position
is the same between different events.

This is to avoid code like this:
if (event.type == SDL_WINDOWEVENT)
    win = event.window.windowID;
else if ((SDL_EVENTMASK(event.type) & SDL_KEYEVENTMASK) != 0)
    win = event.key.windowID;
else if (event.type == SDL_TEXTINPUT)
    win = event.text.windowID;
else if (event.type == SDL_MOUSEMOTION)
    win = event.motion.windowID;
else if ((SDL_EVENTMASK(event.type) & (SDL_MOUBUTTONDOWNMASK |
SDL_MOUBUTTONUPMASK)) != 0)
    win = event.button.windowID;
else if (event.type == SDL_MOUSEWHEEL)
    win = event.wheel.windowID;
...

in favor of:
win = event.window.windowID;
2009-06-10 14:00:21 +00:00
Sam Lantinga
702d8d5305 Added missing header file for Pandora support 2009-06-10 13:53:53 +00:00
Sam Lantinga
353438e493 indent is really bad at handling assembly 2009-06-10 13:38:19 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Bob Pendleton
b969957bcb OK, had to add some casts to get SDL_atomic.h to compile with C++. testatomic still compiles and runs. 2009-06-09 19:39:23 +00:00
Bob Pendleton
361a88d8db First commit for SDL atomic operations.
On my linux box it compiles and installs correctly and testatomic runs without errors.
2009-06-09 17:33:44 +00:00
Sam Lantinga
93690caff9 Fixed 4 bit-per-pixel definition. Thanks Mike! 2009-06-09 04:34:50 +00:00
Ryan C. Gordon
fdfe1d4f41 BeOS support for power subsystem. 2009-06-07 22:44:59 +00:00
Ryan C. Gordon
1a2c2eebd2 Initial work on power subsystem for SDL 1.3. 2009-06-07 06:06:35 +00:00
Sam Lantinga
62c7087a99 Hi,
I have prepared a set of patches to readd WindowsCE support to SDL 1.3.
I've created a new GAPI/Rawframebuffer and a DirectDraw renderer.
Both renderers are work in progress and there are several unimplemented
cases. (Notably
RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and
texture blending )
Nevertheless I am successfully using these renderers together with the
SDL software renderer. (On most devices the SDL software renderer will
be much faster as there are only badly optimized vendor drivers available)

I send these patches now in this unpolished state because there seems to
be some interest in win ce and someone has to start supporting SDL 1.3

Now on to the patches:
wince_events_window_fixes.patch
fixes some wince incompatibilities and adds fullscreen support via
SHFullScreen. NOTE: This patch shouldn't have any side effects on
Windows, but I have NOT tested it on Windows, so please double-check.
This patch doesn't dependent on the following ones.

wince_renderers_system.patch
This patch does all necessary modifications to the SDL system.
- it adds the renderers to the configure system
- it adds the renderers to win32video

SDL_ceddrawrender.c
SDL_ceddrawrender.h
SDL_gapirender_c.h
SDL_gapirender.c
SDL_gapirender.h
these files add the new render drivers and should be placed in
src/video/win32

Some notes to people who want to test this:
- I have only compiled sdl with ming32ce, so the VisualC files are not
up to date
- As mingw32ce has no ddraw.h this file must be taken from the MS SDK
and modified to work with gcc
- I had to modify line 2611 in configure.in to
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer
-Wl,--image-base -Wl,0x10000"
otherwise GetCPinfo wouldn't link. If someone knows whats causing this
I'd be happy to hear about it.

It would be great if these patches could make their way into SVN as this
would make collaboration much much easier.

I'm out of office for the next week and therefore will be unavailable
via email.

Regards
Stefan
2009-06-07 02:44:46 +00:00
Bob Pendleton
0a28ca5681 Added a #ifndef SDL_NO_COMPAT around SDL_ActiveEvent and SDL_ResizeEvent so that code
that has a #defien SDL_NO_COMPAT before the #include SDL.h with not be able to use
these obsolete events.
2009-06-05 23:36:00 +00:00
Bob Pendleton
b2f976f8de Added an ifdef so that if you
#define SDL_NO_COMPAT

before you include SDL.h then SDL_compat.h will never be included in your code.
This is useful for making sure that your code uses only SDL 1.3 features.
It is also handy for finding things that are in SDL_compat.h that belong elsewhere.
2009-06-04 21:00:45 +00:00
Mike Gorchak
bd93cb0220 Support for BGR565 pixel format has been added, mainly for OpenGL ES renderer. OpenGL ES renderer now have new texture formats. 2009-06-03 10:40:44 +00:00
Sam Lantinga
83d7309416 indent 2009-05-23 22:41:08 +00:00
Mike Gorchak
fb58f10acf Added few OpenGL ES 1.0 defines, which are not present in OpenGL ES 1.1 and 2.0. 2009-05-06 09:46:55 +00:00
Mike Gorchak
de2c54fa79 Added _OES suffix for GL_OES_vertex_buffer_object extension for OpenGL ES. 2009-05-06 07:00:32 +00:00
Mike Gorchak
665dff927c GF header must be included before Photon header for QNX. 2009-04-28 06:04:21 +00:00
Sam Lantinga
eb3fc668d0 Added SDL_GetColorKey() 2009-04-03 13:27:33 +00:00
Sam Lantinga
991689c791 Date: Sun, 22 Mar 2009 12:52:29 +0000
From: Luke Benstead
Subject: OpenGL 3.0 Context Creation

I've attached a patch which implements OpenGL 3.x context creation on
the latest SVN. I've added two options to SDL_GL_SetAttribute, these
are SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION.
These default to 2 and 1 respectively. If the major version is less
than 3 then the current context creation method is used, otherwise the
appropriate new context creation function is called (depending on the
platform).

Sample code:

    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        printf("Unable to initialize SDL: %s\n", SDL_GetError());
        return 1;
    }

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); //Without these 2 lines, SDL will create a GL 2.x context
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

    SDL_Surface* screen = SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL | SDL_FULLSCREEN );


I've implemented context creation on both Win32 and X and run basic
tests on both. This patch doesn't provide access to all the options
allowed by the new context creation (e.g. shared contexts, forward
compatible contexts) but they can be added pretty easily.
2009-03-24 10:43:53 +00:00
Sam Lantinga
3532a3491b Date: Mon, 23 Mar 2009 09:17:24 +0200
From: "Mike Gorchak"
Subject: New QNX patches

Please apply patch qnx4.diff, which is attached. What has been done:
1)Added back OpenGL ES renderer for QNX target. Added few corrections to
OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not
support textures under QNX, so I think some additional work must be done.
2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which
required by OpenGL ES 1.1 specification.
3) Added attribute clearing at the entrance of function
SDL_GL_GetAttribure(). Added error checking into the function
SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL
ES 1.0.
4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and
glColor4f() functions, but 1.0 has glColor4f() only).
5) Added error checking after obtaining attributes using
SDL_GL_GetAttribute() function to the testgl2 and testgles.
6) Small correction to testmultiaudio with printing errors.
7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF
driver.

Please remove ./src/audio/nto directory - it will not be used anymore.
Please create ./src/audio/qsa directory and add content of the archive
qsa.tar.gz into this directory. I rewrote some sound code, added support for
multiple audio cards, enumeration, etc. Added initial support for capture.

As far as I can understand SDL 1.3 is not supporting audio capture right now
? Sam, Am I right ? Or audio capture must be supported through the
PlayDevice routine ?

And last, please put file SDL_gf_opengles.c to  the ./src/video/qnxgf
directory. It is OpenGL ES 1.1 emulation layer for some functions, which are
not supported by OpenGL ES 1.0.
2009-03-24 10:33:12 +00:00
Sam Lantinga
2994e1aeef Fixed return value for SDL_CreateRenderer() 2009-03-15 15:50:18 +00:00
Sam Lantinga
4df57c1da2 Date: Wed, 4 Mar 2009 15:38:22 +0200
From: "Mike Gorchak"
Subject: Re: About QNX support in SDL 1.3

Here is another batch of patches.

1) Makefile.in - added SDL_opengles.h header as header to install.
2) configure.in - Added special define to detect Common Lite OpenGL ES
library in case if Common library is not installed. Added check for
clock_gettime in libc (in QNX it is in libc).
3) SDL_config.h.in - Added SDL_VIDEO_RENDER_OPENGL_ES and
SDL_VIDEO_OPENGL_ES declarations for configure script autodetection.
4) SDL_opengles.h - Added GL_API definition if it is not defined. Added
extension GL_OES_draw_texture because OpenGL ES Renderer uses it without
declaration. Added GL_OES_vertex_buffer_object extension, which is supported
under QNX OpenGL ES. Added GL_OES_single_precision extension.
5) To the test directory I've added building OpenGL ES test applications
through the autotools suite. Was support for iPhone IDE building only.
2009-03-04 15:10:47 +00:00
Sam Lantinga
7c23ebb7e1 Mac OS X and iPhoneOS have the full math library 2009-03-03 09:48:00 +00:00
Sam Lantinga
96c916c759 Date: Mon, 2 Mar 2009 16:27:42 +0200
From: "Mike Gorchak"
Subject: About QNX support in SDL 1.3

Right now I'm working on QNX SDL 1.3 drivers implementation and looks like a
lot of code must be completely reworked. But I'm ready for it :) Also I want
to add QNX Graphics Framework SDL driver, which is fullscreen graphics
framework, with support of hardware accelerated OpenGL ES implementations.
This Graphics Framework (called GF in QNX) could also use QNX Photon (window
manager GUI) as window manager.

In the attachment initial patch for QNX support in SDL 1.3
2009-03-03 04:21:51 +00:00
Sam Lantinga
a59d71fd7e Fixed bug #684
Reworked Pierre's patch a little bit, which added SDL_WaitEventTimeout()
2009-02-17 05:59:40 +00:00
Sam Lantinga
e6a40c7de4 Fixed bug #537
Description From  esigra   2008-01-07 16:20:21   (-) [reply]

I try to get a clean compile for a project using SDL. But I get warnings
from SDL headers when I use -Wold-style-cast. This is especially bad
because I plan to build the software with -Werror=old-style-cast when we
have switched over to GCC 4.2, which has that option.

But this problem can be fixed in the SDL headers. I checked out the SVN
version and made some patches. See the attached patch.
2009-02-17 04:57:39 +00:00
Sam Lantinga
e141340a20 Added test program for SDL_CreateWindowFrom()
Make sure OpenGL library is loaded before working with OpenGL windows,
even those created with SDL_CreateWindowFrom()
2009-02-09 05:32:12 +00:00
Sam Lantinga
c1d386b7fe Fixed alpha blending textures with the GDI renderer 2009-02-07 17:56:08 +00:00
Sam Lantinga
18767374ad Unfortunately, adding the file means that every commit marks this file as
modified, even with the svn:ignore property set.  *sigh*
2009-01-14 15:03:44 +00:00
Sam Lantinga
daab1740da Added a dummy revision to fix IDE builds 2009-01-14 15:00:22 +00:00
Sam Lantinga
765fb4319c indent 2009-01-14 04:25:32 +00:00
Sam Lantinga
1f99ca8e72 Fixed NULL pointer dereference 2009-01-13 03:53:22 +00:00
Couriersud
7fd99c7e60 Fix third party "-Wall -Werror" builds 2009-01-12 22:36:12 +00:00
Sam Lantinga
00db62df34 Fixed Visual C++ build 2009-01-12 08:46:28 +00:00
Sam Lantinga
42a8aa5af2 Reverted SDL_LoadICO_RW() addition, this should go in SDL_image 2009-01-12 06:21:34 +00:00
Sam Lantinga
276a01a55e Added an API to enable/disable the screen saver.
The screensaver is disabled by default when using SDL 1.2 compatibility.
Use the new XScreenSaver extension, removed unused DPMS extension.
2009-01-12 06:19:05 +00:00
Couriersud
1cd0eb7eba Add SDL_LoadICO_RW to SDL. Loads best quality icon from *.ico file. 2009-01-11 23:56:19 +00:00
Ryan C. Gordon
7b1b655f97 First shot at new audio resampling code. 2009-01-11 04:46:42 +00:00
Sam Lantinga
19b003367c Reverted Bob's indent checkin 2009-01-10 21:50:26 +00:00
Sam Lantinga
22938ecdfb Fixed Visual C++ release build for Visual C++ 2005
* Some math functions become intrinsic in release mode, so we need to
  convert all the math functions into SDL math functions, like we did
  with the stdlib functions.
* Constant initializers of 8-bit values become calls to memset() in
  release mode, but memset() itself is an intrinsic when explicitly
  called.  So we'll just explicitly call memset() in those cases.
2009-01-10 18:32:24 +00:00
Bob Pendleton
68ff2ab932 I ran a global "make indent" it modified the following files. 2009-01-09 20:43:30 +00:00
Sam Lantinga
ceb5e0b29f Date: Sun, 04 Jan 2009 20:53:30 +0100
From: Couriersud
Subject: SDL1.3 DirectFB patches

The attached contains the following directfb changes:

- Dynamic loading of libdirectfb.so. This may to turned off as well in configure
- Use linux-input by default. May be switched off by environment variable.
- Added some code which will use directfb's x11 backend when DISPLAY is set.
2009-01-04 23:43:33 +00:00
Sam Lantinga
2429aeeee4 Added missing void 2009-01-04 23:36:53 +00:00
Sam Lantinga
d40ff0ef82 indent 2009-01-04 17:14:27 +00:00
Sam Lantinga
933eb1f049 Make the SDL keysyms that represent unprintable ASCII values actually have
those values, for more intuitive use and better compatibility with SDL 1.2.
2009-01-04 17:10:04 +00:00
Sam Lantinga
76975e844e Make the current revision number available 2009-01-04 05:08:12 +00:00
Sam Lantinga
7f3d6deffd Implemented SDL_SetWindowIcon(), with translucent icon support under X11. 2009-01-02 17:39:48 +00:00
Sam Lantinga
7a39366cbb The _NET_WM_ICON protocol doesn't require the icon to be set before the window is shown. 2009-01-02 09:50:25 +00:00
Holmes Futrell
7375c9648c Re-enabled joystick support during compilation. 2009-01-01 23:01:05 +00:00
Sam Lantinga
f4135a38db Date: Thu, 01 Jan 2009 21:32:12 +0100
From: Couriersud
Subject: Fusionsound audio driver

attached is a diff containing a audio driver for the FusionSound
library. This sound library is closely related to DirectFB and uses the
same transport (fusion) as DirectFB when running applications "remote",
i.e. over the network. As such, it natively redirects sound where
DirectFB redirects video. This may be handy for everyone using SDL over
DirectFB.
2009-01-01 21:34:22 +00:00
Sam Lantinga
de843c65d6 Added line clipping 2008-12-23 02:23:18 +00:00
Sam Lantinga
9feaa729fd typo fix 2008-12-22 05:29:55 +00:00
Sam Lantinga
8318ef98b6 Added RenderPiont() API
Merged the drawing tests into a single test program
2008-12-21 17:39:41 +00:00
Sam Lantinga
f2c09059c1 Added stubs for software implementations of blending fills and line drawing 2008-12-20 13:14:28 +00:00
Sam Lantinga
18ce8e4eca Minor corrections 2008-12-20 12:32:38 +00:00
Sam Lantinga
94e70de686 Date: Fri, 19 Dec 2008 20:17:35 +0100
From: Couriersud
Subject: Re: Aw: Experience using SDL1.3 in sdlmame/Proposal for api additions

> For consistency you'd probably want:
> SDL_SetRenderDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
> SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode);
> SDL_RenderLine(int x1, int y1, int x2, int y2);
> SDL_RenderFill(SDL_Rect *rect);
>
> You probably also want to add API functions query the current state.
>

I have implemented the above api for the opengl, x11, directfb and
software renderers. I have also renamed *TEXTUREBLENDMODE* constants to
BLENDMODE*. The unix build compiles. The windows renderer still needs to
be updated, but I have no windows development machine at hand. Have a
look at the x11 renderer for a sample.

Vector games now run at 90% both on opengl and directfb in comparison to
sdlmame's own opengl renderer. The same applies to raster games.

The diff also includes

a) Changed XDrawRect to XFillRect in x11 renderer
b) A number of changes to fix blending and modulation issues in the
directfb renderer.
2008-12-20 12:00:00 +00:00
Sam Lantinga
893e52b5a0 Corrected case for TargetConditionals.h 2008-12-14 07:22:15 +00:00
Sam Lantinga
c5a8886195 Fixed SDL 1.2 compatibility problem.
The API specifies that SDL_OpenAudio() will fill out the 'desired' audio spec
with the correct samples and size set by the driver.  This value is important
since it may be used by applications that size audio buffers, etc.

However, we want to allow advanced applications to call SDL_OpenAudioDevice()
which gets passed a const 'desired' parameter, and have the correct data filled
into the 'obtained' parameter, possibly allowing or not allowing format changes.

So... 'obtained' becomes the audio format the user callback is expected to use,
and we add flags to allow the application to specify which format changes are
allowed.

Note: We really need to add a way to query the 'obtained' audio spec.
2008-12-13 06:36:47 +00:00
Sam Lantinga
369350caa0 Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility 2008-12-12 06:46:20 +00:00
Sam Lantinga
befb0f7f42 Updated copyright date 2008-12-08 00:27:32 +00:00
Sam Lantinga
766c1e1e93 Added very slow software scaling to the X11 renderer 2008-12-03 12:10:51 +00:00
Sam Lantinga
106af10068 Implemented the X11 (non-OpenGL) renderer, no alpha or scaling available. 2008-11-30 21:58:23 +00:00
Sam Lantinga
69c1e59e91 The SDL_RLEACCEL flag is respected in SDL_ConvertSurface(), per the docs.
Fixed saving BMP files of surfaces with an alpha channel.
2008-11-29 11:26:01 +00:00
Sam Lantinga
eb7a0d4ec7 Updated with latest glext.h 2008-11-25 08:40:52 +00:00
Sam Lantinga
825b0b08f1 Fixed Bugzilla bug #205
Removed SDL_KillThread() from the API, as it isn't safe on many platforms.
2008-11-24 00:18:42 +00:00
Sam Lantinga
c1dc5d87c3 Disabled the Haptic API on iPhone, changed the order of the header to match
the other config headers.
2008-10-16 12:22:56 +00:00
Sam Lantinga
92c3984118 Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
2008-10-04 06:46:59 +00:00
Ryan C. Gordon
5b27f96366 Some cleanups on the new XInput code.
One or two things got moved around, but largely this is hooked up correctly
 in the Unix configure system now: it can be dynamically loaded and fallback
 gracefully if not available, or libXi can be directly linked to libSDL.

XInput support can be --disable'd from the configure script, too (defaults to
 enabled).

Please note that while the framework is in place to gracefully fallback, the
 current state of the source requires XInput. We'll need to adjust a few
 things still to correct this.
2008-09-17 08:20:57 +00:00
Sam Lantinga
458f7b5b0c indent 2008-09-15 04:32:36 +00:00
Holmes Futrell
2f926dac88 Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr 2008-09-02 20:27:47 +00:00
Holmes Futrell
c6aae19257 Serves a similar purpose as SDL_opengl.h, except for OpenGLES. 2008-09-02 20:22:05 +00:00
Sam Lantinga
708f4c7ac5 indent 2008-08-31 16:03:55 +00:00
Sam Lantinga
9c4b835e49 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
2008-08-27 15:10:03 +00:00
Edgar Simo
fffbd1a1d1 Changed spaces to tabs. 2008-08-26 11:40:37 +00:00
Sam Lantinga
f74840152b Fixed compile errors for audio resampling. I'm not sure how this got missed... 2008-08-26 02:26:18 +00:00
Szymon Wilczek
92d9759a5f Removed unneccesary code lines. Fixed mousename bug. Added lacking code in mousebutton 2008-08-25 18:02:14 +00:00
Sam Lantinga
a6fa308712 Final merge of Google Summer of Code 2008 work...
Force Feedback for SDL
by Edgar Simo, mentored by Ryan C. Gordon
2008-08-25 09:55:03 +00:00
Sam Lantinga
474cfaad1e Final merge of Google Summer of Code 2008 work...
Many-mouse and tablet support
by Szymon Wilczek, mentored by Ryan C. Gordon

Everything concerning the project is noted on the wiki:
http://wilku.ravenlord.ws/doku.php?id=start
2008-08-25 06:33:00 +00:00
Sam Lantinga
a5968b9cb6 Missing keysym defines 2008-08-25 05:30:28 +00:00
Sam Lantinga
eb59b3278d Reverted Holmes' changes, they should be on the iphone branch 2008-07-05 16:15:44 +00:00
Holmes Futrell
a406dfe2a4 disabled compile time assertion ... no 64 bit primitive types available on iPhone (it appears) 2008-06-22 23:13:02 +00:00
Holmes Futrell
3995fbbd73 Added iPhone OS (__IPHONEOS__) as a platform 2008-06-22 23:12:02 +00:00
Holmes Futrell
b32793e1f9 iPhone OS uses a custom main 2008-06-22 23:10:44 +00:00
Sam Lantinga
48b1db8b30 Date: Wed, 7 May 2008 21:48:10 +0200
From: Christian Walther
Subject: SDL 1.3 Xcode projects

Here are my promised updates to the Xcode projects. They work as far
as I'm using them, but I have not tested them thoroughly, and there
may still be some cruft left. In particular, I haven't checked whether
the frameworks still work on older versions of Mac OS X (are we still
targeting 10.2?), and whether Altivec/SSE optimizations are properly
done. Of note: I incremented the framework version to B to enable SDL
1.2 and 1.3 to coexist in a single framework.

Let me know if you see any problems.

Greetings

   Christian
2008-05-08 05:06:24 +00:00
Bob Pendleton
97f034bc79 ran make indent 2008-03-14 20:43:44 +00:00
Bob Pendleton
b6e476a69b re: bug#563. checking in some commented out trace code and a fix so that the in testalpha.c the background only flashes when alpha == 255. The problem that is being
fixed is caused by clearing SDL_COPY_RLE_COLORKEY without setting SDL_COPY_RLE_DESIRED in SDL_UnRELSurface.
2008-03-14 18:17:49 +00:00
Sam Lantinga
37131333be First pass of new SDL scancode concept for X11. 2008-02-07 15:31:09 +00:00
Sam Lantinga
0f9d544f5e First pass implementation of new SDL scancode concept, as discussed with
Christian Walther.  Currently only implemented on Mac OS X for sanity
checking purposes.
2008-02-05 07:19:23 +00:00
Ryan C. Gordon
fd734cede6 Merged r3534:3535 from branches/SDL-1.2: Reset direction flag in SDL_revcpy(). 2008-02-04 17:25:33 +00:00
Bob Pendleton
16c4fcc95c Minimal implementation of textinput events for x11. It only works for latin-1. 2008-01-15 22:37:17 +00:00
Bob Pendleton
e065abc334 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob. 2008-01-08 00:10:46 +00:00