Commit Graph

1718 Commits

Author SHA1 Message Date
Gabriel Jacobo
1995df04e8 Adds CMake build system by Marcus Von Appen (bug #1597) 2012-11-16 09:23:18 -03:00
Sam Lantinga
105e4c7072 Nobody will EVER use more than 8 buttons. Oh wait... Nobody will EVER use more than 32 buttons... 2012-11-12 12:14:44 -08:00
David Ludwig
76266d0aae added UIViewController pointer to SDL_SysWMinfo for iOS 2012-07-18 22:26:47 -04:00
Sam Lantinga
5fd86fdeac Fixed bug 1542 - SDL_Touch should reserve tilt_x and tilt_y
Gerry JJ 2012-07-14 19:42:23 PDT
The SDL_Touch structure currently reserves fields for tablet tilt and rotation
(marked "for future use"), but a tablet stylus can tilt in both x and y
directions in addition to rotation around itself (or, put another way, it can
rotate in x, y and z). So, the struct should probably reserve fields for both
tilt_x and tilt_y, not just tilt.
2012-07-18 15:53:33 -07:00
Sam Lantinga
719eabe5ee Improved simultaneous support for OpenGL and OpenGL ES
From Scott Percival

Okay, I think I have something for this. Tested it on GL and GLES
machines, it seems to work okay.

- Add a new SDL GL attribute SDL_GL_CONTEXT_EGL:
        - Only useful for the X11 video driver at the moment
        - Set to 1 for an EGL context, 0 to use the default for the video driver
        - Default is 0, unless library is built for EGL only
        - Should be set after SDL init, but before window/context
creation (i.e. same place you'd specify attributes for major/minor GL
version)
- After a lot of agony pondering the least-terrible way to go about
it, made it so that X11_GL_LoadLibrary and X11_GLES_LoadLibrary check
SDL_GL_CONTEXT_EGL. If no GL context exists yet, and the attribute
choice doesn't match with the checking function, then it changes all
the function pointers in the video driver and passes control on to the
new LoadLibrary method.
- Likewise, make X11_CreateWindow check this attribute before firing
off a call to X11_GL_GetVisual/X11_GLES_GetVisual
- Added a sanity check to the start of X11_GL_LoadLibrary
- Tidied up SDL_x11opengles.h
- Moved ownership of the gles_data structure over to
X11_GLES_LoadLibrary/UnloadLibrary
- Should incorporate the 3 fixes posted by Andre Heider

This is obviously quite a bit to take in, but is (at least) a proof of
concept for the approach I think EGL/GLX mingling should take. Any
comments/criticism is much appreciated.
2012-07-18 15:17:27 -07:00
Ryan C. Gordon
641161f677 Patched to compile on FreeBSD 8.2. 2012-07-11 22:20:02 -04:00
Ryan C. Gordon
0cdd02b4de Patched to compile on Mac OS X with Xcode (Unix configure already worked). 2012-07-11 20:40:02 -04:00
Sam Lantinga
c45ef572c4 Disable the SDL event pump after the SDL main routine returns, since events will be dispatched by the Cocoa event loop. 2012-06-25 11:10:34 -04:00
Sam Lantinga
5160c3d202 Created a header file for system dependent API functions, and added SDL_iPhoneSetAnimationCallback() 2012-06-22 19:19:18 -04:00
Sam Lantinga
3da89b1dd0 Updated Mac OS X and iOS projects 2012-06-21 10:41:25 -04:00
Gabriel Jacobo
2e96488df0 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308) 2012-06-01 19:51:08 -03:00
Dimitris Zenios
e387df94fc 1.Fixed a memory leak inside XInput2 code
2.Replaced XKeycodeToKeysym with XkbKeycodeToKeysym since XKeycodeToKeysym is deprecated in newer X11 version
3.Rewrote testime.c since it was disabled after SDL_compat.c removal
4.Take into account common arguments also in testrelative.c
2012-05-31 19:23:30 +03:00
Dimitris Zenios
689dd07956 1.Moved all xinput2 functionality to its own file
2.Implement touch events using Xinput2.Leave evtouch as a fallback when xinput2 is not supported
2012-05-31 13:37:02 +03:00
Sam Lantinga
ff4a156632 Fixed define for consistency 2012-05-30 11:45:09 -04:00
Sam Lantinga
94597260b7 Fixed compile error with both new and old Xext headers (bug 1498) 2012-05-30 11:44:57 -04:00
Sam Lantinga
a74c7583bc Initial support for XInput2 by Dimitris Zenios
1.initial work on XInput2 support
2.Implemented relative mouse motion when XInput2 is enabled
3.Created a test app to test relative mouse motion
4.Fixed Bug #1498
2012-05-30 11:25:35 -04:00
Gabriel Jacobo
a6c03533e0 Fixes issue #1500 "SDL_RWops fails under Android 4" by removing stale Local Refs
and replacing them for their global equivalents.
2012-05-25 15:35:41 -03:00
Sam Lantinga
c24538ae24 Add OpenGL 3.X context creation support
Matthias Bentrup 2011-10-30 03:58:24 PDT

I've updated the context creation patch to include the bugfixes by Martin
Schreiber and also included a profile bit to request a ES2 compatible profile.

The wgl context creation may use 2 call to wglChoosePixelFormat if no
acceleration attribute is selected, this should work around a bug with buggy
AMD drivers (see #1254).
2012-02-20 23:37:57 -05:00
Ryan C. Gordon
a6a93eaeae Check for _STDINT_H in SDL_config_minimal.h 2012-02-07 01:26:00 -05:00
Sam Lantinga
b5844a1c07 Added a convenience function SDL_CreateWindowAndRenderer() 2012-01-22 19:22:53 -05:00
Sam Lantinga
07b8dc102e Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface() 2012-01-22 18:37:46 -05:00
Sam Lantinga
9c4c023744 Removed the SDL 1.2 compatibility API... we'll see how painful this is. 2012-01-22 18:11:41 -05:00
Sam Lantinga
128821901c Removing some more references to SDL 1.3 2012-01-22 17:26:45 -05:00
Sam Lantinga
c484f884c5 Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2 2012-01-22 17:21:00 -05:00
Sam Lantinga
c5b09f0da7 You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag. 2012-01-22 01:29:26 -05:00
Sam Lantinga
b291116502 Renamed SetTargetTexture() to SetRenderTarget() 2012-01-22 01:26:28 -05:00
Sam Lantinga
1af7c2fe96 Added a renderer flag to expose whether a renderer supports render to texture. 2012-01-19 21:06:47 -05:00
Sam Lantinga
9853ab62c8 Switched back to configure generating SDL_config.h
It was very confusing to have configure generate an SDL_config.h and then not have it be used when building on Mac OS X or Windows.  I'll just have to remember to use SDL_config_windows.h when building official releases that are supposed to be ABI compatible with Visual Studio.
2012-01-19 01:55:51 -05:00
Sam Lantinga
9e37906060 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Thanks guys!
2012-01-18 22:45:49 -05:00
Sam Lantinga
47034fa31b Fixed configure build 2012-01-16 19:21:07 -05:00
Sam Lantinga
243a72784f Check for sem_timedwait(), which isn't available on some systems (including OpenBSD 2012-01-15 03:34:14 -05:00
Sam Lantinga
d4c4a98f59 Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
Make sure we don't clobber SDL_revision.h when building from Mercurial
2012-01-14 13:21:19 -05:00
Sam Lantinga
59f51ede60 Unofficial builds should have a 0 revision number - if this accidentally gets checked in with a different revision, this file should be reverted to this content. 2012-01-14 13:17:01 -05:00
Sam Lantinga
e2df95c6f2 Fixed inline assembly warning for PPC
input constraint with a matching output constraint of incompatible type
2012-01-14 00:49:25 -05:00
Sam Lantinga
1781323edc Fixed structure alignment mismatch between Visual Studio and gcc on 64-bit architectures. 2012-01-09 07:07:43 -05:00
Sam Lantinga
07f8710f47 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Scott Percival 2011-07-03 06:41:51 PDT

This submission is aimed at making life easier for OpenGL ES capable devices
running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not
running Android). SDL's Pandora support already has the neccesary GLES-to-X11
glue code, however it's all ghetto'd off in Makefile.pandora and not very
flexible.

The patch:
- adds an awesome --enable-video-opengles option to configure
- re-modifies the opengles and opengles2 SDL_renderers to use function pointers
- no idea why this was removed?
- for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or
libGLESv2 at runtime
- links in libEGL.so at runtime - the old code made an assumption that
eglFunctions could be pulled from the active GLES library, PowerVR for one
doesn't let you do that with their libGLESv2
- allows you to pick which of GLES v1 or v2 to load via
SDL_GL_CONTEXT_MAJOR_VERSION

So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and
a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well,
everything that isn't those two, such as a Pandora, iOS or Android device. The
Pandora specific code should be kept intact (fingers crossed), and nothing
painfully drastic has been added to the SDL_renderers. The library loading
sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's
propensity to let developers get away with murder and PowerVR's alternative of
punishing every missed step.

The test apps work okay with GLES or GLES2 as the renderer. For some reason
alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out
a new set of X11 GLES drivers, so I'll try and investigate once I upgrade
those. Also, this patch adds things to configure.in, include/SDL_config.h.in
and test/configure.in. I didn't know what the policy was re. committing
generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry.

I think that's about everything, let me know if there's anything I've
overlooked.
2012-01-08 02:23:37 -05:00
Sam Lantinga
1d1fc9c715 Updated iOS projects and renamed iPhoneOS to iOS 2012-01-05 21:41:55 -05:00
Sam Lantinga
aeb5be9fe8 This file keeps getting clobbered... *sigh* 2012-01-03 01:46:52 -05:00
Sam Lantinga
e256711bb9 Happy New Year! 2011-12-31 09:28:07 -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
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
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
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
Sam Lantinga
5fedcb50d8 GIMP wrote bmp files in RGBX format. Huh. 2011-11-09 22:53:44 -05:00
Sam Lantinga
76714d4f99 Fixed a typo in the header. 2011-11-07 02:25:01 -05:00
Sam Lantinga
6371c44a9e Lots of fixes importing SDL source wholesale into a new iOS project 2011-10-31 05:56:58 -04:00
Sam Lantinga
a347411651 SDL_ConvertPixels() returns 0 on success 2011-10-31 02:44:21 -04:00
Sam Lantinga
c2a6df6073 The draw color affects RenderClear() as well. (thanks to the feedback form to whoever pointed this out) 2011-10-30 17:53:54 -04:00
Sam Lantinga
66d375d59e Fixed typo - thanks Sheena! 2011-10-30 17:31:59 -04:00
Andreas Schiffler
bc907fee45 Update SDL_HasClipboardText functions to return value based on clipboard content; Fix memory leak in fallback SetClipboard implementation 2011-10-29 23:43:59 -07:00
Sam Lantinga
6d456a4116 Added SDL_GetScancodeFromName() and SDL_GetKeyFromName() 2011-10-24 21:34:54 -04:00
Tim Angus
092332dd71 * Android's InputStream::skip is apparently buggy, so instead read into a dummy buffer 2011-10-14 17:29:49 +01:00
Ryan C. Gordon
15426080c6 Specify joystick (accelerometer) support for iOS in the config header.
Fixes Bugzilla #1292.

Thanks to Vittorio Giovara for the patch!
2011-10-14 00:20:44 -04:00
Ryan C. Gordon
2ef51927fe 1.3 API CHANGE: Add support for naming threads. 2011-10-02 00:29:16 -04:00
Ryan C. Gordon
a4ede00263 Fixed compiler warnings on Haiku. 2011-09-18 03:52:08 +00:00
Andreas Schiffler
0a29e84930 Fix SDL_RectEquals define 2011-09-17 22:35:10 -07:00
Andreas Schiffler
acb9d90a85 Add NULL handling in SDL_RectEmpty and SDL_RectEquals 2011-09-16 08:25:49 -07:00
Ryan C. Gordon
b84e7104b1 Clean up the win32 compiler warnings for SDL threads, in the 1.3 branch. 2011-09-12 13:36:38 -04:00
Ryan C. Gordon
82df1959c1 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
Andreas Schiffler
576988acf2 Update SDL_REVISION 2011-09-04 20:45:38 -07:00
Ryan C. Gordon
e0fe768768 Fixed another Apple typedef in SDL_opengl.h 2011-09-02 13:54:45 -04:00
Ryan C. Gordon
fefd678dfd Backed out SDL_config.h overwrite that got committed by accident. 2011-08-30 17:11:51 -04:00
Ryan C. Gordon
370cdc709c Automated merge with https://bitbucket.org/Markusk/sdl-gsoc 2011-08-29 13:17:07 -04:00
Ryan C. Gordon
56e1918d11 Fixed missing audio on iOS. 2011-08-29 00:27:43 -04:00
Ryan C. Gordon
586e5b252b Fix another Apple conflict in SDL_opengl.h 2011-08-26 03:38:46 -04:00
Ryan C. Gordon
1248146aa2 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
8f50763692 Fixed -pedantic warning in SDL_assert.h.
Fixes Bugzilla #1282.
2011-08-21 12:36:55 -04:00
Ryan C. Gordon
854a2e9098 Implemented XAudio2 target for Windows (and Xbox360, theoretically!). 2011-08-04 01:07:09 -04:00
Ryan C. Gordon
7de8cc401e Reworked Windows waveOut code.
Implemented multi-device support, changed name to "winmm".
2011-08-04 01:24:22 -04:00
Ryan C. Gordon
59168c5bf2 Apple uses a void* for GLhandleARB, not an unsigned int. 2011-08-04 00:46:27 -04:00
Ryan C. Gordon
4ef8847cc5 Allow Android platforms to read from .apk files via the RWOPS interface.
Fixes Bugzilla #1261.

Thanks to Tim Angus for the patch!
2011-07-29 16:51:25 -04:00
Ryan C. Gordon
75d8b324e2 Work on systems without sa_sigaction. 2011-07-20 16:35:37 -07:00
Markus Kauppila
9932ea0a03 Testing out implementation for skipping unsupported test
automatically.
2011-07-18 22:26:26 +03:00
Nathan Heisey
65e5a15393 Implemented pthread spinlocks. 2011-06-22 10:33:48 +00:00
Tim Angus
e4de79558c * SDL_IOS_IDLE_TIMER_DISABLED hint 2011-06-10 14:23:36 +01:00
Tim Angus
2b47e23dc8 * SDL_IOS_ORIENTATIONS hint 2011-06-10 14:23:24 +01:00
Sam Lantinga
2b4bb0d58b Make SDL_QuitRequested() return an SDL_bool 2011-06-12 12:23:39 -04:00
Ryan C. Gordon
a74c9aa88d Fixed gcc warnings for apps using SDL headers with -Wundef flag.
Fixes Bugzilla #1216.

Thanks to Dimitris Zenios for the patch!
2011-06-06 12:20:04 -04:00
Andreas Schiffler
40bfbbdbf9 Fixed global suite declaration segfault via external linkage declaration 2011-05-26 20:13:49 -07:00
Sam Lantinga
fa1116223a Clarified SDL_GetWindowSurface() documentation
Matthew Orlando to Sam

Someone asked in IRC whether they should free the surface from SDL_GetWindowSurface. The doc comment is a bit vague so i checked the code and revised the comment.
2011-04-22 09:06:29 -07:00
Sam Lantinga
057ae6ca57 Fixed so SDL_quit.h doesn't require SDL_compat.h 2011-04-21 09:50:29 -07:00
Ryan C. Gordon
1b953ac714 Removed assertion list terminator (just do it like a normal linked list). 2011-04-19 14:12:56 -04:00
Sam Lantinga
37865236cc Minor missing parameter name 2011-04-18 12:20:30 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
a46d9b6758 Added SDL_GetRenderer() 2011-04-04 09:29:13 -07:00
Sam Lantinga
56c4464487 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency() 2011-03-25 14:45:04 -07:00
Sam Lantinga
f0c424685b SDL 1.3 requires a 64-bit type for the platform. 2011-03-25 13:47:49 -07:00
Sam Lantinga
73247db7d8 The API sets the priority for the current thread, not an arbitrary thread.
Implemented thread priority as the 'nice' value on Linux.  High priority threads require root permissions (you shouldn't give your game root permissions though!)
2011-03-25 12:44:06 -07:00
Sam Lantinga
eeb5f362e4 Implemented SDL_SetThreadPriority() 2011-03-25 10:47:49 -07:00
Sam Lantinga
023e6fa996 Fixed related function documentation 2011-03-22 10:48:33 -07:00
Ken Rogoway
75029512ef Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Fixed issue when calling SDL_BlitScaled() directly with src or dst rectangles that were out of bounds.
2011-03-13 22:38:41 -05:00
Sam Lantinga
a99d79de70 Fixed error because intrin.h contains C++ code and can't be included in an extern "C" block. 2011-03-15 19:37:38 -07:00
Sam Lantinga
3f21fa761c Fixed typo 2011-03-14 10:58:35 -07:00
Sam Lantinga
4fd91c5eed Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling. 2011-03-13 11:18:35 -07:00
Sam Lantinga
b710eb9280 Fixed so code will compile with SDL_config_minimal.h 2011-03-12 13:21:57 -08:00
Sam Lantinga
2d4e47a5a7 Added a function to create color cursors: SDL_CreateColorCursor() 2011-03-11 14:14:38 -08:00
Sam Lantinga
d58ee21159 Added support for the Xcursor library for color cursors 2011-03-11 13:56:53 -08:00
Sam Lantinga
069fbf4861 Gamma support is back!
New API functions:
	SDL_SetWindowBrightness()
	SDL_GetWindowBrightness()
	SDL_SetWindowGammaRamp()
	SDL_GetWindowGammaRamp()
	SDL_CalculateGammaRamp()
2011-03-11 08:49:20 -08:00
Sam Lantinga
634567b09a The MMX and 3DNow! instructions can't be compiled by 64-bit Visual Studio. 2011-03-07 22:04:10 -08:00
Sam Lantinga
821c92eab1 Fixed bitmap order interpretation; SDL defaults to MSB ordering so a bitstream corresponds to a pixel stream.
The bitmap ordering is defined such that the numbering refers to the pixel index from left to right, and the number position refers to the bit position in the byte.

SDL_BITMAPORDER_4321 is the fourth pixel at the high bit and the first pixel at the low bit (LSBFirst)

SDL_BITMAPORDER_1234 is the first pixel at the high bit and the fourth pixel at the low bit (MSBFirst)
2011-03-07 00:30:05 -08:00
Sam Lantinga
f78f25504b Added padding for better aligned access to *shift/*loss members 2011-03-06 23:54:20 -08:00
Sam Lantinga
2a60f966cb a Nintendo ds update
Frank Zago to SDL

For those interested, here's a snapshot of the current port. I did away with
most of the previous attempt which was based of the sprite engine, because the
support is limited to 128 64x64 sprites. Instead I'm using the gl engine.
The drawback is that either the frame buffer or the gl engine can be used
because there's not that much video memory on a DS.

With minimal changes to their code, it can now run the following tests: ,
testspriteminimal, testscale and testsprite2. The last 2 only run under the
emulator for some reason. The tests are not included in this patch for size
reason.

In 16 bits mode, the 16th bit indicated transparency/opacity. If 0, the color
is not displayed. So I had to patch a few core file to set that bit to 1. See
patch for src/video/SDL_RLEaccel.c and src/video/SDL_blit.h. Is that ok, or is
there a better way ?

The nds also doesn't support windowed mode, so I force the fullscreen in
src/video/SDL_video.c.  Is that ok, or is there a better way ?

To get a smaller library, I also tried to not compile the software renderer
when the hardware renderer is compiled in, and define SDL_NO_COMPAT; however
the compilation eventually fails in SDL_surface.c because SDL_SRCCOLORKEY is
defined in SDL_compat.h. Is SDL_NO_COMPAT only for application and not SDL
itself ?
2011-03-06 21:12:19 -08:00
Sam Lantinga
d32d1ee244 OSF isn't supported anymore. 2011-02-28 09:09:13 -08:00
Sam Lantinga
9f410819dc IRIX is not supported anymore. :) 2011-02-28 09:06:29 -08:00
Sam Lantinga
f7600494ed Dynamically load the Xinerama and xf86vmode extensions
This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
2011-02-28 09:01:53 -08:00
Sam Lantinga
747dbeb744 Fixed compiling AltiVec blitters 2011-02-27 22:22:58 -08:00
Sam Lantinga
d5783ef521 Use boolean value for input grab mode, like we do for fullscreen mode. 2011-02-27 20:06:45 -08:00
Sam Lantinga
0ac98043e8 Fixed altivec.h include on Mac OS X 2011-02-22 22:17:44 -08:00
Sam Lantinga
7fa84f6a78 Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
f3c377a8f2 Simplified and unified the window creation process a little. 2011-02-21 22:03:39 -08:00
Sam Lantinga
73b17999c1 Implemented Cocoa_SetWindowIcon(), added SDL_ConvertSurfaceFormat() 2011-02-21 16:45:23 -08:00
Sam Lantinga
2788694b17 Simple rumble API for haptic
Edgar Simo      2011-02-20 10:27:52 PST

Adding patch that adds a simplified API for the haptic subsystem built ontop of
the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float
strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop
of the other haptic API it should work on all OS the same.
2011-02-20 10:54:44 -08:00
Sam Lantinga
a0a3c805a2 Added a revision number for easy compile-time tests. 2011-02-20 10:42:51 -08:00
Sam Lantinga
3296f115b7 Added missing log debug function 2011-02-19 11:23:56 -08:00
Sam Lantinga
664f75eeff Add assertions to the default API set. 2011-02-19 11:23:41 -08:00
Sam Lantinga
594e403a0f Whoops, the format parameter was off the page. 2011-02-18 09:30:09 -08:00
Sam Lantinga
6b2b174db0 The file is actually SDL_config.h now. 2011-02-17 19:00:29 -08:00
Sam Lantinga
b807895313 Allow the application to explicitly request a software renderer. 2011-02-17 12:03:48 -08:00
Sam Lantinga
dbb0a44739 Renamed SDL_keysym.h to SDL_keycode.h to avoid confusion. 2011-02-16 15:46:12 -08:00
Sam Lantinga
b5513f44c8 Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order)
Even if we're blitting between two different surfaces their pixels might still overlap, because of SDL_CreateRGBSurfaceFrom(), so always use SDL_BlitCopy() and check for overlap in that function.

When handling overlapping surfaces, don't assume that memcpy() iterates forward, instead use memmove() correctly, and provide a fallback implementation of SDL_memmove() that handles the different cases.

Fixed a bug with SDL_memset() not completely filling lengths that aren't a multiple of 4.
Optimized SDL_memcpy() a bit using the same technique as SDL_memset().
2011-02-16 15:25:10 -08:00
Sam Lantinga
349a9bf3ce Allow you to override SDL's main override 2011-02-16 12:27:29 -08:00
Sam Lantinga
307a90d292 Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
2011-02-16 02:37:09 -08:00
Sam Lantinga
b7d670c8ca Fixed gcc -pedantic warning 2011-02-15 21:57:31 -08:00
Sam Lantinga
b59da3ffdc Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Ken Rogoway
8c8191deef Software scaling support. Not very fast, but it seems to work. 2011-02-14 11:50:18 -06:00
Sam Lantinga
2ad2f08f4d The format_version isn't used anymore. 2011-02-13 22:30:06 -08:00
Sam Lantinga
c7b5cc946d A few fixes:
Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
2011-02-13 13:46:10 -08:00
Sam Lantinga
e6ec7f6b28 Fixed bug #1117
There's a new event that's always sent when the window changes size, and that event is what the renderers listen for to determine if they need to rebind their context.
2011-02-12 19:02:14 -08:00
Sam Lantinga
c3265bbc90 changeset: 5272:cb08ef104ac4
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 20:53:06 2011 +0100
summary: improve header files compatibility with SDL 1.2 applications (namely QEMU)
2011-02-12 12:04:00 -08:00
Sam Lantinga
362639036a Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
5e1535525c Initial pass at shader YV12 support - doesn't quite work yet. 2011-02-12 00:25:02 -08:00
Sam Lantinga
aef6fb230a Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
2af371cc2e Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
37993063c6 Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
2011-02-10 14:44:25 -08:00
Sam Lantinga
debc4678c8 Be explicit about what display you're querying. The default display is 0. 2011-02-10 12:14:37 -08:00
Sam Lantinga
f2729d2d2c Removed gamma support since it wasn't widely used and not well supported. 2011-02-10 11:39:08 -08:00
Sam Lantinga
f8db477234 Surfaces aren't in hardware memory anymore! 2011-02-10 05:10:05 -08:00
Sam Lantinga
5d0480d014 Added a way to replace the default logging mechanism 2011-02-08 23:13:58 -08:00
Sam Lantinga
ca8ed0c39d Added a hint to control whether the OpenGL driver uses shaders. 2011-02-08 22:40:19 -08:00
Sam Lantinga
5069986bff Made it possible to disable the rendering subsystem with configure --disable-render 2011-02-08 10:04:09 -08:00
Sam Lantinga
7d207a3141 It's now possible to disable the fast atomic operations, at a huge performance penalty. 2011-02-07 22:57:33 -08:00
Sam Lantinga
da46bc3be3 Added function SDL_RenderSetClipRect() 2011-02-07 20:06:26 -08:00
Sam Lantinga
47818cfba9 Added a simple log message API 2011-02-07 16:45:40 -08:00
Sam Lantinga
f1d38d9c1c Renamed SDL_Key to SDL_Keycode to clarify terminology. 2011-02-07 10:40:21 -08:00
Sam Lantinga
60016c514e Renamed SDLKey and SDLMod for consistency 2011-02-07 09:42:08 -08:00
Sam Lantinga
23370c8928 Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased. 2011-02-07 09:37:11 -08:00
Sam Lantinga
1163ebc192 Updated testoverlay2 to use the SDL 2D rendering API 2011-02-07 00:46:43 -08:00
Sam Lantinga
92c1973815 Since we changed the API entirely, just remove the old function names 2011-02-06 08:57:29 -08:00
Sam Lantinga
bbf99fa10b Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h 2011-02-06 02:35:14 -08:00
Sam Lantinga
ae2ce1d91e Added an OpenGL ES 2.0 renderer, contributed by itsnotabigtruck
This compiles, but it untested.
2011-02-06 00:00:13 -08:00
Sam Lantinga
3d231d07df Created a simpler version of SDL_SetHint() that doesn't need a priority. 2011-02-05 20:02:37 -08:00
Sam Lantinga
b31aaaaad7 Updated the DirectFB support, from Couriersud
attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.

The directfb renderdriver right now still depends on a some "includes"
from src/video/directfb. That's why it is not yet moved to the new
render folder.
2011-02-05 16:07:10 -08:00
Sam Lantinga
dd42a41854 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints. 2011-02-05 10:35:36 -08:00
Sam Lantinga
1012c06b0a Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms. 2011-02-05 10:03:12 -08:00
Sam Lantinga
8322900075 Added a hint system to allow configuration hints to be specified by the application. 2011-02-05 10:02:39 -08:00
Sam Lantinga
8bbd554984 Fixed permissions on the Android config header. 2011-02-05 01:02:24 -08:00
Sam Lantinga
4f6e1878af Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
e37fdde92a Removed a bunch of X11 support that we no longer need. 2011-02-04 19:18:08 -08:00
Sam Lantinga
6d8925632d Switched the SDL 1.2 compatibility to use the window surface, so it's fast even when there's no hardware acceleration available.
This means that the YUV overlay now uses software, but that's okay since fast YUV code should be using the textures now anyway.
2011-02-03 21:13:55 -08:00
Sam Lantinga
93a4e38e98 Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
The software renderer has been re-routed to use the framebuffer interface, which makes it possible to have software rendering available even on simple ports.
2011-02-03 15:49:37 -08:00
Sam Lantinga
7880fa3997 Extended SDL_SetWindowData() to allow arbitrary named values. 2011-02-03 11:16:57 -08:00
Sam Lantinga
4360f9d15a Added an intro to the features and goals of the 2D rendering API. 2011-02-03 10:03:55 -08:00
Sam Lantinga
e4569cfdca Making the API simpler, moved the surface drawing functions to the software renderer. 2011-02-03 02:45:29 -08:00
Sam Lantinga
dd03fe7ff1 Re-ordered platforms based on frequency 2011-02-03 01:19:10 -08:00
Sam Lantinga
533d4862d6 Simplified and improved the process of creating a texture from a surface. 2011-02-03 00:54:29 -08:00
Sam Lantinga
a5bfac214f Making the API simpler, removed the writepixels interface 2011-02-03 00:22:18 -08:00
Sam Lantinga
405d4ed7e4 Made it possible to create a texture of any format, even if not supported by the renderer.
This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.
2011-02-03 00:19:40 -08:00
Sam Lantinga
433b8c4189 Fixed compiling on Windows 2011-02-02 22:55:12 -08:00
Sam Lantinga
8bf50cc83c Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library. 2011-02-02 14:34:54 -08:00
Sam Lantinga
482e5c0697 Nobody is currently maintaining the QNX code, so removing it for now. 2011-02-01 21:40:03 -08:00
Sam Lantinga
1f34b65342 Making the API simpler, removed support for palettized video modes and textures. 2011-02-01 21:23:43 -08:00
Sam Lantinga
adaab5944f The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future. 2011-02-01 19:19:43 -08:00
Sam Lantinga
5978f70063 Added functions to watch events as they go through the event queue. 2011-02-01 19:15:42 -08:00
Sam Lantinga
f729dd20de Split the rendering API out into a separate header file. 2011-02-01 15:02:21 -08:00
Sam Lantinga
5d5f352744 Renumbered the renderer flags 2011-02-01 12:44:52 -08:00
Sam Lantinga
88718ffabe Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering. 2011-02-01 12:19:46 -08:00
Sam Lantinga
fb80cf39a4 Making the API simpler, texture color and alpha modulation are supported by all renderers. 2011-01-31 23:37:30 -08:00
Sam Lantinga
0efb1ea0b2 Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers. 2011-01-31 23:23:57 -08:00
Sam Lantinga
f9ebc0527f Removed more partially functional renderers 2011-01-31 22:53:45 -08:00
Sam Lantinga
471a85fb52 Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers. 2011-01-31 22:44:43 -08:00
Sam Lantinga
096a6b8d79 Removed partially functional renderers 2011-01-31 22:21:29 -08:00
Sam Lantinga
2a2df3d2b1 Spacing for documentation tweaks 2011-02-01 12:01:37 -08:00
Sam Lantinga
e191dd269c Tweak for documentation 2011-02-01 11:53:29 -08:00
Sam Lantinga
a961fbabfe Added Edgar's blog to the haptic documentation 2011-01-28 12:09:25 -08:00
Sam Lantinga
74a3510cf2 Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
2011-01-27 22:44:08 -08:00
Sam Lantinga
357519de5a Added API function to get CPU cache line size. 2011-01-27 20:46:45 -08:00
Sam Lantinga
c5035c553b Bump up the default cache line size. 2011-01-27 16:51:47 -08:00
Sam Lantinga
d6a6503537 Added cache line size info in SDL_cpuinfo.h
I also added an implementation to dynamically query it, but didn't expose it since most x86 CPUs have an L1 cache line size of 64 bytes.
2011-01-27 16:46:15 -08:00
Sam Lantinga
9b5a15bc30 Improved timer implementation
The new timer model is formalized as using a separate thread to handle timer callbacks.  This was the case on almost every platform before, but it's now a requirement, and simplifies the implementation and makes it perform consistently across platforms.

Goals:
 * Minimize timer thread blocking
 * Dispatch timers as accurately as possible
 * SDL_AddTimer() and SDL_RemoveTimer() are completely threadsafe
 * SDL_RemoveTimer() doesn't crash with a timer that's expired or removed
2011-01-27 14:45:06 -08:00
Sam Lantinga
98d356be1b Improved condition variable documentation 2011-01-27 10:40:17 -08:00
Sam Lantinga
0ffe05f55f Only document the public API, not the whole source tree. 2011-01-27 07:05:13 -08:00
Sam Lantinga
9195b9f922 Nobody is maintaining RISC OS code, so I'm removing it for now. 2011-01-27 00:06:36 -08:00
Sam Lantinga
c382f95013 Added a FIFO test to the atomic test suite.
This is really useful because we might be able to use something like this
for the SDL event queue.
2011-01-25 23:23:52 -08:00
Sam Lantinga
94cfb29bb1 More fixes for compilation on Visual Studio 2011-01-25 18:02:41 -08:00
Sam Lantinga
7dba2ad5da Fixed compile error on Visual C++ 2011-01-25 17:44:17 -08:00
Sam Lantinga
3dc1009723 Improvements based on feedback from Anthony Williams 2011-01-25 17:40:06 -08:00
Sam Lantinga
37df0221d4 Fixed cross-compiling for Windows 2011-01-24 21:41:36 -08:00
Sam Lantinga
57ac355cb5 Fixed bug #1100
Test the video features with #if instead of #ifdef
2011-01-24 17:38:18 -08:00
Sam Lantinga
ec39fffe84 Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008 2011-01-24 15:46:11 -08:00
krogoway
d35de7167f Renamed SDL_keysym to SDL_KeySym
Renamed SDL_scancode to SDL_ScanCode
Added #defines to SDL_compat.h
2011-01-24 13:47:35 -06:00
Sam Lantinga
8ca87bec57 Fixed bug #1097
There are problems with including intrin.h in C linkage in C++ compilation,
and further conflicts between intrin.h and winnt.h on Visual Studio 2005.
2011-01-21 23:46:51 -08:00
Sam Lantinga
cabda4aa7c HAVE_GCC_ATOMICS covers the test and set 2011-01-21 21:45:55 -08:00
Sam Lantinga
3b73c8e006 Yeah, go iPhone! 2011-01-21 21:43:56 -08:00
Sam Lantinga
69dab46757 Separated out the minimum functionality that we need from gcc for our spinlock fallback. 2011-01-21 21:42:04 -08:00
Sam Lantinga
dffcf58f01 Fixed bug #859
CREATE_SUBDIRS helps a lot if browsing HTML documentation in a file browser.

ALWAYS_DETAILED_SEC makes sure everything has at least the automatic
documentation like function prototype and source references.

STRIP_FROM_PATH allows you to include only the relevant portions of the files'
paths, cleaning up both the file list and directory tree, though you need to
change the path listed here to match wherever you put SDL.

ALIASES avoids some warnings generated by
C:\source\svn.libsdl.org\trunk\SDL\src\joystick\darwin\10.3.9-FIX\IOHIDLib.h.
It seems Apple uses a few commands which are not normally supported by Doxygen.

BUILTIN_STL_SUPPORT adds support for parsing code which makes use of the
standard template library.  There isn't a lot of C++ in SDL (some in bwindow at
least), but this still seems like a good idea.

TYPEDEF_HIDES_STRUCT means that for code like this:
typedef struct A {int B;} C;
C is documented as a structure containing B instead of a typedef mapped to A.

EXTRACT_ALL, EXTRACT_PRIVATE, EXTRACT_STATIC, EXTRACT_LOCAL_METHODS,
EXTRACT_ANON_NSPACES and INTERNAL_DOCS make sure that _everything_ is
documented.

CASE_SENSE_NAMES = NO avoids potential conflicts when building documentation on
case insensitive file systems like NTFS and FAT32.

WARN_NO_PARAMDOC lets you know when you have documented some, but not all, of
the parameters of a function.  This is useful when you're working on adding
such documentation since it makes partially documented functions easier to
spot.

WARN_LOGFILE writes warnings to a seperate file instead of mixing them in with
stdout.  When not running in quiet mode, these warnings can be hard to spot
without this flag.

I added *.h.in and *.h.default to FILE_PATTERNS to generate documentation for
config.h.in and config.h.default.

RECURSIVE tells doxygen to look not only in the input directory, but also in
subfolders.

EXCLUDE avoids documenting things like test programs, examples and templates
which need to be documented separately.

I've used EXCLUDE_PATTERNS to exclude non-source subdirectories that often find
their way into source folders (such as obj or .svn).

EXAMPLE_PATH lists directories doxygen will search to find included example
code.  So far, SDL doesn't really use this feature, but I've listed some likely
locations.

SOURCE_BROWSER adds syntax highlighted source code to the HTML output.
USE_HTAGS is nice, but not available on Windows.

INLINE_SOURCES adds the body of a function to it's documentation so you can
quickly see exactly what it does.

ALPHABETICAL_INDEX generates an alphabetical list of all structures, functions,
etc., which makes it much easier to find what you're looking for.

IGNORE_PREFIX skips the SDL_ prefix when deciding which index page to place an
item on so you don't have everything show up under "S".

HTML_DYNAMIC_SECTIONS hides the includes/included by diagrams by default and
adds JavaScript to allow the user to show and hide them by clicking a link.

ENUM_VALUES_PER_LINE = 1 makes enums easier to read by placing each value on
it's own line.

GENERATE_TREEVIEW produces a two frame index page with a navigation tree on the
left.

I have LaTeX and man pages turned off to speed up doxygen, you may want to turn
them back on yourself.

I added _WIN32=1 to PREDEFINED to cause SDL to output documentation related to
Win32 builds of SDL.  Normally, doxygen gets confused since there are multiple
definitions for various structures and formats that vary by platform.  Without
this doxygen can produce broken documentation or, if you're lucky, output
documentation only for the dummy drivers, which isn't very useful.  You need to
pick a platform.

GENERATE_TAGFILE produces a file which can be used to link other doxygen
documentation to the SDL documentation.

CLASS_DIAGRAMS turns on class diagrams even when dot is not available.

HAVE_DOT tells doxygen to try to use dot to generate diagrams.

TEMPLATE_RELATIONS and INCLUDE_GRAPH add additional diagrams to the
documentation.

DOT_MULTI_TARGETS speeds up dot.

OUTPUT_DIRECTORY, INPUT and other paths reflect the fact that this Doxyfile is
intended to process src as well as include and is being run from a separate
subdirectory.  Doxygen produces several temporary files while it's running and
if interrupted, can leave those files behind.  It's easier to clean up if there
aren't a hundred or so files in the same folder.  I typically run doxygen in
SDL/doxy and set the output directory to '.'.  Since doxygen puts it's output
in subfolders by type, this keeps things pretty well organised.  You could use
'../doc' instead and get the same results.
2011-01-21 12:57:01 -08:00
Sam Lantinga
7f59b3b677 Fixed compile error on Mac OS X 2011-01-21 11:23:19 -08:00
Sam Lantinga
3f8169298d You can't have an empty union in the structure... 2011-01-20 18:09:55 -08:00
Sam Lantinga
08ad787807 Fixed bug #925
Changed "win32" to "windows"
2011-01-20 18:04:05 -08:00
Sam Lantinga
3fdc01d097 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
Sam Lantinga
3684c60e0c 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
ed1f29af7d PS3 Linux is no more... 2011-01-19 22:25:40 -08:00
Sam Lantinga
05e196a519 Nobody has stepped up to maintain an svgalib driver. Bye bye! :) 2011-01-19 22:21:31 -08:00
Sam Lantinga
8fb4ff28fb Nobody has stepped up to maintain a framebuffer console driver. Bye bye! :) 2011-01-19 22:18:45 -08:00
Sam Lantinga
4c63689825 Fixed using the native iconv library 2011-01-19 15:28:01 -08:00
Sam Lantinga
32ac172d1a 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
1a141df371 SDL_atomic.h is safe to include in the main header now. 2011-01-17 14:08:00 -08:00
Sam Lantinga
2a3a996219 Fixed compiler warnings using Windows intrinsics 2011-01-17 14:07:15 -08:00
Sam Lantinga
f5bbe15139 Fixed compiler error 2011-01-17 14:05:14 -08:00
Sam Lantinga
f7788bbb12 Use compiler intrinsics, where available 2011-01-17 13:53:31 -08:00
Sam Lantinga
a4445e1512 Use the portable intrinsic 2011-01-17 13:52:40 -08:00
Sam Lantinga
9017f24006 Minor documentation consistency cleanup 2011-01-17 09:09:15 -08:00
Sam Lantinga
c94b5b6866 Include windows.h in SDL_atomic.h by default, but don't include the atomic API in SDL.h
This allows all SDL code to take advantage of the atomic intrinsics on Windows, but doesn't cause applications just including SDL.h to pull in windows.h
2011-01-16 17:45:42 -08:00
Sam Lantinga
4c5bf24ecb Don't hose code that isn't expecting a windows include 2011-01-16 15:31:09 -08:00
Sam Lantinga
89d48a0f83 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Changed the CAS return value to bool, so it's efficient with OSAtomicCompareAndSwap32Barrier()
Added an atomic test adapted from code by Michael Davidsaver
2011-01-16 15:16:39 -08:00
Sam Lantinga
38e31e4598 Updated the atomic API for better use cases 2011-01-15 12:41:59 -08:00
Sam Lantinga
890680f51e Added some missing config for the iPhone 2011-01-15 12:34:43 -08:00
Sam Lantinga
be09e4e9a0 Added some missing pixel formats and SDL_GetPixelFormatName() 2011-01-12 14:53:23 -08:00
Sam Lantinga
036154b8c0 Fixed spacing in comments 2011-01-12 11:55:02 -08:00
Sam Lantinga
15e43076a4 Updated headers to match wiki documentation 2011-01-12 09:47:33 -08:00
Sam Lantinga
6da7a17174 Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf. 2011-01-06 16:11:21 -08:00
Sam Lantinga
49a4522f6f Fixed 2D video on Android
There was a dummy renderer left in there which was overriding the OpenGL ES renderer.
2011-01-04 20:36:39 -08:00
Sam Lantinga
6c961a2344 Android needs the SDL_main() redirect as well 2011-01-04 11:39:04 -08:00
Sam Lantinga
c4f1a0abd3 Added the Android config include to the default config.h 2011-01-04 11:07:27 -08:00
Sam Lantinga
cead9cf66b The source rectangle isn't modified in SDL_UpperBlit 2011-01-04 10:19:24 -08:00
Sam Lantinga
1fb3692730 Use a typedef instead of a #define, to handle syntax like: SDL_TextureID a, b 2011-01-01 19:46:36 -08:00
Sam Lantinga
80b28b58d8 Android has atan() and atan2() 2011-01-01 16:56:54 -08:00
Sam Lantinga
d6eac2c481 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Sam Lantinga
191d2b4366 Removed support for 10.3.9
Fixed building on Mac OS X 10.5
2010-12-01 12:23:16 -08:00
Sam Lantinga
fb97826021 Don't conflict with glext.h if it's already been included 2010-12-01 12:02:52 -08:00
Andreas Schiffler
b9e9c91a70 Fix incorrect shape include and add HAVE_ATAN and HAVE_ATAN2 for OSX builds.
--
user: Andreas Schiffler <aschiffler@ferzkopp.net>
branch 'default'
changed include/SDL_config_macosx.h
changed src/video/cocoa/SDL_cocoashape.m
2010-11-16 07:03:26 -08:00
Sam Lantinga
0fe9b68cc0 Documentation clarification 2010-09-29 21:24:50 -07:00
Sam Lantinga
276bfeac6c Make the union nameless to reduce the complexity of the API.
(Are there any compilers still in use that don't support this?)
2010-09-29 21:13:52 -07:00
Sam Lantinga
bf43df8ba5 Merged the Windows custom window system hooks into the union used by X11.
Added Cocoa custom window system hooks
2010-09-27 01:24:05 -07:00
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
Sam Lantinga
a4fa98c9b0 Fixed bug #464
Added X1/X2 button constants
2007-12-29 06:09:25 +00:00
Sam Lantinga
ea72f5eaf6 Merged revision 3458 from SDL 1.2, fixed Borland C alloca() prototype 2007-12-28 08:07:57 +00:00
Ryan C. Gordon
0e7872fd7d Merged r3449:3450 from branches/SDL-1.2: SDL_config.h.in Linux joystick fix. 2007-09-25 10:01:10 +00:00
Sam Lantinga
4f2f07efff Split out the SDL_rect and SDL_surface functions into their own headers.
Removed unused count from the dirty rect list.
2007-09-10 12:20:02 +00:00
Ryan C. Gordon
76eb0e6b90 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Fixes Bugzilla #439.
2007-08-20 01:02:37 +00:00
Sam Lantinga
7b145f5ad0 Date: Thu, 05 Jul 2007 14:02:33 -0700
From: Sam Lantinga
Subject: SDL 1.3 keyboard plan

After lots of discussion with Christian, this is what we came up with:

> So, to sum up...
> SDLK_* become the physical keys, starting at > (1<<21)
> We create a macro SDLK_INDEX(X)
> We have two functions SDL_GetLayoutKey(SDLKey) and SDL_GetKeyName()
> SDL_GetLayoutKey maps to UCS4 for printable characters, and SDLK* for
  non-printable characters
> and does so based on the OS's current keyboard layout
> SDL_GetKeyName() handles both SDLK_* and UCS4, converting UCS4 to UTF-8 and
  converting SDLK_* into our names, which are UTF-8 for printable characters.
> WASD folks use SDLK_*, and 'I' folks use SDL_GetLayoutKey(SDLK_*)

Here is the patch he came up with, and his e-mail about it:

Date: Fri, 17 Aug 2007 19:50:28 +0200
From: Christian Walther
Subject: Re: SDL 1.3 keyboard plan

> Sounds great, go ahead and send me a patch.

Here goes! Thanks for having a look. Don't hesitate to comment if
anything does not conform to your ideas.

One caveat: Committing this now may break compilability of some video
drivers - specifically, if they use any of the SDLK_* codes that were
obsoleted and moved into SDL_compat.h. I only tried Cocoa (which did
break, but is already fixed) and X11 (which didn't, but then its key
handling is #iffed out). If that's a problem, it may need to go into
a branch.

  -Christian
2007-08-19 14:52:52 +00:00
Sam Lantinga
b9d3d66bfb Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
Sam Lantinga
73cc09fedb More work in progress integrating SDL_Surface and the new SDL_Texture API 2007-08-18 01:44:21 +00:00
Sam Lantinga
65b59716be Moved the colorkey and per-surface alpha into the blit info,
in preparation for support for general color channel modulation.

Removed and consolidated some data in the blit info.
2007-08-17 00:54:53 +00:00
Sam Lantinga
fc16af50b2 Removed hermes since it's LGPL and not compatible with a commercial license.
Prepping for using MMX and SSE intrinsics instead of inline assembly.
.. except for memcpy equivalents which only get faster if they can
   exploit the parallelism of loading into multiple SIMD registers. :)
2007-08-15 08:21:10 +00:00
Sam Lantinga
62a3c00b46 Date: Wed, 15 Aug 2007 01:08:38 +0200
From: Couriersud
Subject: Some SDL1.3 patches

fixed a compiler warning
2007-08-15 03:20:55 +00:00
Sam Lantinga
16792e5ed3 Emphasized the separation between SDL_Surface and SDL_Texture
- SDL_Surface is a system memory representation of pixel data
 - SDL_Texture is a video memory representation of pixel data

The concept of SDL_Surface with SDL_HWSURFACE is no longer used.

Separated SDL_Texture types by usage rather than memory type
 - SDL_TEXTUREACCESS_STATIC is for rarely changed pixel data,
   can be placed in video memory.
 - SDL_TEXTUREACCESS_STREAMING is for frequently changing pixel
   data, usually placed in system memory or AGP memory.

Optimized the SDL_compat usage of the OpenGL renderer by only
using one copy of the framebuffer instead of two.
2007-08-11 20:54:31 +00:00
Sam Lantinga
5c79673fa0 Fixed bug #467
Remove trailing commas from enums
2007-07-22 13:22:47 +00:00
Sam Lantinga
7f9e338fe8 Fixed bug #460
Added SDL_VIDEO_OPENGL_CGL to the default Mac OS X config file.
2007-07-16 14:19:47 +00:00
Sam Lantinga
0527f061ac Warn Visual C++ users if they have a stale configure generated SDL_config.h 2007-07-12 03:14:49 +00:00
Sam Lantinga
f1a7210ec4 Oh yeah, they're boolean values... 2007-07-10 05:29:56 +00:00
Sam Lantinga
4148b45eb1 Updated to use size_t instead of int for amounts of data. 2007-07-10 05:25:19 +00:00
Sam Lantinga
dc327d9d79 Merged read-ahead support for Win32 file I/O from SDL 1.2 revision 3183 2007-07-10 05:01:22 +00:00
Sam Lantinga
e9a87fd5e2 Fixed bug #451
SDL_memset4 copies a 32-bit value, not an 8-bit value.
2007-07-08 14:24:55 +00:00
Sam Lantinga
581076f3aa Reverted mousewheel support in 1.2, since it breaks binary compatibility. 2007-07-06 13:45:10 +00:00
Sam Lantinga
49c02d670f Fixed bug #382
Added horizontal scrolling support
2007-07-06 09:22:18 +00:00
Sam Lantinga
bdab6824fd Fix for bug #447 merged from SDL 1.2 2007-07-04 08:01:04 +00:00
Sam Lantinga
c123a18337 Fixed bug #349
Solaris doesn't support the LATIN1 character set alias.

Merged from 1.2 svn revision 3133f
2007-07-04 07:08:16 +00:00
Ryan C. Gordon
8ed68c97b0 Patched to compile (missing #endif from a mismerge). Thanks to Peter Mackay
for pointing it out.
2007-06-29 11:08:53 +00:00
Sam Lantinga
9822c65fd8 Merge iconv const changes from 1.2
I'm not entirely happy with them.  Maybe the right way to go is to leave
SDL_iconv() taking a non-const inbuf?  How often are we converting const
strings anyway?
2007-06-28 06:57:08 +00:00
Ryan C. Gordon
71f0c038e0 Fixed previous VC6 patch. 2007-06-21 18:50:00 +00:00
Ryan C. Gordon
65d8a6d38f Merged r3094:3095 from branches/SDL-1.2: Visual C++ 6.0 fixes. 2007-06-21 18:21:49 +00:00
Bob Pendleton
613ad2c0d5 Added a WindowID to the user event and cleaned up a little bit of formating 2007-06-20 00:01:04 +00:00
Sam Lantinga
2fca78dd3e Key repeat is handled by the OS, since text input is now decoupled from physical key events. 2007-06-16 15:32:04 +00:00
Ryan C. Gordon
04d6e513a9 Removed EPOC port from the 1.3 branch. 2007-06-15 15:54:07 +00:00
Ryan C. Gordon
43feb9f42f Merged r3075:3076 from branches/SDL-1.2: Careful with __inline__ #define. 2007-06-15 07:21:01 +00:00
Sam Lantinga
b6ab6bf6d5 make indent 2007-06-14 13:21:29 +00:00
Ryan C. Gordon
f7db77be6a Merged r3037:3038 from branches/SDL-1.2: Mac OS X memcpy/memset selection. 2007-06-03 08:39:23 +00:00
Ryan C. Gordon
3855f51eff Merged r3007:3008 from branches/SDL-1.2: MapRGB/MapRGBA const correctness. 2007-04-04 09:43:53 +00:00
Ryan C. Gordon
bf91e03c10 Merge of r2554:2995 from branches/SDL-1.2: AvailabilityMacros.h for Mac OS X. 2007-03-27 00:39:03 +00:00
Ryan C. Gordon
929f8883e6 Merged r2981:2982 from branches/SDL-1.2: fbcon getpagesize() compile fix. 2007-02-15 23:57:07 +00:00
Ryan C. Gordon
f1ccde91dd Merged r2956:2957 from branches/SDL-1.2: Digital Mars stdint.h usage.
Fixes Bugzilla #376.
2007-02-12 11:46:08 +00:00
Ryan C. Gordon
1330f6b999 Merge r2918:2919 from 1.2 branch: alloca macro params in parentheses. 2006-11-29 10:34:05 +00:00
Ryan C. Gordon
b932761626 Fixed building of Windows waveout audio. 2006-11-11 06:48:57 +00:00
Ryan C. Gordon
b94f08253a Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
Sam Lantinga
c91d18d6ad indent is evil 2006-10-28 16:48:03 +00:00
Ryan C. Gordon
7f17eb8863 Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk. 2006-10-17 09:15:21 +00:00
Ryan C. Gordon
e475d47d2a Double Whoops. :P 2006-10-01 16:10:41 +00:00
Sam Lantinga
c7e5b9cf89 Whoops. :) 2006-10-01 16:07:32 +00:00
Sam Lantinga
9d4b500741 Formatting update 2006-09-24 15:56:55 +00:00
Sam Lantinga
b21b05ee5d Fixed bug #329
On tracing it turns out to fail from SDL_WM_SetCaption()

On going through the function it looks like the SDL_free() function is called
every alternate time with an invalid pointer that has already been freed.
2006-09-23 22:51:37 +00:00
Sam Lantinga
f105c474a1 Cleanup for the last checkin 2006-08-28 03:27:59 +00:00
Sam Lantinga
7462d2796b Added source color and alpha modulation support.
Added perl script to generate optimized render copy functions.
2006-08-28 03:17:39 +00:00
Ryan C. Gordon
1ee9fc8f50 Added SDL_SwapFloat* function/macros. Reference Bugzilla #293. 2006-08-24 12:49:59 +00:00
Ryan C. Gordon
2de95c23ba Forgot to check in updated SDL_audio.h ... 2006-08-24 12:48:16 +00:00
Sam Lantinga
dd630ba3e7 The GGI driver hasn't been maintained in 8 years. It's probably safe to remove. :) 2006-08-10 15:15:06 +00:00
Sam Lantinga
06a7b965e7 Missed a Qtopia change. 2006-08-10 14:55:45 +00:00
Sam Lantinga
4d17a22012 MacOS Classic is no longer supported. 2006-08-10 14:54:23 +00:00
Sam Lantinga
00de315a97 David Hedbor is no longer maintaining the Qtopia code. 2006-08-10 14:35:42 +00:00
Sam Lantinga
34b09cb9e1 Clarified the difference between render drivers and render contexts 2006-08-06 00:09:04 +00:00
Sam Lantinga
5559b37173 Updated header documentation 2006-08-05 22:41:33 +00:00
Sam Lantinga
b59f1d5aff In general, fill in pointers to structures, rather than return them. 2006-08-05 22:34:23 +00:00
Sam Lantinga
dac1c877d9 Removed old function 2006-08-05 17:12:22 +00:00
Sam Lantinga
5b0dc2c1d5 SDL constants are all uppercase. 2006-08-05 17:09:42 +00:00
Ryan C. Gordon
13894e5028 1.3 API proposals for audio subsystem. Nothing in here is guaranteed to
stay as-is! And none of it is implemented yet!

 Use at own risk!
2006-08-03 19:34:05 +00:00
Sam Lantinga
c6ca286be1 Added SDL_GetCurrentVideoDisplay() 2006-08-02 03:20:52 +00:00
Sam Lantinga
9617df5b60 Implemented Cocoa mouse wheel events 2006-07-29 22:42:48 +00:00
Sam Lantinga
453f45eaca Simplified driver window creation code.
Implemented several Cocoa window functions
2006-07-29 21:51:00 +00:00
Sam Lantinga
b27343c5db Implemented X11 OpenGL support.
Added support for the SDL_VIDEO_OPENGL environment variable.
2006-07-28 08:43:17 +00:00
Sam Lantinga
90bdbbe865 PicoGUI is no longer maintained by the author. 2006-07-26 03:55:56 +00:00
Sam Lantinga
8f13f6729b The AAlib driver is fun, but not worth rewriting for SDL 1.3 2006-07-26 03:24:27 +00:00
Sam Lantinga
74a48d3fd5 Hopefully glSDL has been superceded by the OpenGL render driver. 2006-07-26 03:12:05 +00:00
Sam Lantinga
b9c9f87e6d Removing DGA support for SDL 1.3 - it's still buggy years later, and now
it's deprecated by the developers in favor of the render APIs.
2006-07-26 03:06:07 +00:00
Sam Lantinga
bcbb41b25f Implemented OpenGL support on Mac OS X
The OpenGL renderer works without changes, yay! :)
2006-07-25 06:22:42 +00:00
Sam Lantinga
ab6710f259 The Mac OS X Cocoa video driver is under construction...
Note that SDLmain is no longer necessary on Mac OS X. :)
2006-07-23 09:11:10 +00:00
Sam Lantinga
f6948f99cb Added SDL_GL_ExtensionSupported()
Use GL_ARB_texture_rectangle in the OpenGL renderer, if supported.
2006-07-22 21:58:17 +00:00
Sam Lantinga
d533be8505 Convert SDL_malloc to SDL_calloc if appropriate, slightly faster on operating systems which map the zero page for memory allocations.
OpenGL renderer in progress
2006-07-22 08:33:18 +00:00
Sam Lantinga
dcd15904cd Added a test program framework for easy initialization.
Started work on multi-window OpenGL demo
2006-07-18 07:49:51 +00:00
Sam Lantinga
c71b106d69 Setting up the OpenGL support 2006-07-16 09:34:01 +00:00
Sam Lantinga
ed287169af Streamlined the API a bit and optimized the software renderer. 2006-07-15 09:46:36 +00:00
Sam Lantinga
0c86ca7a06 More of the Direct3D renderer is implemented, I'm not sure why it's not showing texture copies yet... 2006-07-14 06:40:53 +00:00
Sam Lantinga
f3567e6d90 Removed libc dependency on Windows again, to fix building with Visual C++ 2005 Express Edition.
Fixed performance problem with testsprite2 on the D3D driver.
2006-07-13 08:13:02 +00:00
Sam Lantinga
c1ff714652 Solved the performance problems by introducing the concept of a single-buffered
display, which is a fast path used for the whole-surface SDL 1.2 API.
Solved the flicker problems by implementing a backbuffer in the GDI renderer.

Unfortunately, now using the GDI renderer with a backbuffer and HBITMAPs is
significantly slower than SDL's surface code.  *sigh*
2006-07-12 06:39:26 +00:00
Sam Lantinga
6bc598ea61 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Sam Lantinga
5ffeed6e77 Updated the version to 1.2.11 2006-06-25 18:07:34 +00:00
Sam Lantinga
a3ab9747a9 2006-06-25 17:14:39 +00:00
Sam Lantinga
7e37690ca4 Fixed including stdint.h with gcc on Win32 2006-06-25 17:12:08 +00:00
Sam Lantinga
2e6c98ee3a Fixed bug #256 2006-06-21 07:35:02 +00:00
Sam Lantinga
61cc023f8a Moved DirectInput joystick code to 1.3 branch 2006-05-21 17:26:40 +00:00
Sam Lantinga
c0441f5cf0 Closed bug #74
Added DirectInput joystick code, contributed by Glenn Maynard.

This fixes a problem with the Windows Multimedia joystick driver
not showing all 6 axes on a GameCube controller converter, which
was donated by Jacob Kolding.
2006-05-21 16:47:41 +00:00
Sam Lantinga
0e9999cdab Fixed thread callback calling conventions, updated OS/2 DLL name to SDL12.dll 2006-05-17 18:57:04 +00:00
Sam Lantinga
530fd10d07 Fixed alloca declaration for MPW 2006-05-14 05:20:36 +00:00
Sam Lantinga
26a61f597c Hey, whaddy know! MacOS Classic has 64-bit types! 2006-05-13 16:30:59 +00:00
Sam Lantinga
b775d4c6b8 Fixed bug #221
The Carbon build on Mac OS X uses the toolbox video driver, not quartz.
2006-05-10 07:25:37 +00:00
Sam Lantinga
0083eea4ff Prevent both __MACOS__ and __MACOSX__ from being defined in Codewarrior 2006-05-10 07:08:41 +00:00
Sam Lantinga
01facc50f8 Fixed bug #218
Currently there are two Classic-only drivers defined in "SDL_config_macos.h",
and the ones in "SDL_config_macosx.h" are Mach-O/framework-only (i.e. not CFM)

As a workaround, I disabled CDROM and JOYSTICK when building SDL for CFM
Carbon.
2006-05-09 15:14:48 +00:00
Sam Lantinga
556a504e41 Fixed bug #203
Disable screensaver and DPMS blanking while SDL app is running.
2006-05-08 06:38:13 +00:00
Sam Lantinga
1195dd8133 Fixed bug #215
The current SVN trunk is missing the SDLCALL specifier at numerous locations.

It has to be added for all (possibly user provided) callbacks.

I stumbled over this while creating a makefile for the OpenWatcom compiler for
Win32.
2006-05-07 03:40:06 +00:00
Sam Lantinga
064511501d Patch from Dmitry Yakimov to fix building on WinCE 2006-05-03 04:11:38 +00:00
Sam Lantinga
7fdf065976 We want to wrap HAVE_ALLOCA_H, not HAVE_ALLOCA. :) 2006-04-30 08:57:02 +00:00
Ryan C. Gordon
4845d174e1 fatbuild fixes:
- A change to define CXX in fatbuild, which comforts the configure script a little, even if we don't use C++ anywhere.
- Some code to see how many CPU cores exist and parallelize make across them.
- CFLAGS that apply to both archs are specified seperately (-O3, -pipe, etc)
- -fvisibility=hidden for the gcc4 builds
- a "clean", "clean-ppc" and "clean-x86" command
- Fix to SDL_config_macosx.h for the HAVE_ALLOCA_H thing.

Now builds on an Intel Mac.
2006-04-27 11:18:03 +00:00
Sam Lantinga
bc35de2e30 Implemented bug #5
Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
2006-04-27 08:39:51 +00:00
Sam Lantinga
2a622cd891 Implemented bug #2, 117:
Date: Mon, 21 Mar 2005 12:06:14 +0100
From: Per Inge Mathisen
Subject: Re: [SDL] Outstanding patches?

The patch adds support for setting SDL_GL_SWAP_CONTROL to Windows and
X11. In Windows you can also query this enum to check that it is
working, or see what the default is - such functionality does not
exist in GLX. For more information on the standards implemented:
http://oss.sgi.com/projects/ogl-sample/registry/SGI/swap_control.txt
http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt
2006-04-27 07:59:16 +00:00
Sam Lantinga
60b9732963 subversion conversion complete! 2006-04-26 20:30:11 +00:00
Sam Lantinga
61cc027d1e Miscellaneous Mac OS X fixes 2006-04-17 03:34:28 +00:00
Sam Lantinga
4ffa1daabc Make sure code is only compiled if the appropriate subsystem is enabled 2006-04-14 04:46:47 +00:00
Sam Lantinga
1bae55e771 Fixed MacOS X and Solaris detection 2006-04-13 14:59:34 +00:00
Sam Lantinga
b062c353b4 Fixed bug #185
The SDL platform header shouldn't dictate the OS target API for other
applications.  The build system should define the target API for building
SDL internally.
2006-04-13 14:14:06 +00:00
Sam Lantinga
1374682c44 Fixed bug #176
[I'm fixing this for the public headers, but I'm not going to bother for the SDL library code (yet)]

To clarify: Normaly, GCC (or, to be precise, the preprocessor) will ignore
this, and compile the code happily. However, one can specify -Wundef to get a
warning about this.

One can probably argue whether to consider this a bug or not; but I think that
(a) from a semantic point of view, using "#if FOO" when FOO is not defined is
strange, and (b) since it is possible to trigger a warning about this, and a
trivial fix exists, it should be corrected.

I can think of two alternative patches, BTW:
1) Simply use #define HAVE_FOO 0, instead of not defining HAVE_FOO at all
2) Change
  #if HAVE_FOO
to
  #if HAVE_FOO+0
which always does the right thing.

But I think I still prefer the attached patch :-).
2006-04-13 13:38:40 +00:00
Sam Lantinga
b0519469db Fixes bug #195:
The proper name of Apple's operating system is "Mac OS X" not "MacOS X", as can
bee seen in many places, for example http://www.apple.com/macosx/). This
contrasts the naming of the old operating system, which was called "MacOS" and
today is often refered to as "MacOS Classic".

The attached patches fixes the misuse of the name "MacOS X" in both the SDL12
and sdlweb CVS modules.
2006-04-13 13:08:26 +00:00
Sam Lantinga
80c113cde7 From Anders F Bjorklund:
The current definition of int32_t, uint32_t, uintptr_t
doesn't match what the Mac system headers already have...

Since it's an old 16/32 bit platform, the system headers
expect the types to use "long" and not "int" like they do.
2006-04-12 14:38:47 +00:00
Sam Lantinga
150575a5cf From Anders F Bjorklund:
When switching to "UNIX-style paths" as needed for the new includes,
including <GL/gl.h> and <GL/glu.h> doesn't work anymore on Mac OS...

The two headers are really located in the OpenGL SDK 1.2 CFM like this:
OpenGL:Headers:gl.h
OpenGL:Headers:glu.h

There are also some compat copies, that *used* to work with Mac paths:
OpenGL:Headers:GL/gl.h
OpenGL:Headers:GL/glu.h

The easiest fix is to make SDL_opengl.h include the proper header names,
by adding a special case for the MACOS platform in addition to the MACOSX
2006-04-12 14:37:05 +00:00
Sam Lantinga
dcc7daa066 A less rude way of doing the same thing... 2006-03-23 21:55:13 +00:00
Sam Lantinga
07a8850934 These files should be included from SDL_config.h (so they get SDL_platform.h) 2006-03-23 21:52:47 +00:00
Sam Lantinga
e1ae9a0b81 Fixed bug #175
Removed obsolete .cvsignore files... whee!
2006-03-23 21:39:58 +00:00
Sam Lantinga
235cf60d67 *** empty log message *** 2006-03-23 21:39:02 +00:00
Sam Lantinga
967de2d3dd Fixed bug #171
SDL_config.h is no longer in CVS.  Instead, configure will generate it for
systems that use configure, and we always copy SDL_config.h.default to
SDL_config.h before generating a snapshot or release archive.

Also fixed a couple of uninstall issues.
2006-03-23 21:28:33 +00:00
Sam Lantinga
45d6790639 *sigh* 2006-03-23 15:22:40 +00:00
Ryan C. Gordon
21c1fa5e46 More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
break 6 other platforms.  :)
2006-03-23 08:43:37 +00:00
Sam Lantinga
5542688e36 Only use the visibility attribute in gcc 4.0 or newer 2006-03-23 07:34:03 +00:00
Ryan C. Gordon
b1bcd26c92 Xrandr support in the X11 target.
Fixes Bugzilla #109, and as a bonus, Bugzilla #145, too!
2006-03-22 11:13:58 +00:00
Ryan C. Gordon
aa2b3e6f26 Reverted SDL_config.h from accidental checkin. (see Bugzilla #171). 2006-03-22 05:12:07 +00:00
Ryan C. Gordon
eb3f189e59 Updated dynamic X11 code. See details in Bugzilla #170. 2006-03-22 05:00:59 +00:00
Sam Lantinga
d48c53fb8f Default to use the visibility attribute, on gcc (is this okay?) 2006-03-22 04:51:44 +00:00
Ryan C. Gordon
b08954dad5 Added support for gcc4's -fvisibility=hidden option.
Fixes Bugzilla #169.
2006-03-22 01:28:36 +00:00
Sam Lantinga
15e6a9aba3 *** empty log message *** 2006-03-21 09:40:01 +00:00
Sam Lantinga
2c5f72ddbf Good idea, renaming OpenBSD audio to BSD audio. 2006-03-21 09:33:54 +00:00
Sam Lantinga
7978390e19 Fixed bug #52
Integrated most of the NetBSD and DragonFly patches at:
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/patches/

Thanks to Thomas Klausner for defailed information on the patches
2006-03-21 08:54:50 +00:00
Sam Lantinga
e9e9f43bc0 Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
SDL_SetVideoMode() now accepts 0 for width or height and will use the current video mode (or the desktop mode if no mode has been set.)
2006-03-15 17:46:41 +00:00
Sam Lantinga
9491ae58df By default all the real targets have dummy audio/video and disk audio. 2006-03-14 16:19:32 +00:00
Ryan C. Gordon
58b18d03af Implemented dummy audio driver.
Fixes Bugzilla #161.
2006-03-14 08:53:33 +00:00
Sam Lantinga
b61fcd32f3 *** empty log message *** 2006-03-13 05:44:14 +00:00
Sam Lantinga
9e352303d7 Updated MacOS Classic build 2006-03-13 05:36:42 +00:00
Sam Lantinga
3227f8dde8 Added _strnicmp support 2006-03-13 02:12:39 +00:00
Sam Lantinga
2b03f1c722 Win32 fixes 2006-03-13 02:06:33 +00:00
Sam Lantinga
165dd0af40 Fixed bug #112
Added SDL_GetKeyRepeat()
2006-03-13 01:41:32 +00:00
Sam Lantinga
a50362ff8f Fixed bug #139
The text in SDL_WM_SetCaption() is in UTF-8 encoding.
2006-03-13 01:33:58 +00:00
Sam Lantinga
48c546dc44 Added UTF-8 <-> UTF-16 <-> UTF-32 <-> UCS-2 <-> UCS-4 conversion capability 2006-03-13 01:08:00 +00:00
Sam Lantinga
bba47a076b Fixes from Dmitry Yakimov:
fixed bugs 159 and 160:

+ added threaded timers support
! fixed restoring sdl window focus (AV in windows message handler)
! disabled forgotten cdrom and joystick in config file.
* disabled minimizing sdl window while loosing focus.
  PocketPC does not have a task bar, so it is an inconvenient and unusual
  behaviour for PPC users.
+ added WIN_Paint handler for GAPI
! fixed loosing focus while using GAPI videi driver

+ added TestTimer project
* removed unnecessary macros (ENABLE_WINDIB ...) from projects
2006-03-11 23:46:45 +00:00
Sam Lantinga
01ddf01384 X11 support isn't installed by default 2006-03-11 15:47:56 +00:00
Sam Lantinga
14c1061d01 Dynamic OpenGL loading is the default now. :) 2006-03-09 15:11:15 +00:00
Sam Lantinga
08dc55989c Prettified. :) 2006-03-09 13:34:58 +00:00
Sam Lantinga
5965120edc Eric is setting up X11 support for the XCode project 2006-03-09 13:25:43 +00:00
Sam Lantinga
887d7dce86 Cleaning up warnings on MacOS X 2006-03-09 06:33:21 +00:00
Sam Lantinga
339f03befc Added documentation on how to build a completely useless SDL library. :) 2006-03-08 08:30:17 +00:00
Sam Lantinga
18e8dad27d More Win64 updates 2006-03-07 05:21:32 +00:00
Sam Lantinga
007238280e Updated MacOS X support 2006-03-07 04:58:30 +00:00
Sam Lantinga
99a9f55744 Only use Altivec on PowerPC architecture 2006-03-06 19:20:38 +00:00
Sam Lantinga
eee9b381ab Get Microsoft's preprocessor symbols in there 2006-03-06 16:37:18 +00:00
Sam Lantinga
a745f33d22 Maybe it's easier to collect the big-endian architectures. :) 2006-03-06 16:33:23 +00:00
Sam Lantinga
a765c58124 Whoops, built without libC support - doh! 2006-03-06 15:29:41 +00:00
Sam Lantinga
0fa63c4bba Enabled libc support on Win32, so we don't break binary compatibility in 1.2 2006-03-06 07:42:36 +00:00
Sam Lantinga
d1d0afa53e Fixed declarations to match mingw includes 2006-03-06 06:00:45 +00:00
Sam Lantinga
e7a772f10b Added ARM and SH4 detection for WinCE development environment 2006-03-06 01:34:36 +00:00
Sam Lantinga
a2df95ca1b *** empty log message *** 2006-03-05 22:18:15 +00:00
Sam Lantinga
223544e90d Updated WinCE support by Dmitry (with some tweaks)
Converted the disk audio driver to SDL_RWops for portability
2006-03-04 08:24:35 +00:00
Sam Lantinga
f496c3b272 Updated for Dreamcast KOS June 2005 snapshot:
http://cadcdev.sourceforge.net/svn/snapshots/
http://gamedev.allusion.net/softprj/kos/dcsetup.php
2006-03-02 13:16:02 +00:00
Sam Lantinga
62c5e3a5d5 Fixed a bunch of 64-bit compatibility problems 2006-03-01 09:43:47 +00:00
Sam Lantinga
ec7cfdfea1 Date: Mon, 27 Feb 2006 17:01:43 +0100
From: "William Petiot [exoide]"
Subject: Re: [SDL] cvs version: standard win32 SDL.DLL file test [patch]

I found a bug or two in previous patch, so here is a patch to correct this.
2006-02-27 19:19:22 +00:00
Sam Lantinga
9850649e32 Removing unused Makefile.am files 2006-02-27 15:51:34 +00:00
Sam Lantinga
aa824dc1ea Did I mention I'm anal? :) Fixed spacing in SDL_rwops.h 2006-02-27 04:46:34 +00:00
Sam Lantinga
3d7fe80708 Prefer the raw Win32 API over stdio for file RWops 2006-02-27 04:16:44 +00:00
Sam Lantinga
a85789aa95 Date: Mon, 27 Feb 2006 02:17:29 +0100
From: "William Petiot [exoide]"
Subject: Re: [SDL] cvs version: questions regarding HAVE_STDIO_H in standard w

I managed to get a first implementation of it, which I tested for "simple" use
with tests sample apps, they work ok. I think this needs more tests.

Here is the diff against CVS/SDL12, attached.
2006-02-27 03:48:48 +00:00
Sam Lantinga
aaf71291d0 Updated OS/2 build, yay! 2006-02-26 19:30:21 +00:00
Sam Lantinga
2861771aa5 SDL_windows.h is no longer necessary 2006-02-25 22:18:25 +00:00
Sam Lantinga
c70756d256 *** empty log message *** 2006-02-25 18:52:36 +00:00
Sam Lantinga
5146610dc6 Update for Visual C++ 6.0 2006-02-24 18:24:57 +00:00
Sam Lantinga
19ea2b958d Updated with MrC includes and function definitions 2006-02-24 17:03:06 +00:00
Sam Lantinga
911e5db87e *** empty log message *** 2006-02-24 10:23:49 +00:00
Sam Lantinga
dead618337 Hmm, how am I going to keep from committing bad versions of this? 2006-02-24 09:58:03 +00:00
Sam Lantinga
7e11ec69f9 Updated MacOS Classic MPW build 2006-02-24 09:57:14 +00:00
Sam Lantinga
b633882919 Updated for Visual Studio Express 2005 2006-02-24 08:17:28 +00:00
Sam Lantinga
026aec11d6 Added pre-configured versions of SDL_config.h for various platforms 2006-02-24 07:26:31 +00:00
Sam Lantinga
0230236dd4 *** empty log message *** 2006-02-21 09:14:58 +00:00
Sam Lantinga
190b425364 Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.
2006-02-21 08:46:50 +00:00
Sam Lantinga
35a29575fc NetBSD support 2006-02-20 03:57:03 +00:00
Sam Lantinga
eda62d8a77 On FreeBSD, alloca is defined in stdlib.h 2006-02-20 02:30:15 +00:00
Sam Lantinga
0ef73d9eae Use only safe string functions 2006-02-19 23:46:34 +00:00
Sam Lantinga
2c134486a9 Whoops 2006-02-19 06:02:57 +00:00
Sam Lantinga
1d5ee7e595 Doh! Bitten by search and replace. :) 2006-02-18 07:05:18 +00:00
Sam Lantinga
b4ce56d8b0 More fixes for building on BeOS 2006-02-18 06:51:00 +00:00
Sam Lantinga
49255e3fa6 Fixes for BeOS and Solaris builds 2006-02-17 08:43:23 +00:00
Sam Lantinga
f05187e232 New configure-based build system. Still work in progress, but much improved 2006-02-16 10:11:48 +00:00
Sam Lantinga
7eac789438 *** empty log message *** 2006-02-10 07:29:08 +00:00
Sam Lantinga
bcdfa07625 *** empty log message *** 2006-02-10 07:03:22 +00:00
Sam Lantinga
769424426d More header massaging... works great on Windows. ;-) 2006-02-10 06:48:43 +00:00
Sam Lantinga
438d1885a7 Whoops, need this. :) 2006-02-10 03:21:39 +00:00
Sam Lantinga
5022a01e6c *** empty log message *** 2006-02-10 03:19:02 +00:00
Sam Lantinga
c9070f53df *** empty log message *** 2006-02-10 03:00:38 +00:00
Sam Lantinga
20c4849e7e Fixed build problem with SDL_string.c
Officially deprecated SDL_byteorder.h, SDL_getenv.h and SDL_types.h
Moved endian-related SDL_rwops code into SDL_rwops.c
2006-02-09 09:38:05 +00:00
Sam Lantinga
8df54cd371 Started the process of improving configure support, and merging C types
and library support into a single header.
2006-02-09 09:07:13 +00:00
Sam Lantinga
35665a2a6c Disable freaking autoheader. :) 2006-02-09 05:46:55 +00:00
Sam Lantinga
46a48c3887 Check for strtod 2006-02-08 09:06:34 +00:00
Sam Lantinga
05f9cca4a3 Default to build SDL without MSVCRT 2006-02-08 08:55:33 +00:00
Sam Lantinga
b0e5472b68 Fixes for Visual C++ 6.0 2006-02-07 18:36:54 +00:00
Sam Lantinga
d72a9898ed Configure dynamically generates SDL_config.h
I'm still wrestling with autoheader, but this should work for now...
Fixed lots of build problems with C library support disabled
2006-02-07 12:11:33 +00:00
Sam Lantinga
02cc6c0f11 Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
2006-02-07 06:59:48 +00:00
Sam Lantinga
b9704a2004 SDL_config.h will eventually be a general feature set test,
which will be useful for any program built with SDL on a given platform.
2006-02-06 17:28:04 +00:00
Sam Lantinga
f62242e296 A few fixes to get this building on Linux again 2006-02-06 08:46:14 +00:00
Sam Lantinga
82bfaee73a It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
2006-02-06 08:28:51 +00:00
Sam Lantinga
808a16717c Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.
2006-02-01 06:32:25 +00:00
Sam Lantinga
e3e00a7abd Oops 2006-01-31 01:16:21 +00:00
Sam Lantinga
99fbd97a6a *** empty log message *** 2006-01-30 13:32:31 +00:00
Sam Lantinga
f8d589d4aa Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
From: ville
Subject: [SDL] Changing, at least some, anonymous enums to named enums.

Howdy,

Could, some if not all, enums be named rather than being anonymous enums?
I ran into troubles with the enum describing event types in SDL_events.h.
The problem is that an anonymous enum cannot be used in C++ templates like
so:

enum { C };

template< typename T >
void
f( T ) {
}


f( C );
2006-01-29 23:14:04 +00:00
Sam Lantinga
5734de0a4a *** empty log message *** 2006-01-27 08:47:15 +00:00
Sam Lantinga
5d587ee484 Use Win32 API for putenv/getenv to avoid C runtime conflicts 2006-01-26 06:06:56 +00:00
Sam Lantinga
7ce4dacee1 *** empty log message *** 2006-01-25 06:53:50 +00:00
Sam Lantinga
7f458450f5 Date: Thu, 19 Jan 2006 20:02:29 +0200
From: Vassilis Virvilis <vasvir@iit.demokritos.gr>
Subject: [SDL] Request: Please reconsider adding tag in SDL_Event

Hi,

Patch in question:

--- include/SDL_events.h        20 Aug 2004 18:57:01 -0000      1.11
+++ include/SDL_events.h        19 Jan 2006 17:35:09 -0000
@@ -214,7 +214,7 @@
  } SDL_SysWMEvent;

  /* General event structure */
-typedef union {
+typedef union SDL_Event {
         Uint8 type;
         SDL_ActiveEvent active;
         SDL_KeyboardEvent key;

Reasoning:
----------
1) Allows forward declaration of the SDL_Event union in C++. Please
note that in plain C it is possible to forward declare it.

2) Forward declaration is good because it allows encapsulation. It hides
the specific implementation and does not necessarily exposes SDL staff
to my appication's namespace

3) It can't harm plain C because tags are living in a different namespace
than typenames

4) It is already done like this in other places in SDL. Check for example
SDL_KeySym, and SDL_.*Event structures.

5) Right now I have to include SDL/event.h from a C++ header file. See 2)
2006-01-20 13:07:25 +00:00
Sam Lantinga
95cc21edfa Bumped the version number for the next release 2006-01-04 01:08:40 +00:00
Sam Lantinga
0c97a75a3c Updated to the latest glext.h 2005-12-14 05:55:17 +00:00
Ryan C. Gordon
406ef7dae9 OS/2 port!
This was mostly, if not entirely, written by "Doodle" and "Caetano":
    doodle@scenergy.dfmk.hu
    daniel@caetano.eng.br

--ryan.
2005-11-23 07:29:56 +00:00
Ryan C. Gordon
f5ab1fadd2 Added #include "SDL_loadso.h" to SDL.h. 2005-11-23 07:07:19 +00:00
Ryan C. Gordon
15788f684c Patch from Martin Lange (mala-sdl at hotmail.com) to unregister SDL's win32
windowclass when shutting down the video subsystem...this allows you to
 safely unload/reload the SDL shared library on Windows between
 initializations.

Discussion is here:
   http://www.devolution.com/pipermail/sdl/2005-February/067424.html
2005-09-27 09:00:42 +00:00
Ryan C. Gordon
205609abaf Byte order detection fixes in SDL_endian.h ...
--ryan.




From: Mike Frysinger <vapier@gentoo.org>
To: sdl@libsdl.org
Date: Thu, 1 Sep 2005 20:25:01 -0400
Subject: [SDL] [patch] add support for arm/thumb and superh to endian

find attached a patch to add support for detecting endian on superh and
arm/thumb ... also, ive incorporated a patch from Fedora which will gather
the correct endian on a linux host from the system endian.h instead of just
trying to maintain an ever-growing list of architectures
-mike
2005-09-08 06:49:20 +00:00
Ryan C. Gordon
41af118d8b The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]

I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.

The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:

export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib

It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)


Here are the new configure targets:
   --enable-video-cocoa    use Cocoa/Quartz video driver default=yes
   --enable-video-carbon   use Carbon/QuickDraw video driver default=yes
   --enable-video-x11	   use X11 video driver default=no

./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
	     --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)

If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.

I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?

And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.


Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch

--anders

PS. It says "video", but as usual it applies to mouse/keyboard too.


------


To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch

Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.

http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
2005-09-08 06:16:14 +00:00
Ryan C. Gordon
af505fdcfa Added some parentheses for a little more macro safety. Recommended by Petri
Kero, here: http://www.devolution.com/pipermail/sdl/2005-March/067630.html
2005-04-17 10:16:30 +00:00
Patrice Mandin
6eccd4db50 Optimize also for 68020 and higher CPUs 2005-03-30 12:38:03 +00:00
Sam Lantinga
f37d4736d9 Date: Wed, 26 Jan 2005 13:37:09 GMT
From: Peter Naulls
Subject: RISC OS SDL Patches

Sam, I've attached a diff of the latest changes to libSDL for RISC OS
support.  These changes are by Alan Buckley and myself.

The most significant of these are:

  Optimised assembler blit rountines - I've attached the file
   src/video/riscos/SDL_riscosASM.s which is needed for this.

  Move to using /dev/dsp instead of its own audio implementation.
  This means that src/audio/riscos/SDL_drenderer.c should be removed

  Typo fixes.  Mainly correct spelling of "RISC OS", but some from elsewhere
  too.
2005-02-12 18:01:31 +00:00
Sam Lantinga
e69d32a51d The fix is going back in. :) 2005-01-25 17:58:44 +00:00
Sam Lantinga
ec15ddd4df Date: Sun, 16 Jan 2005 19:20:15 +0100
From: Stephane Marchesin
To: Kirill Ponomarew
Subject: [SDL] Problem on x86_64 with latest CVS (Re: sdl12 with gcc-2.95)

>-I../../src -I../../src/main/freebsd -I../../src/audio
>-I../../src/video -I../../src/video/XFree86/extensions
>-I../../src/events -I../../src/joystick -I../../src/cdrom
>-I../../src/thread -I../../src/timer -I../../src/endian
>-I../../src/file -I../../src/thread -MT SDL_endian.lo -MD -MP -MF
>.deps/SDL_endian.Tpo -c SDL_endian.c  -fPIC -DPIC -o
>.libs/SDL_endian.o
>{standard input}: Assembler messages:
>{standard input}:144: Error: suffix or operands invalid for `xchg'
>*** Error code 1
>
That's a totally different problem. This was introduced in CVS 4 days ago :
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/include/SDL_endian.h.diff?r1=1.11\
&r2=1.12

Just revert this patch.
2005-01-18 18:40:48 +00:00
Sam Lantinga
3457abf6ba Fix various problems with the timer code.
* SDL_timer_running wasn't always updated correctly.
* Fixed occasional crash in SDL_SetTimer() when clearing threaded timers
* It was possible to get both the timer thread and event thread running
* Other misc. cleanup
2005-01-13 23:24:56 +00:00
Sam Lantinga
c2113a949a Select patches included from The NetBSD Package Collection (www.pkgsrc.org) 2005-01-12 06:04:48 +00:00
Sam Lantinga
aa6dff1be1 Avoid gcc parse errors on Win32. This is fine in general because gcc uses
the cdecl calling convention by default.
2005-01-08 23:13:01 +00:00
Sam Lantinga
859fb5acc1 Bumped the minor version number... 2005-01-04 19:06:23 +00:00
Sam Lantinga
2945171f09 Allow SDL to be loaded by Matlab 2005-01-02 05:11:16 +00:00
Sam Lantinga
3da2c5f3f9 Date: Fri, 31 Dec 2004 04:14:09 +0900
From: Hayashi Naoyuki
Subject: SDL patch for Tru64 UNIX 4.0X

SDL-1.2.8 support only Tru64 5.X.
This patch is for Tru64 UNIX 4.X.(tested on Tru64 UNIX 4.0G and 5.1B)

SDL-1.2.8/configure.in:
ld doesn't accept -pthread option.
cc -pthread has same effect as -D_REENTRANT when compiling,
and has same effect as -lpthread -lexc when linking.

SDL-1.2.8/include/begin_code.h:
Old Compaq C Compiler accept not inline but __inline.

SDL-1.2.8/src/audio/SDL_mixer_MMX.c:
SDL-1.2.8/src/audio/SDL_mixer_MMX.h:
Old Compaq C Compiler doesn't accept //.

SDL-1.2.8/src/cdrom/osf/SDL_syscdrom.c:
When becoming Tru64 v5.0 from Tru64 v4.0,
the arrangement of the cd-rom device was changed.
2005-01-02 05:05:21 +00:00
Sam Lantinga
61269ac1be Added a usage example for SDL_GetWMInfo() 2004-11-30 15:21:29 +00:00
Patrice Mandin
ae203664c1 Wrong size of parameters for SDL_Swap32 m68k assembly routine 2004-11-27 23:11:20 +00:00
Patrice Mandin
05034eabf2 Add m68k assembly routines for endianness conversion 2004-11-22 10:16:58 +00:00
Sam Lantinga
79bf0dcc6b Updated for Visual C++ 6 build 2004-11-15 23:34:56 +00:00
Sam Lantinga
a84d06317d Updated for Visual C++ 6 build 2004-11-15 23:30:07 +00:00
Sam Lantinga
3e6504ddd3 Date: Wed, 13 Oct 2004 17:00:58 -0500
From: Jonathan Atkins
Subject: [Fwd: Re: SDL_image on Solaris x86 help please]

apparently __i386__ is insufficient for Suns C Workshop compilers...
so a sun x86 user told me about this...and tested his own solution.
I think it wouldn't be a bad idea to add __i386 to the SDL_byteorder.h
so that it works for that compiler.
2004-11-12 22:09:17 +00:00
Sam Lantinga
a4ed545193 Use the canonical glext.h on MacOS X as well (#define NO_SDL_GLEXT if you don't want this) 2004-08-20 22:32:05 +00:00
Sam Lantinga
c6c5bee36f Date: Fri, 20 Aug 2004 08:31:20 +0200
From: "Markus F.X.J. Oberhumer"
Subject: [SDL-CVS][patch] add missing SDLCALL to headers

the small patch attached below (against current CVS) adds some missing SDLCALL
decorations to callback types and arguments.

Unfortunately one of these changes breaks your gen{def,exp}.pl scripts which
should be changed to use non-greedy regular expression matching...
2004-08-20 18:57:01 +00:00
Sam Lantinga
6149a658d4 *** empty log message *** 2004-07-21 04:53:26 +00:00
Sam Lantinga
08c158c94b Date: Mon, 3 May 2004 03:15:01 +0100
From: David Symmonds
Subject: SDL Typedef Structs

Hi, Thanks for the SDL libraries, I have been using them for about a year
now and they are really brilliant. One thing that I have just found whilst
using them through C++ (and needing forward declarations) is that when you
typedef structs you sometimes use

typedef struct Name
{
...
}Name;

e.g. SDL_Surface


and other times use

typedef struct
{
...
}Name;


e.g. SDL_Rect

The first type works fine, when I define a header file I can just put
'struct Name;' at the top and use the Name throughout. However, the second
type is harder to use in a header, and I haven't found a way yet, other than
to include 'SDL.h' in the header file (undesirable). Would there be any harm
in changing the definition of SDL_Rect and such like to the second form?
2004-07-18 22:57:40 +00:00
Sam Lantinga
bcd78b0748 Date: Mon, 28 Jun 2004 19:58:08 +0900
From: Hayashi Naoyuki
Subject: SDL_types.h - fix for Tru64 MME

The following two problems are fixed.
1. Type of Uint64 is "long long" in SDL_types.h,
   but is "long" in mmbasic.h(Tru64 UNIX MME header file).
2. Uint8, Uint16 and Uint32 are redefined
   if you compile a file including mmbasic.h and SDL_types.h.
2004-07-18 19:42:03 +00:00
Sam Lantinga
54d0c70c1e Date: Wed, 7 Jul 2004 12:57:58 +0200
From: "Markus F.X.J. Oberhumer"
Subject: [SDL-CVS] [patch] small fix for SDL_joystick.h

the tiny patch below (against current CVS) fixes a syntax error
(not allow compilers allow multiple __cdecl).
2004-07-18 19:05:06 +00:00
Sam Lantinga
327a62cd62 Increment version... 2004-04-23 14:00:08 +00:00
Sam Lantinga
3d4dbef0c5 Date: Wed, 3 Mar 2004 12:44:21 +0200
From: "Mike Gorchak"
Subject: Misc fixes again

I've added custom WM info for the QNX (same as generic for now), which allows to compile all applications, which included SDL_syswm.h directly, otherwise DISABLE_X11 appearing to be not defined and X11 info was used instead, which is wrong.
2004-03-04 05:41:57 +00:00
Sam Lantinga
743d10080e This works on MacOS X too. :) 2004-02-26 14:26:07 +00:00
Sam Lantinga
2838191e14 Added inline byte swapping code for other architectures 2004-02-23 06:09:21 +00:00
Sam Lantinga
cfeddcb5ca Avoid using kernel internal headers 2004-02-23 05:32:52 +00:00
Sam Lantinga
9e02d4aecb *** empty log message *** 2004-02-18 03:57:13 +00:00
Sam Lantinga
785e6c2328 Updated SDL_opengl.h to include the latest version of glext.h 2004-02-17 23:29:52 +00:00
Sam Lantinga
1ac8626346 Fixed bugs in CPU feature detection and added extended feature detection 2004-01-24 05:47:19 +00:00
Sam Lantinga
b01a5e306e Date: Tue, 6 Jan 2004 12:42:19 +0100
From: Max Horn
Subject: SDL_HasAltiVec; BUGS file

the attached patch adds SDL_HasAltiVec to SDL CVS. Note that at this
point, this only works on MacOSX (and maybe darwin). I don't know how
to properly add a test for e.g. Linux/PPC at this point. I found an
email which might help in doing so:
http://zebra.fh-weingarten.de/~maxi/html/mplayer-dev-eng/2003-01msg00783.html
However, since I have no way to test on a non-OSX PowerPC system, I am
not comfortable blindly adding such code... I just hope that if
somebody from the Linux/PPC (or FreeBSD/PPC, or whatever) community
notices this, they'll jump up and provide a patch for us ;-)
2004-01-06 17:18:38 +00:00
Sam Lantinga
32719e7429 Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
Sam Lantinga
d8a58193ae Added function to create RWops from const memory: SDL_RWFromConstMem() 2004-01-04 15:18:08 +00:00
Sam Lantinga
4f535a0ef2 Greatly simplified the SDL CPU info code 2003-11-24 09:16:52 +00:00
Sam Lantinga
9981325fda Added SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE() in SDL_cpuinfo.h 2003-11-18 01:27:06 +00:00
Sam Lantinga
7a8a6549fb *** empty log message *** 2003-09-28 18:31:07 +00:00
Sam Lantinga
5be74a63a4 Update SDL version 2003-09-05 15:19:14 +00:00
Sam Lantinga
6e96b51fbd *** empty log message *** 2003-08-06 20:12:00 +00:00
Sam Lantinga
84b6daaaa8 *** empty log message *** 2003-07-27 17:00:40 +00:00
Sam Lantinga
7777531c48 Merged in Ryan's multisample code for MacOS, and changed the constants to match. 2003-07-22 15:33:28 +00:00
Sam Lantinga
19ffa849ea Date: Thu, 24 Apr 2003 15:13:47 -0400
From: Shawn Kirst
Subject: SDL-1.2.5 patch to add ARB_multisample support

Attached is a patch I have written for SDL-1.2.5 that adds ARB_multisample
support.  I only have the X11 and Win32 video patched.  The Win32 patch also
adds support for WGL_ARB_pixel_format, as it was required for getting a
multisample capable pixel format.  No additional GL header files are required
to compile on either platform (though you need an up-to-date glx.h for X11).

Requesting a multisample pixel format is made possible using
SDL_GL_SetAttribute with the two new SDL_GLattr's I've added
(SDL_GL_SAMPLE_BUFFERS and SDL_GL_SAMPLES).  I've been using SDL in my
projects for quite a while now, so I am happy to contribute back to the
project.  Now you can have and control FSAA in your SDL/GL apps at the
application level!
2003-07-22 15:10:06 +00:00
Sam Lantinga
4b88b12551 Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!) 2003-07-22 14:01:21 +00:00
Sam Lantinga
91f6dc0a37 *** empty log message *** 2003-07-22 04:50:38 +00:00
Sam Lantinga
8ad5715b0b Added some notes from the benefit of my experience. :) 2003-07-10 07:56:19 +00:00
Sam Lantinga
5f885f7e0e Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs 2003-07-10 07:46:19 +00:00
Sam Lantinga
20f2cf5c6d I'm American, does it show? ;-) 2003-06-28 17:39:46 +00:00
Sam Lantinga
034f135e5e *** empty log message *** 2003-06-28 17:03:57 +00:00
Sam Lantinga
041169aa8b Added initial support for RISC OS (thanks Peter Naulls!) 2003-05-29 04:44:13 +00:00
Sam Lantinga
581b7ebd1a *** empty log message *** 2003-02-26 07:27:32 +00:00
Sam Lantinga
9abb04139f Fixed header docs for the joystick hat position 2003-01-21 05:33:34 +00:00
Sam Lantinga
9d462a34f7 Turn on enums always ints for CodeWarrior (thanks Darrell!) 2002-10-22 21:35:49 +00:00
Ryan C. Gordon
f5c21170db Added check for AMD x86-64 ("Hammer") architecture in byte order determination. 2002-10-14 05:05:04 +00:00
Sam Lantinga
fd1c7f246f Bumped version to 1.2.6 in CVS 2002-10-08 15:34:19 +00:00
Sam Lantinga
518dfadc59 Date: Sat, 24 Aug 2002 22:20:01 -0600
From: "Greg Haerr"
Subject: Announce: sdl-nanox-patch

Sam,
    I've created an update patch for enhanced Nano-X support
with SDL.  I've created the patch against SDL-1.2.4.  I'd appreciate
it if you would apply it to the next SDL version.

Enhancements include:

1. Small bugfixes to compile without errors
2. Support for direct client-side framebuffer access with configure option
3. Add dynamic pixel type support for hardware framebuffer; eliminating the
need for compile-time configuration option.

I've updated the README.NanoX file with the details.

This version has been tested with Microwindows v0.89pre9 CVS
and SMPEG 0.4.4.  I've added multi-threading support to
Microwindows to support the multi-threaded SMPEG, and
all works fine.  To turn on thread safety in Microwindows,
use THREADSAFE=Y in the Microwindows config file.

Thanks!

Regards,

Greg
Founder, The Microwindows Project
http://microwindows.org
2002-08-25 06:21:49 +00:00
Sam Lantinga
09f9210a94 Added compile-time checking for the size of enums to SDL_types.h 2002-08-21 04:16:31 +00:00
Sam Lantinga
8cbbab0b2e Updated for embedded Visual C++ 4.0 2002-08-20 00:20:06 +00:00
Sam Lantinga
51ae701fe9 Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5) 2002-08-19 18:09:44 +00:00
Sam Lantinga
7fabbe8198 Added SDL_GL_STEREO for stereoscopic OpenGL contexts 2002-08-19 17:58:08 +00:00
Sam Lantinga
3f1fccba2b Added a way to get the Windows OpenGL context in SDL_syswm.h 2002-08-17 17:49:27 +00:00
Sam Lantinga
9212a4cc0e *** empty log message *** 2002-08-01 23:08:41 +00:00
Sam Lantinga
6b2eaa78f8 Fixed SDL_DisplayFormatAlpha() on RGB surfaces with alpha 2002-08-01 23:06:39 +00:00
Sam Lantinga
4ce49cabec *** empty log message *** 2002-06-13 23:59:20 +00:00
Sam Lantinga
635f1ceff9 Added David Hedbor's Qtopia patches 2002-05-19 20:06:01 +00:00
Sam Lantinga
eddc216018 Bump the version, so that it isn't forotten later. :) 2002-04-14 21:51:25 +00:00
Sam Lantinga
a6a5824013 Fixed precompiled headers on MacOS X 2002-04-13 20:33:15 +00:00
Sam Lantinga
8b5bf373be Explicitly specify the SDL API calling convention (C by default) 2002-04-11 14:35:16 +00:00
Sam Lantinga
28ba5faef1 Used the glext.h from the SGI sample implementation 2002-03-20 02:37:38 +00:00
Sam Lantinga
df4885048e Updated copyright information for 2002 2002-03-06 11:23:08 +00:00
Sam Lantinga
eba3a46432 Removed the API changes to preserve SDL 1.2 stability 2002-03-06 11:05:47 +00:00
Sam Lantinga
663bb62fb6 Added a new header file: SDL_loadso.h
It contains the following functions:
	SDL_LoadObject(), SDL_LoadFunction(), SDL_UnloadObject()
The UNIX esd and arts audio code use these to dynamically load
their respective audio libraries.
2002-03-06 05:20:11 +00:00
Sam Lantinga
1b3daf84e9 *** empty log message *** 2002-03-05 23:19:37 +00:00
Sam Lantinga
393bef31ab Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
2002-03-05 19:55:32 +00:00
Sam Lantinga
d7055457fd Updated for Watcom C++ and LCC compilers 2002-02-28 00:28:26 +00:00
Sam Lantinga
c512571a8a Updated the documentation for the SDL_PushEvent() call. 2002-02-13 23:40:13 +00:00
Sam Lantinga
17066571f5 David Snopek added Borland compiler support 2002-02-13 17:45:24 +00:00
Sam Lantinga
ee5e74f984 Updated the headers with the correct e-mail address 2001-12-14 12:37:47 +00:00
Sam Lantinga
e58898392c Added support for Xi Graphics XME fullscreen extension 2001-11-22 04:55:38 +00:00
Sam Lantinga
e051533592 Bump the version number on the library 2001-11-22 03:47:16 +00:00
Sam Lantinga
312bc6134c Added platform independent OpenGL header - SDL_opengl.h 2001-10-25 05:37:32 +00:00
Sam Lantinga
5fe3927733 *** empty log message *** 2001-09-23 21:10:30 +00:00
Sam Lantinga
0f2a87f53f Date: Thu, 13 Sep 2001 14:14:42 -0400
From: "David Chait" <davebytes@hotmail.com>
Subject: sdlmods.zip
-- Message: 502   --  Next: 503 N --------------------------------------------

now bracketed with (MWERKS && macintosh), so it'll work under metrowerks under any kind of mac build.  Project Builder probably uses pack properly as it is GCC under the covers, so not worrying about it... :)

it sets packing to 68K 4-byte alignment, and turns on enumsalwaysint.  resets them both to project defaults when done.  note that if a project sets these things in a header and expects the settings to last throughout a C file (which is a nasty thing to do), it won't work.  I think there's an overall-state push/pop system, but it's a deprecated interface so I'm loathe to use it...
2001-09-23 18:10:59 +00:00
Sam Lantinga
7d70d64940 *** empty log message *** 2001-09-23 17:39:30 +00:00
Sam Lantinga
c69f4ac23b *** empty log message *** 2001-09-23 16:53:51 +00:00
Sam Lantinga
242df18e66 Added the Undo key for the Atari keyboard 2001-09-14 04:33:01 +00:00
Sam Lantinga
c0412c2a37 Added initial support for EPOC/Symbian OS (thanks Hannu!) 2001-09-11 20:38:49 +00:00
Sam Lantinga
e51e5b7d1e Fixed Solaris nitpicks (thanks Mattias!) 2001-09-04 22:48:09 +00:00
Sam Lantinga
463048fb03 Fixed compile errors and added call to SDL_SetModuleHandle() in WinMain() 2001-08-09 14:04:46 +00:00
Sam Lantinga
7fcbb74492 Applied David MacCormack's patch to fix SDL_WINDOWID on Windows,
and added a function to cache the application handle so DirectInput
still works properly.
2001-08-09 12:21:32 +00:00
Sam Lantinga
721e17ba34 The rectangle argument to SDL_SetClipRect is really const 2001-07-31 05:36:10 +00:00
Sam Lantinga
9df4088b9a Bump version to 1.2.3 2001-07-31 00:13:03 +00:00
Sam Lantinga
59b840a340 Cleaned up the OpenBSD port, thanks to Peter Valchev 2001-07-08 09:00:06 +00:00
Sam Lantinga
19f269fa22 Added support for Visual C++ inline keyword 2001-07-02 00:10:19 +00:00
Sam Lantinga
eedd896cb4 Bumped the library version 2001-06-19 13:35:05 +00:00
Sam Lantinga
3cbdc6b721 Added initial support for Quartz video (thanks Darrell!) 2001-06-07 14:28:11 +00:00
Sam Lantinga
bca6dd54b8 Reverted ENABLE_X11 patch - FIXME, this needs a better solution in the future. 2001-05-22 05:05:16 +00:00
Sam Lantinga
33d0e09bf7 Added initial support for Nano-X (thanks Hsieh-Fu!) 2001-05-11 01:13:35 +00:00
Sam Lantinga
143d6388ee Fixed endian detection on IA64 architectures (thanks Bill!) 2001-05-10 20:25:51 +00:00
Sam Lantinga
ffae27155e Changes since SDL 1.2.0 release 2001-04-26 16:50:19 +00:00
Sam Lantinga
5d2015c741 Initial revision 2001-04-26 16:45:43 +00:00
Philipp Wiesemann
b1242be50b Fixed typo in header comment. 2014-05-18 21:05:39 +02:00
Philipp Wiesemann
9227317d4d Fixed typo in header comment. 2014-05-11 15:59:22 +02:00
Gabriel Jacobo
7c86f42a25 Include gl2platform.h in SDL_opengles2.h so we play nice with GLEW.
Based on feedback from Sven Bergström
2014-05-10 17:00:37 -03:00
Dimitris Zenios
8adc9938a4 __ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK. 2014-05-05 22:21:26 +03:00
Ryan C. Gordon
a256776578 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Ryan C. Gordon
df87f9051a Removed comma at end of enum in a public header, to make -Wpedantic happy. 2014-04-29 12:00:28 -04:00
Sam Lantinga
fb78141616 Fixed bug 2508 - don't redefine WIN32_LEAN_AND_MEAN 2014-04-26 12:38:35 -07:00
Brandon Schaefer
ad8ea09710 Revert MIR_CFLAGS to SDL_CFLAGS. Use forward declaration for the real fix. (We shouldn't expose mir headers!) 2014-04-21 12:42:25 -07:00
Jørgen P. Tjernø
4d68f8c53e Render: Allow empty cliprect.
This fixes an issue where an empty cliprect is treated the same as a NULL
cliprect, causing the render backends to disable clipping.

Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to
differentiate between:
 - SDL_RenderSetClipRect(render, NULL)
 - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r);

Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504
2014-04-19 13:15:41 -07:00
Sam Lantinga
737576d21c SDL_DXGIGetOutputInfo() checks input parameters and returns a boolean value whether or not it succeeded. 2014-04-18 12:43:04 -07:00
Dimitris Zenios
07d07b460e Enable building of Android libraries using a standalone NDK 2014-04-06 00:30:48 +03:00