Commit Graph

1824 Commits

Author SHA1 Message Date
Sam Lantinga
5ea99603f1 Sort by HID usage, which makes more sense and is more cross-platform 2008-11-08 07:34:21 +00:00
Sam Lantinga
3cd42cfe35 2008-10-18 03:21:32 +00:00
Edgar Simo
ada44e87d4 Fixed compilation on mingw32. 2008-10-14 18:28:28 +00:00
Sam Lantinga
ab3c4fb876 Added missing math.h functionality for SDL_audiocvt.c 2008-10-12 16:30:42 +00:00
Sam Lantinga
24fa5e3a47 Don't include <math.h> when HAVE_MATH_H isn't defined 2008-10-12 16:21:36 +00:00
Sam Lantinga
45df39c52c This can be static 2008-10-12 16:15:43 +00:00
Sam Lantinga
94879f84f3 Fixed memory leak in raw mouse input processing.
Corrected the mouse button indices.
2008-10-12 16:05:34 +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
Ryan C. Gordon
83e289b238 Removed zap_ptr hack from Bugzilla #602...it was incorrect.
(The actual bug was in SDL code removed from the 1.3 codebase.)
2008-09-15 20:48:51 +00:00
Sam Lantinga
258a2014c7 Almost got this compiling on Cygwin32, just needs DirectInput 7 2008-09-15 08:41:03 +00:00
Sam Lantinga
e6e45a547d Updated Visual C++ build 2008-09-15 07:34:36 +00:00
Sam Lantinga
6dfa39cc32 more more! 2008-09-15 06:49:23 +00:00
Sam Lantinga
e384f9cb8e Yet more math... 2008-09-15 06:48:41 +00:00
Sam Lantinga
80988b9d30 Whoops, missed a file... 2008-09-15 06:46:23 +00:00
Sam Lantinga
6e802db3f0 Expanded the libm support and put it into a separate directory. 2008-09-15 06:33:23 +00:00
Sam Lantinga
b94b3e7baa 2008-09-15 05:14:11 +00:00
Ryan C. Gordon
539aad42ea Merged r4087:4088 from branches/SDL-1.2: missing semicolon. 2008-09-15 05:09:45 +00:00
Sam Lantinga
458f7b5b0c indent 2008-09-15 04:32:36 +00:00
Sam Lantinga
c5c81ebf59 http://sources.redhat.com/ml/newlib/2002/msg00230.html
Stephen L Moshier wrote:
>
> pow(x,y) returns 0 when x is very close to -1.0 and y is very large.
> The following test program prints
>
> pow(1.0000000000000002e+00 4.5035996273704970e+15) = 2.7182818284590455e+00
> pow(-1.0000000000000002e+00 4.5035996273704970e+15) =0.0000000000000000e+00
> pow(9.9999999999999978e-01 4.5035996273704970e+15) = 3.6787944117144222e-01
> pow(-9.9999999999999978e-01 4.5035996273704970e+15) = 0.0000000000000000e+00
>
> which is incorrect for the negative arguments raised to an odd integer
> power.
>
> -----
> double pow (double, double);
>
> int
> main ()
> {
>   double x, y, z;
>
>   x = 1.0 + pow (2.0, -52.0);
>   y = 1.0 + pow (2.0, 52.0);
>   z = pow (x, y);
>   printf ("pow(%.16e %.16e) = %.16e\n", x, y, z);
>   x = -x;
>   z = pow (x, y);
>   printf ("pow(%.16e %.16e) = %.16e\n", x, y, z);
>   x = 1.0 - pow (2.0, -52.0);
>   z = pow (x, y);
>   printf ("pow(%.16e %.16e) = %.16e\n", x, y, z);
>   x = -x;
>   z = pow (x, y);
>   printf ("pow(%.16e %.16e) = %.16e\n", x, y, z);
> }
> -----
>
> Here is a patch for newlib/libm/math/epow.c:

Patch checked in and duplicated for ef_pow.c.  Thanks.

-- Jeff J.
2008-09-15 04:31:30 +00:00
Ryan C. Gordon
3b3a1b8cdf Merged r4082:4083 from branches/SDL-1.2: sparc64 crash fix. 2008-09-08 07:38:41 +00:00
Darren Alton
242cd3897b Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality. 2008-09-06 04:31:34 +00:00
Darren Alton
6fb0102145 Initial work for NDS haptic support. 2008-09-06 00:10:16 +00:00
Holmes Futrell
916349a04f Added support for OpenGL ES renderer 2008-09-02 20:19:45 +00:00
Holmes Futrell
0de9882579 Ran GNU indent on file 2008-09-02 20:11:06 +00:00
Holmes Futrell
32c4f213db Rolling back changes to revision 4071 ... made some mistakes, will try merging work again. 2008-09-02 20:05:33 +00:00
Holmes Futrell
f69769dfa3 Added retained backing attribute, reference to UIKit renderer 2008-09-02 19:53:56 +00:00
Holmes Futrell
449f371859 This file serves a similar purpose as SDL_glfuncs.h, but for the OpenGL ES renderer. 2008-09-02 02:44:45 +00:00
Holmes Futrell
850aff64b6 Added OpenGL ES support 2008-09-02 02:27:06 +00:00
Holmes Futrell
7aae720160 These files are similar in purpose and structure as SDL_renderer_gl.c and SDL_renderer_gl.h, except they use OpenGL ES 1.1 for rendering. 2008-09-02 00:37:04 +00:00
Sam Lantinga
72d3929fca Fixed a bunch of compile warnings on Mac OS X 2008-09-01 16:04:20 +00:00
Sam Lantinga
0ddab56d41 Date: Sun, 31 Aug 2008 17:53:59 +0200
From: Couriersud
Subject: Re: Updated DirectFB driver for SDL1.3

attached is a patch which brings the directfb driver in line with
current svn. In addition:

* driver now is in line with the structure of the X11 driver.
  This adds a couple of files.
* driver now supports relative mouse movements
2008-08-31 16:04:32 +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
2ba47a0dc2 Fix for mingw compilation by Alam. 2008-08-26 11:50:37 +00:00
Edgar Simo
37efd9020c Missing an include. 2008-08-26 11:17:16 +00:00
Sam Lantinga
a7f2971180 Fixed Visual Studio compilation problems 2008-08-26 07:34:49 +00:00
Sam Lantinga
9c7284cdda Fixed crash when tablet isn't detected properly 2008-08-26 07:34:23 +00:00
Sam Lantinga
3b22c14a63 Dynamically load wintab32.dll 2008-08-26 06:03:48 +00:00
Sam Lantinga
ea7abca18f indent 2008-08-26 05:57:41 +00:00
Sam Lantinga
19d99d4cfc Added Wacom API headers.
FIXME: Dynamically load the Wacom API functions from wintab32.dll
2008-08-26 05:26:28 +00:00
Sam Lantinga
bfe61733da Couriersud fixed bug #603
Using the following sequence

SDL_Init(..:)
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)
SDL_DestroyWindow
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)

SDL will crash in X11_GL_GetVisual. This is due to the fact that
during SDL_DestroyWindow X11_GL_Shutdown was called because the last window
has been closed.

On the next call to SDL_CreateWindow the library is still loaded and only the
memory is reinitialized. Function pointers such as gl_data->glXChooseVisual
will not be reinitialized.

Consequently, SDL will crash due to a NULL pointer access.

The attached patch corrects the behaviour.
2008-08-26 02:47:26 +00:00
Sam Lantinga
38b73b01d9 indent. *sigh* 2008-08-26 02:40:24 +00:00
Sam Lantinga
0cc551f0cd Date: Sun, 20 Jul 2008 22:34:37 +0200
From: Couriersud
Subject: Updated DirectFB driver for SDL1.3

please find attached a patch for an updated directfb driver for SDL1.3.
It does now
- properly supported the new input api.
- send unicode text events
- support directfb windows
- support multiple screens
- support hardware YUV scaling for the first YUV texture created.
- support hardware scaling for textures.
- properly interpret streaming access
- support software opengl if one manages to install the mesa directfb
driver (broken/not broken in mesa svn)

Within bugzilla (http://bugzilla.libsdl.org/show_bug.cgi?id=603) there
is another patch which fixes a crash due to GL context creation.

Kind regards,

couriersud
2008-08-26 02:32:45 +00:00
Edgar Simo
f8a242d31e Merged force_feedback_branch r4042: unbuildability of dummy haptic driver with some configurations. 2008-08-25 20:51:03 +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
Edgar Simo
14e01ef127 Merge of force feedback branch r4039. 2008-08-25 17:34:58 +00:00
Sam Lantinga
a13381a54a Final merge of Google Summer of Code 2008 work...
Audio Ideas - Resampling and Pitch Shifting
by Aaron Wishnick, mentored by Ryan C. Gordon
2008-08-25 15:08:59 +00:00
Edgar Simo
4220687185 Merging another last minute fix from force feedback branch (r4036) 2008-08-25 10:14:21 +00:00
Sam Lantinga
b5ce7cc37d Merged last minute fixes from force feedback branch (r4031, r4033, r4034) 2008-08-25 10:04:06 +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
f24330df2a Fixed compile errors introduced during the merge refactoring 2008-08-25 08:50:37 +00:00
Sam Lantinga
6d8889d8e9 Added missing X1/X2 button support 2008-08-25 06:58:34 +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
9816457898 Fixed compiler warning 2008-05-26 12:56:10 +00:00
Sam Lantinga
1a2cd9be5c Reverted revision 3416, fixing bug #589
http://bugzilla.libsdl.org/show_bug.cgi?id=589

I was going to add the current window to the OpenGL context info, but that
doesn't fix the case where you set the current context to NULL and then set
the current context to the same window it had before.

This also doesn't take into account changes to the window that might affect
the context, such as viewport changing or fullscreen/windowed mode changing.

Any ideas?
2008-05-26 12:43:37 +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
Bob Pendleton
98acd1149c In testdyngl.c the event type was being anded (&) with SDL_KEYDOWN and if the result was none zero the program was quiting. This is very weird because it was
working earlier this week.

I added some more trace code to SDL_x11events.c

In SDL_X11opengl.c I modified SDL_GL_GetSwapInterval() so that it returns a pretty good value even if you have the SGI swap extension instead of the MESA swap
extension. I just saved the value you set and return it too you.
2008-03-07 23:57:15 +00:00
Bob Pendleton
1f0470ba8c oops, need to comment out some debug code. 2008-03-07 21:01:54 +00:00
Bob Pendleton
4534dabb7e Next version of internationalized input for X11. On my machine (famous last words :-) with a US English keyboard and locale I can compose ` and e and get a text
input event with the character è. You still get the keypress keyrelease events for the individual keys that go into composing the character.
2008-03-07 20:54:11 +00:00
Bob Pendleton
617e50c933 more valgrind errors fixed. Plus I ran make indent which changed a few files. 2008-03-07 17:20:37 +00:00
Bob Pendleton
2a40813ab2 Fixed many valgrind errors. But, I broke testdyngl. 2008-03-06 23:07:02 +00:00
Bob Pendleton
692da065af Fixing valgrind errors.
One of the error was the result of an unitended recursive call to X11_GL_LoadLibrary which was also fixed.
2008-03-06 17:08:10 +00:00
Bob Pendleton
95efd075f2 SetupWindowData in SDL_X11window.c was realloc()ing the display window list and incrementing numwindows even though those are being updated in functions that call
this function. The result is that it is possible to get the same window added to the list twice.
2008-03-04 23:09:28 +00:00
Bob Pendleton
1db7dfa3d2 Deleted a call to X__PumpEvents at the end of X11_GL_InitExtensions(). This function is being called from SDL_RecreateWindow at a point when the numwindows value in
is incorrect. The result is that an illegal access is being made in X_PumpEvents when it tries to look up the windows ID of the source of an event. Taking out that
call does not seem to have any effect on the testgl. But, I would be happy if someone else took a look at this problem and found a fix higher up the stack.
2008-03-01 20:34:36 +00:00
Sam Lantinga
990676f5c4 Windows also remaps the numeric keypad... grrr 2008-02-11 21:06:32 +00:00
Sam Lantinga
03eda66f37 Added support for keypad enter 2008-02-10 05:34:33 +00:00
Sam Lantinga
d4c23af239 Updated Visual C++ project 2008-02-10 05:14:28 +00:00
Sam Lantinga
8df4fc4ae5 Friggin' Windows remaps alphabetic keys based on keyboard layout.
We try to figure out what the actual layout independent values are.
2008-02-09 22:28:27 +00:00
Sam Lantinga
dc6eb861a5 Undo keyboard layout based alphabetic key mapping. Grr.... HACK HACK HACK... 2008-02-09 07:18:38 +00:00
Sam Lantinga
7c23e86a0d Implemented text input event for Win32 2008-02-09 06:47:46 +00:00
Sam Lantinga
d92958c0e5 Untested Win32 keyboard scancode code. 2008-02-08 08:35:49 +00:00
Sam Lantinga
27fce8ebae Fixed array overrun 2008-02-07 16:14:43 +00:00
Sam Lantinga
0e59c9db53 Fixed compile errors 2008-02-07 16:00:29 +00:00
Sam Lantinga
37131333be First pass of new SDL scancode concept for X11. 2008-02-07 15:31:09 +00:00
Sam Lantinga
80a950c3db Christian's comment:
/* Actually returns a UInt32 containing two character codes (and two 'reserved' bytes), but we're only interested in the second (or only) one */
2008-02-05 07:30:50 +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
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
4a1d83aef7 Enabled key board auto repeat in X11_InitKeyboard.c. Had to add a couple of new Xlib symbols. 2008-01-12 18:07:06 +00:00
Bob Pendleton
06920df50f one more time... I must be brain dead... 2008-01-12 16:56:42 +00:00
Bob Pendleton
1129c73ed3 More typos 2008-01-12 16:53:30 +00:00
Bob Pendleton
bd12ee97bd Fixed some typos in SDL_x11keyboard.c 2008-01-09 23:40:56 +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
2f7fd42403 Christian Walther fixed bug #529 2007-12-29 22:15:39 +00:00
Sam Lantinga
9e2c55b30c Merged fix for bug #508 from SDL 1.2 revision 3495 2007-12-29 21:36:17 +00:00
Sam Lantinga
67aa85911e Fixed bug #478
Take the min and max values into account.
2007-12-29 19:45:09 +00:00
Sam Lantinga
4a989076f7 Merged fix for bug #503 from SDL 1.2 revision 3487 2007-12-29 19:29:20 +00:00
Sam Lantinga
6ca8994f51 Fixed bug #497
Check all joysticks instead of stopping if one has been removed.
2007-12-29 06:17:31 +00:00
Sam Lantinga
a4fa98c9b0 Fixed bug #464
Added X1/X2 button constants
2007-12-29 06:09:25 +00:00
Sam Lantinga
fef51d48dc Date: Wed, 14 Nov 2007 22:20:27 -0500
From: Calvin Vette
Subject: Fix to compile SDL-1.2 SVN on OS X Leopard

I found I needed to add a conditional check for Leopard to compile
cleanly on 1.2-SVN (20071114):

#include <AudioUnit/AudioUnit.h>
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
#include <AudioUnit/AUNTComponent.h>
#endif

where there is now just:
#include <AudioUnit/AudioUnit.h>
2007-12-28 18:16:42 +00:00
Sam Lantinga
a594a0739d Merged changeset 3463 from SDL 1.2, fixed compile error with Intel compiler. 2007-12-28 18:08:43 +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
Sam Lantinga
1e891ee4f2 indent 2007-09-10 12:11:40 +00:00
Sam Lantinga
6b567a2fb0 Fixed bug #471 2007-08-21 06:54:07 +00:00
Ryan C. Gordon
8446fb5976 Minor PulseAudio fixes: corrected OpenDevice return code, human-readable
error messages if connction to daemon fails.
2007-08-20 02:08:37 +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
bd3f5173f5 Date: Sun, 19 Aug 2007 18:29:28 +0200
From: Christian Walther
Subject: Re: SDL 1.3 keyboard plan

> 2007-08-18 19:15:51.454 checkkeys[5795] *** _NSAutoreleaseNoPool():
> Object 0x532750 of class NSSelectionArray autoreleased with no pool
> in place - just leaking

This is fixed by the attached patch.
2007-08-19 16:36:51 +00:00
Sam Lantinga
c84ff85475 Whoops, missing file... 2007-08-19 16:35:44 +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
59d6059cae More work in progress... 2007-08-17 06:58:20 +00:00
Sam Lantinga
7f03398faa More work in progress, still doesn't compile... 2007-08-17 06:40:12 +00:00
Sam Lantinga
82908c483c Work in progress: merging new texture features into SDL blit system 2007-08-17 06:21:58 +00:00
Sam Lantinga
d5d655cc43 Enabled 3DNow! intrinsic support 2007-08-17 03:22:03 +00:00
Sam Lantinga
c120eaf9e4 indent 2007-08-17 02:55:21 +00:00
Sam Lantinga
a4e5bc25cc Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues

improved cursor handling
fixes some mouse and event related bugs
2007-08-17 02:54:50 +00:00
Sam Lantinga
785b4a61c3 Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues

The current code will crash on exiting an application. The attached diff
fixes the issue.
2007-08-17 02:54:12 +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
367092a182 Getting ready to add slow blitters. Everyone will love me. :) 2007-08-16 22:56:18 +00:00
Sam Lantinga
a35d8c5da8 Use MMX intrinsics over GCC inline assembly 2007-08-16 22:18:53 +00:00
Sam Lantinga
47dfad08cc Oops, didn't want to rename those files... 2007-08-16 21:54:26 +00:00
Sam Lantinga
bcce9c56b0 Added notes on the next steps for SDL 1.3
Moved fill and copy routines to their own files.
2007-08-16 21:43:19 +00:00
Sam Lantinga
16c1080593 Removed unnecessary header (SDL_blit.h has SDL_cpuinfo.h) 2007-08-16 06:40:34 +00:00
Sam Lantinga
fd5ae1f46d SSE and MMX intrinsics work with Visual Studio now... 2007-08-16 06:37:22 +00:00
Sam Lantinga
b886cc3b5c Fixed a few compiler warnings.
Added SDL_blit_copy.c to the Visual C++ project

The SSE and MMX intrinsics don't compile on Visual Studio yet...
2007-08-16 06:20:51 +00:00
Sam Lantinga
65d361b41b Added SSE and MMX optimization for SDL_FillRect() 2007-08-16 05:56:24 +00:00
Sam Lantinga
f1b05ff63b Okay, I figured out the intrinsics for SIMD memcpy 2007-08-16 02:14:13 +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
377c3990ba Added code to enable multi-threaded OpenGL on Mac OS X, pending Ryan's PBO/VBO
changes.
2007-08-15 04:04:17 +00:00
Sam Lantinga
45891d1d50 Optimization suggested by Ryan:
Don't set the same OpenGL context multiple times
2007-08-15 03:52:31 +00:00
Sam Lantinga
47455281fd indent 2007-08-15 03:50:49 +00:00
Sam Lantinga
1b7386279e Date: Wed, 15 Aug 2007 01:08:38 +0200
From: Couriersud
Subject: Some SDL1.3 patches

LoadLibrary will call X11_GL_Initialize. If LoadLibrary is called before
a window is created, it will crash since structures are not properly set
up.
2007-08-15 03:34:14 +00:00
Sam Lantinga
0fe1784459 Date: Wed, 15 Aug 2007 01:08:38 +0200
From: Couriersud
Subject: Some SDL1.3 patches

Modified UpdateTexture to lock and unlock DirectFB-Surface.
2007-08-15 03:19:21 +00:00
Sam Lantinga
74a291769a Fixed crash setting 0 bpp video mode. 2007-08-15 03:18:24 +00:00
Sam Lantinga
0c2f549390 Added SSE version of SDL_FillRect() for 32-bit ARGB surfaces 2007-08-13 06:24:56 +00:00
Sam Lantinga
cfd7794fec Advertise the most efficient format for the screen. Of course SDL code needs
to be fixed to handle framebuffers with alpha...
2007-08-13 02:38:59 +00:00
Sam Lantinga
2d2be66919 This is byte order dependent. 2007-08-12 18:53:51 +00:00
Sam Lantinga
1de747845b indent 2007-08-12 18:44:49 +00:00
Sam Lantinga
f2c7446b24 Gained 5 FPS in testsprite because Mac OS X memset is highly optimized 2007-08-12 18:27:44 +00:00
Sam Lantinga
6d8a22e975 Test using glTextureRangeAPPLE
This actually ends up being quite a bit slower on my MacBook, but I'm
checking it in to test on a PPC iMac.

Maybe someone knows why it's slower?
2007-08-12 16:53:58 +00:00
Sam Lantinga
49204a8cdd indent 2007-08-12 16:26:10 +00:00
Sam Lantinga
61ed776db3 Fixed compiling the Altivec blit code 2007-08-12 15:41:36 +00:00
Sam Lantinga
dbb114bdf1 Optimized OpenGL renderer for Mac OS X.
The SDL 1.2 API version of testsprite went from 120 FPS to 320 FPS. :)
2007-08-12 07:02:28 +00:00
Sam Lantinga
6a45ac924c Fixed crash if conversion fails. Use ISO name for Latin-1 2007-08-12 05:48:51 +00:00
Sam Lantinga
e9aa9188bf Fixed compile warnings with Visual C++ 2007-08-12 00:01:41 +00:00
Sam Lantinga
ed767d84cc Exported the software renderer texture functions to make easier to create
a renderer based on a framebuffer.

Fixed an initialization bug with the dummy video display mode.
2007-08-11 23:26:03 +00:00
Sam Lantinga
0693d77922 Date: Sat, 11 Aug 2007 02:03:16 +0200 (CEST)
From: couriersud arcor.de
To: slouken@libsdl.org
Subject: Directfb driver for SDL1.3

Hi,

the attachment contains a patch for a SDL1.3 directfb driver. It supports:

- Renderer "directfb":

Hardware acceleration as supported by the underlying directfb driver. With a
radeon X850, testsprite2 runs at 50% to 70% of OpenGL (X11, dri) performance.

Also supports hardware accelerated yuv overlays. This must be enabled by sett
ing:

export SDL_DIRECTFB_YUV_DIRECT=1

- Renderer "opengl"

Supports software opengl using mesa opengl (make linux-directfb).

Some more information may be found in README.DirectFB

There will certainly still be some bugs, and there is some debug code around.
 When I find some time, I will compile against directfb-0.9.25 as distributed
 with ubuntu 7.04.

The diff also contains a fix for SDL_LockYUVOverlay fixing a bug in  *pixels
and pitches initialization.

Kind regards,

couriersud
2007-08-11 21:51:19 +00:00
Sam Lantinga
8a6126e90d Whoops, it's not quite that easy - fixed bug in SDL_ClearDirtyRects() 2007-08-11 21:42:36 +00:00
Sam Lantinga
ebe7769ae3 Optimized dirty rect code 2007-08-11 21:34:08 +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
ecf8db2e86 indent 2007-08-11 20:46:24 +00:00
Bob Pendleton
45238ff004 changed to use SDL_realloc() 2007-07-26 17:58:17 +00:00
Bob Pendleton
5f14f00c25 Added gamma table support to X11. Also now supports DirectColor visuals. 2007-07-25 21:22:55 +00:00
Bob Pendleton
624a1851eb make indent 2007-07-24 18:46:45 +00:00
Sam Lantinga
686b4969d1 Switched afxres.h to winresrc.h 2007-07-23 18:46:09 +00:00
Bob Pendleton
3d7eee3429 Oops, meant PsuedoColor not TrueColor 2007-07-23 16:55:38 +00:00
Sam Lantinga
958f927c3d indent 2007-07-23 01:17:38 +00:00
Sam Lantinga
4c2ff36986 Added support for building version.rc in Windows build. 2007-07-16 03:28:48 +00:00
Sam Lantinga
9ab551b38c Fixed bug #428
This fix is overkill, but approved by Doug Lea, and he'll be releasing a
new version of his malloc.c sometime next month.
2007-07-16 00:08:35 +00:00
Sam Lantinga
c498b4bf26 Merged fix for bug #457 from SDL 1.2 2007-07-15 21:54:16 +00:00
Sam Lantinga
ef4035f039 indent 2007-07-15 16:59:16 +00:00
Sam Lantinga
c53b963473 Split acinclude.m4 into its component parts for easy updating 2007-07-15 01:51:11 +00:00
Ryan C. Gordon
8ac0a66e8f Merged r3261:3262 from branches/SDL-1.2: MMX/YUV with __OPTIMIZE__.
"Mac OS X/x86 won't build the MMX/YUV inline assembly without optimizations
 enabled (not enough registers), so for now, we only build it if we see
 the __OPTIMIZE__ #define, which GCC provides when you build at -O1 or higher."
2007-07-14 07:28:45 +00:00
Ryan C. Gordon
dbfdef0054 Reverted r3255:3256. Don't actually need it unless the build is broken. :) 2007-07-14 07:05:19 +00:00
Ryan C. Gordon
a587ed562a Merged r3257:3258 from branches/SDL-1.2: unused MMX variables. 2007-07-14 07:03:07 +00:00
Ryan C. Gordon
34c08ae1e9 Merged r3255:3256 from branches/SDL-1.2: stdlib problem with SDL_memcpy macro. 2007-07-14 06:46:33 +00:00
Patrice Mandin
04c06e94eb Use correct function 2007-07-14 00:07:37 +00:00
Patrice Mandin
449514cde4 Missing variable declarations 2007-07-14 00:03:04 +00:00
Patrice Mandin
2e5f27ad54 Rename LockAudio,UnlockAudio to LockDevice,UnlockDevice. Also some small fixes 2007-07-13 23:58:22 +00:00
Patrice Mandin
8eac2e2d05 Delete old files 2007-07-13 22:55:54 +00:00
Patrice Mandin
1c6a373e3d Update GEM driver to new API, will have to fill the void later :) 2007-07-13 22:55:15 +00:00
Patrice Mandin
b0096fae26 Disable video extensions atm 2007-07-13 22:52:53 +00:00
Patrice Mandin
13f058d4eb Missing include file 2007-07-13 22:51:42 +00:00
Patrice Mandin
960c1fbf71 Simplify setting window title 2007-07-13 16:11:58 +00:00
Bob Pendleton
3dc377941a This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is
available and to keep people form having to install yet another library I have added the essential parts of Xmu in
src/video/extensions/XmuStdCmap and an include file in src/video/extensions. The support makes use of standard X11 mechanisms to
create color maps and make sure that an application uses the same color map for each window/visual combination. This should make it
possible for gamma support to be implemented based on a single color map per application.

Hurm... it looks like "make indent" modified a few extra files. Those are getting committed too.
2007-07-12 20:00:50 +00:00
Sam Lantinga
08ab0f198f Merged Ryan's patch from revision 3238 in SDL 1.2 2007-07-12 08:07:30 +00:00
Sam Lantinga
691d57d9df Whoops, needed to remove the other version of getlocale() 2007-07-12 07:55:18 +00:00
Sam Lantinga
46a6657c71 Fixed bug #455
If passed "" for the character set, let iconv_open() interpret it as
locale.

This was merged from revision 3234,3235 from SDL 1.2
2007-07-12 07:52:50 +00:00
Sam Lantinga
be4cb77638 Yes, you need to set the pixel format before creating a context. 2007-07-12 06:59:43 +00:00
Sam Lantinga
49f67ffc0c Visual C++ compiler warning fixes 2007-07-12 06:53:20 +00:00
Sam Lantinga
45339ba922 Creating a context makes it current, per the documentation.
Applied a variant of the multi-card OpenGL fix from SDL 1.2
2007-07-12 06:31:36 +00:00
Sam Lantinga
d92137dfe0 Fixed joystick name detection - merged from revision 3226 on SDL 1.2 branch 2007-07-12 05:31:08 +00:00
Sam Lantinga
c6f4fbead2 indent 2007-07-11 14:51:49 +00:00
Sam Lantinga
b7712d9f7a Fixed compiling YUV code 2007-07-11 14:50:21 +00:00
Sam Lantinga
da74dd24a7 Fixed compiling the x11 driver 2007-07-11 14:49:44 +00:00
Sam Lantinga
d1184a5c65 Needed an autorelease pool around the NSText allocation 2007-07-11 14:44:28 +00:00
Sam Lantinga
c74b896ae4 Added key composition support, courtesy of Kuon 2007-07-11 08:09:20 +00:00
Ryan C. Gordon
74b0ae1377 Merged r3211:3213 from branches/SDL-1.2: YUV MMX inline asm for GCC. 2007-07-11 07:39:01 +00:00
Sam Lantinga
cb51385055 indent doesn't know how to handle inline asm 2007-07-11 04:47:25 +00:00
Ryan C. Gordon
fe87971b62 Merged r3201:3204 from branches/SDL-1.2: win32 rwops tweaks. 2007-07-10 19:06:02 +00:00
Sam Lantinga
892d73c061 Merged memory leak fix from SDL 1.2 2007-07-10 16:05:50 +00:00
Bob Pendleton
d247838455 Added stubs for x11 gamma functions and enabled them in SDL_x11video.c 2007-07-10 14:44:20 +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
Ryan C. Gordon
2d8bb10980 Merged r3165:3166 from branches/SDL-1.2: gcc -Wall fix in arts audio target. 2007-07-08 01:37:48 +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
cad0ed9d4d Fixed bug #77
If the ARB pixel format selection fails, use a version of ChoosePixelFormat() that doesn't return a less capable format than was requested.
2007-07-05 06:14:26 +00:00
Sam Lantinga
6948a5048a Fixed mode code under VMware running Windows 98 2007-07-05 05:57:31 +00:00
Sam Lantinga
df1fb188b1 Removed campatibility behavior for 1.3 2007-07-05 04:34:48 +00:00
Ryan C. Gordon
55bedc2819 Merged r3138:3139 from branches/SDL-1.2: Don't init audio callback buffer.
(This already had a concession for devices opened via the 1.2 entry points,
 I've changed it to respect the environment variable and do it for all devices
 now.)
2007-07-05 02:30:10 +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
Sam Lantinga
803256bf09 stupid indent 2007-07-03 09:55:29 +00:00
Ryan C. Gordon
ee105c10fd Merged r3125:3126 from branches/SDL-1.2: yasm/nasm warning fix. 2007-07-03 09:54:27 +00:00
Sam Lantinga
34f8946d43 iconv() doesn't write to the data, just make compilers happy 2007-06-28 08:35:35 +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
bfff23d04a Merged r3106:3107 from branches/SDL-1.2: Hermes PIC fixes. 2007-06-27 10:17:35 +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
Sam Lantinga
c02a69953d Fixes for compiling with Visual C++ 8.0 Express Edition 2007-06-19 05:53:56 +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
ff37dddab2 Merged r3087:3089 from branches/SDL-1.2: WM_XBUTTON support. 2007-06-16 05:29:28 +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
f9c61022d2 Reworked r3067:3068 from branches/SDL-1.2: arts unavailable hardware bug fix. 2007-06-14 14:22:54 +00:00
Sam Lantinga
b6ab6bf6d5 make indent 2007-06-14 13:21:29 +00:00
Sam Lantinga
4c81f8c5cc Fixed running on Windows under VMware 2007-06-14 06:32:36 +00:00
Ryan C. Gordon
9f28051f78 Merged r3062:3063 from branches/SDL-1.2: clear inaccurate x11dyn error strings. 2007-06-13 08:02:43 +00:00
Patrice Mandin
982014481e Avoid switch to supervisor mode in SDL_GetTicks, by updating system counter from vbl interrupt 2007-06-09 19:58:41 +00:00
Patrice Mandin
9aeba59294 Set supervisor as volatile as it is modified from an interrupt 2007-06-08 21:44:55 +00:00
Ryan C. Gordon
15db051b10 Merged r3047:3048 from branches/SDL-1.2: SDL_revcpy() off-by-one fix. 2007-06-04 11:45:10 +00:00
Ryan C. Gordon
fd051d952d Merged r3044:3045 from branches/SDL-1.2: directfb reported screen size fix. 2007-06-04 11:17:46 +00:00
Sam Lantinga
defc2572f2 Fixed build issues on Mac OS X 2007-05-31 14:46:01 +00:00
Ryan C. Gordon
5045fc5ea4 Merged r3029:3030 from branches/SDL-1.2: Mac OS X joystick axis fix. 2007-05-29 12:14:16 +00:00
Patrice Mandin
541e03310c Allow creation of window bigger than visible size 2007-05-27 08:54:38 +00:00
Patrice Mandin
e1813a23d4 Simply resize existing window 2007-05-26 20:10:49 +00:00
Patrice Mandin
1c3f9b6f5d GEM has a window manager, of course 2007-05-26 19:46:04 +00:00
Ryan C. Gordon
3ddbcf5717 Date: Wed, 23 May 2007 00:39:47 +0300
From: "Eyal Lotem"
To: "SDL Mailing List" <sdl@lists.libsdl.org>
Subject: [SDL] Bug in GL_SWAP_CONTROL extension name.

The checked extension name is incorrect.
The attached patch fixes it to the correct name.

I don't think that under any setup, this extension name was ever
correct, which is why its not OR'd against the old check.

This fixes the "tear effect" (vsync problems) I had here with nVidia
GLX drivers.

Eyal
2007-05-22 22:13:56 +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
686bddc5dc Merge r3005:3006 from branches/SDL-1.2: Alpha blending MMX/3DNow register bug. 2007-04-04 09:36:25 +00:00
Ryan C. Gordon
62073d041d Merged r2992:2993 from branches/SDL-1.2: Mac OS X multi-axis joystick support. 2007-03-18 22:39:24 +00:00
Ryan C. Gordon
435e813700 Merge r2990:2991 from branches/SDL-1.2: try to avoid asm/page.h in fbcon. 2007-03-14 01:10:43 +00:00
Ryan C. Gordon
f19750fb44 Added id of another buggy Microsoft SideWinder to the Linux joystick driver.
Fixes Bugzilla #395.
2007-02-20 22:54:25 +00:00
Ryan C. Gordon
fd9549429a Merged r2985:2986 from branches/SDL-1.2: directfb yuv coop level fix. 2007-02-20 21:08:00 +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
7a0fd00cf4 Merged r2979:2980 from branches/SDL-1.2: unsigned char in ctype funcs. 2007-02-15 11:14:24 +00:00
Ryan C. Gordon
0182ddff8b Merged r2975:2976 from branches/SDL-1.2: Mac OS X F13-15 key support. 2007-02-14 10:25:41 +00:00
Ryan C. Gordon
f5e95020ad Merged r2954:2955 from branches/SDL-1.2: Altivec alpha blitter alignment fix.
Fixes Bugzilla #279.
2007-02-12 10:57:45 +00:00
Ryan C. Gordon
e5b23cae8f Merged Bugzilla #354 fix into trunk. 2007-02-03 08:18:41 +00:00
Ryan C. Gordon
bf4644bc10 Look for an exact match first when setting a video mode on BeOS.
Fixes Bugzilla #370.
2006-12-08 00:31:32 +00:00
Ryan C. Gordon
3686368f2c Logic error in BeOS video mode selection ("width" where it should be "height").
Fixes Bugzilla #370.
2006-12-08 00:16:38 +00:00
Ryan C. Gordon
4b1c92befb Apparently it's possible that MSVC will want to call a built-in function to
bitshift an Sint64, but it can't find this function since we don't use the
 C runtime on Windows.

Division doesn't have this problem, though. Strange.

  Thanks, Suzuki Masahiro.
2006-11-29 10:38:07 +00:00
Ryan C. Gordon
ca8a1cb794 Use SDL_strcmp(), not strcmp().
Thanks, Suzuki Masahiro.
2006-11-29 10:26:32 +00:00
Ryan C. Gordon
756b168b3b Logic error in SDL_video.c (used bitwise OR instead of logical OR).
Thanks, Suziki Masahiro.
2006-11-29 10:22:59 +00:00
Ryan C. Gordon
a5b36fd782 Merged r2913:2914 from SDL-1.2 branch into trunk: alpha blit GCC MMX asm fix. 2006-11-21 23:24:33 +00:00
Patrice Mandin
1c82ba0340 Save/restore current video mode and palette 2006-11-13 20:34:18 +00:00
Patrice Mandin
fe0a1a35c6 xbios: preliminary video mode init 2006-11-13 19:59:28 +00:00
Ryan C. Gordon
5f1123d8ed Merged r2906:2907 from 1.2 branch to trunk: power of two channels in dsp backend. 2006-11-13 00:38:13 +00:00
Ryan C. Gordon
b932761626 Fixed building of Windows waveout audio. 2006-11-11 06:48:57 +00:00
Ryan C. Gordon
cdf5d71b84 Merged r2903:2904 from SDL-1.2 branch to trunk: BeOS loadso updates. 2006-11-07 15:18:42 +00:00
Sam Lantinga
906f8566ac @#$% indent 2006-10-29 15:00:54 +00:00
Sam Lantinga
e8ab4cad6b 2006-10-29 14:47:20 +00:00
Sam Lantinga
dbc11167df Merged Ryan's fix, in case we need it later. 2006-10-29 14:45:46 +00:00
Ryan C. Gordon
b94f08253a Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
Ryan C. Gordon
a08b4ac133 Win32 joystick fix, ported from 1.2 branch r2887:2888. (Thanks, Ondrej!)
Fixes Bugzilla #267.
2006-10-29 03:39:13 +00:00
Sam Lantinga
c91d18d6ad indent is evil 2006-10-28 16:48:03 +00:00
Sam Lantinga
317f4be23e Fixed mouse enter/leave events for a single window.
You lose mouse focus in Cocoa when the window is no longer key.
2006-10-28 16:41:54 +00:00
Sam Lantinga
83ada51d56 Fixed focus comptability bug 2006-10-28 16:41:08 +00:00
Ryan C. Gordon
76e994db80 Oh for crying out loud... 2006-10-28 07:49:19 +00:00