Commit Graph

2415 Commits

Author SHA1 Message Date
Ryan C. Gordon
0e1946b0ed Quartz: Ripped out all the legacy CoreGraphics code.
Mac OS X Lion (10.7) always returns NULL from CGDisplayBaseAddress(), so all
 the direct framebuffer access code has been replaced with something a little
 higher level. This also necessitated taking out the scary SDL_DOUBLEBUF
 codepath that was trying to time out vsync by hand.  :)

--HG--
branch : SDL-1.2
2011-07-17 03:08:53 -07:00
Ryan C. Gordon
426198b711 Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs.
--HG--
branch : SDL-1.2
2011-07-17 01:03:13 -07:00
Patrice Mandin
b92c1e4101 Check sa_sigaction member of struct sigaction
--HG--
branch : SDL-1.2
2011-07-14 15:40:07 +02:00
Ryan C. Gordon
d4bb6faea5 Linux: Search a smaller set of potential joystick axes.
Newer kernels seem to report bogus axes in the higher ranges, for example
 with a standard PlayStation 3 controller plugged in via USB.

--HG--
branch : SDL-1.2
2011-07-13 17:36:29 -07:00
Ryan C. Gordon
36b75c658a Minor whitespace cleanup.
--HG--
branch : SDL-1.2
2011-07-07 11:50:30 -07:00
Ryan C. Gordon
548ff4bc00 Cleaned up compiler warnings about unchecked return values.
--HG--
branch : SDL-1.2
2011-07-07 11:49:46 -07:00
Ryan C. Gordon
10b49960a9 Don't call CGContextRelease() on object Cocoa already flagged for autorelease.
Thanks to Kirk A. Baker for this fix!

--HG--
branch : SDL-1.2
2011-06-04 15:34:32 -04:00
Ryan C. Gordon
bcc468de12 QZ_LockHWSurface() should always check for changes to the screen surface.
Apparently these pointers can change if the user has multiple displays and
 moves a window between them, and probably other similar cases.

Thanks to Kirk Baker for the patch!

--HG--
branch : SDL-1.2
2011-06-04 15:33:50 -04:00
Sam Lantinga
5d83b03124 Fixed compiler warning
--HG--
branch : SDL-1.2
2011-03-21 13:33:29 -07:00
Sam Lantinga
e1f3e98edf Do not break application's signal handler installed with SA_SIGINFO
Gleb Natapov to sdl

If application installs SIGINT/SIGTERM signal handler with
sigaction(SA_SIGINFO) syscall before initializing SDL, after
initialization
of SDL signal handler will be reinstalled without SA_SIGINFO flag which
brings havoc when the signal handler is called. The breakage is done by
SDL_QuitInit()/SDL_QuitQuit() function. They use signal() to detect that
signal handler is already installed even in sigaction() is available.

--HG--
branch : SDL-1.2
2011-03-15 21:36:36 -07:00
Sam Lantinga
9f5b01a047 Patch for SDL_VIDEO_CENTERED & OpenGL bug
Stephen Anthony to SDL

Using SDL_VIDEO_CENTERED in Linux OpenGL mode issue an unwanted
ConfigureNotify event *after* the SDL screen has already been resized.
When going from a smaller to a larger screen, this event causes the mouse
tracking to be clamped at the *smaller* screen size, even though that
screen no longer exists.

The fix is to not issue a ConfigureNotify when the window is moved because
of the SDL_VIDEO_CENTERED environment variable.  The included patch fixes
this bug.  It seems the hints must be set before the window is moved.

--HG--
branch : SDL-1.2
2011-02-24 17:42:45 -08:00
Sam Lantinga
cdc519267b nasm 2.09 compatibility
nasm-2.09 makes `elf' alias to `elf32', thus __OUTPUT_FORMAT__ macro
becomes `elf32' instead of `elf' (on x86). Unmatched macro value causes
omitting .note.GNU-stack marker and creates ELFs with executable stack.
This is unneeded and attracts security policies like SELinux.

--HG--
branch : SDL-1.2
2011-02-24 09:39:23 -08:00
Sam Lantinga
4d222ab45d Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order)
The much more complete fix is in SDL 1.3, but this is a band-aid that will fix the bug for 1.2.

--HG--
branch : SDL-1.2
2011-02-17 02:31:50 -08:00
Sam Lantinga
6341d68347 Fixed bug #1121 (More than one device through SDL_JOYSTICK_DEVICE)
Chusslove Illich      2011-02-13 04:30:28 PST

Currently SDL_JOYSTICK_DEVICE environment variable can be used to add
exactly one topmost device. I think it would be nice if one could also set
several devices (e.g. a stick and a throttle) in this way, as a colon-
separated list. The attached patch implements this

--HG--
branch : SDL-1.2
2011-02-16 04:49:07 -08:00
Sam Lantinga
ffcdf2f90f Fixed compile error
--HG--
branch : SDL-1.2
2011-02-04 09:07:39 -08:00
Sam Lantinga
a03d783f83 Fixed bug #1111
kwm@rainbow-runner.nl      2011-01-30 06:28:27 PST

When building sdl 1.2.14 with the Clang compiler http://clang.llvm.org .
The build fails in src/video/mmx.h with the following error:

--------------------------------------------------
./src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:831:17: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
                ^
./src/video/SDL_RLEaccel.c:831:5: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:647:23: note: instantiated from:
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
                                                  ^
./src/video/SDL_RLEaccel.c:282:4: note: instantiated from:
          movq_r2m(mm3, *dstp);                         \
          ^
In file included from ./src/video/SDL_RLEaccel.c:99:
./src/video/mmx.h:379:28: note: instantiated from:
#define movq_r2m(reg, var)      mmx_r2m(movq, reg, var)
                                ^
<scratch space>:192:1: note: instantiated from:
"movq"
^
<inline asm>:1:2: note: instantiated into assembly here
        movq %mm3, %dx
        ^
--------------------------------------------------

According to the clang developers this is a invalid inline assembly.
Using the attached patch from the last commit in the below bug report fixes the
compile.
More details from: http://llvm.org/bugs/show_bug.cgi?id=6730

--HG--
branch : SDL-1.2
2011-01-30 13:38:57 -08:00
Sam Lantinga
e5a771fcad Colin Leroy 2011-01-26 04:24:20 PST
the pthread implementation of SDL_SemWaitTimeout() uses busy waiting, while
pthread's sem_timedwait() does work. Attached are patches that make use of it

--HG--
branch : SDL-1.2
2011-01-27 00:33:26 -08:00
Sam Lantinga
2be7f1865b Ozkan Sezer to slouken
The attached small patch updates SDL's libtoolized files for
pe-x86_64 magic, ie win/x64.

--HG--
branch : SDL-1.2
2011-01-26 12:26:27 -08:00
Sam Lantinga
75d7d9364d Missed a small part of the patch
--HG--
branch : SDL-1.2
2011-01-24 14:34:58 -08:00
Sam Lantinga
2b8a7320bf Fixed bug #1080
Markus Rathgeb      2011-01-23 14:34:23 PST

With kernel 2.6.31 the struct input_absinfo defined in linux/input.h changed.
A field "__s32 resolution" was added at the end of the struct.

Because the macro EVIOCGABS(abs) is using the struct input_absinfo, it would be
better (IMHO) to change the declaration of variable values to
"int values[sizeof(struct input_absinfo) / sizeof(int)];" or using "struct
input_absinfo" directly.

--HG--
branch : SDL-1.2
2011-01-24 14:31:32 -08:00
Sam Lantinga
af5e892e35 Michael Bicha to Sam
I came across further issues with SDL 1.2.14 on win32 in combination
with touch screens.

When you touched the screen older SDLs reported
SDL_MOUSEMOTION to the touch position
SDL_MOUSEBUTTONDOWN at the touch position

1.2.14 reports
SDL_MOUSEBUTTONDOWN at the last mouse position before the touch
and then a
SDL_MOUSEMOTION to the touch position

I found that to fix it in the file SDL_sysevents.c i had to put back the
following lines from 1.2.12 to get it working correctly again:
               if ( mouse_relative ) {
               /*    RJR: March 28, 2000
                   report internal mouse position if in relative mode */
                   x = 0; y = 0;
               } else {
                   x = (Sint16)LOWORD(lParam);
                   y = (Sint16)HIWORD(lParam);
#ifdef _WIN32_WCE
                   if (SDL_VideoSurface)
                       GapiTransform(this->hidden->userOrientation,
this->hidden->hiresFix, &x, &y);
#endif
               }
               posted = SDL_PrivateMouseButton(
                           state, button, x, y);

where there was only
               posted = SDL_PrivateMouseButton(
                           state, button, 0, 0);
in 1.2.14 (appx. line 484)

please feel free to put that change into any SDL lib you like in any way
you like and thanks for your great work !

--HG--
branch : SDL-1.2
2011-01-23 21:02:02 -08:00
Sam Lantinga
d4ac198b04 Patch from Haiku's Google Code-In student Daniel Marth, fixes an off-by-one issue in bwindow.
--HG--
branch : SDL-1.2
2010-12-03 16:55:25 -08:00
Sam Lantinga
59a374b27d This patch fixes a dllexport directive warning on Haiku
Scott McCreary
HaikuPorts

--HG--
branch : SDL-1.2
2010-09-19 08:56:53 -07:00
Sam Lantinga
27aa45979d Here's the patch we use when building SDL-1.2.14 and 1.2-hg on Haiku,
it only affects Haiku specific files so should be ok to apply in hg.

-Scott McCreary
HaikuPorts

--HG--
branch : SDL-1.2
2010-09-18 17:16:36 -07:00
Patrice Mandin
d532e5b2cd Use proper GEM API to handle mouse button events
--HG--
branch : SDL-1.2
2010-07-09 17:19:18 +02:00
Sam Lantinga
6e895b65ed Finally fixed bug 894 without breaking bug 716. Yay! :)
--HG--
branch : SDL-1.2
2010-07-20 00:01:26 -07:00
Sam Lantinga
1884f9add8 Fixed bug 1015
Don't set the WM_TRANSIENT_FOR property to an invalid value - delete it instead.

--HG--
branch : SDL-1.2
2010-07-18 11:37:12 -07:00
Sam Lantinga
049d2f44c7 RedHat patch: SDL-1.2.14-xio_error-rh603984.patch
--HG--
branch : SDL-1.2
2010-07-18 11:24:37 -07:00
Sam Lantinga
b07d8de729 RedHat patch: SDL-1.2.14-byteorder.patch
--HG--
branch : SDL-1.2
2010-07-18 11:22:47 -07:00
Sam Lantinga
7a99d1b90b RedHat patch: SDL-1.2.14-audiodriver.patch
--HG--
branch : SDL-1.2
2010-07-18 11:12:27 -07:00
Sam Lantinga
017012df21 Fixed bug 1006
Get the GLX functions with glXGetProcAddress() when available.

--HG--
branch : SDL-1.2
2010-07-18 11:11:37 -07:00
Sam Lantinga
edd35e7af0 Fixed bug 993
GCC supports unnamed unions now. :)

--HG--
branch : SDL-1.2
2010-07-18 10:51:25 -07:00
Sam Lantinga
50ac26967d Fixed bug 957
Fixed the documentation for SDL_GetWMInfo()

--HG--
branch : SDL-1.2
2010-07-18 10:39:24 -07:00
Sam Lantinga
9658a578d6 Better fix for bug 936
--HG--
branch : SDL-1.2
2010-07-18 10:28:57 -07:00
Sam Lantinga
b55d270161 Fixed bug 936
Make sure that eip doesn't overflow the copy buffer beforehand. :)

--HG--
branch : SDL-1.2
2010-07-18 10:08:06 -07:00
Sam Lantinga
a977e65fde Debian patch: 215_kfreebsd_gnu.diff
--HG--
branch : SDL-1.2
2010-07-18 08:12:48 -07:00
Sam Lantinga
19520ddca8 Debian patch: 012_nasm_include.diff
--HG--
branch : SDL-1.2
2010-07-18 07:55:34 -07:00
Sam Lantinga
27aaae96df Debian patch: 011_no_yasm.diff
--HG--
branch : SDL-1.2
2010-07-18 07:54:00 -07:00
Ryan C. Gordon
1daff39d16 SDL-1.2: Quartz fullscreen video contentRect was used uninitialized.
--HG--
branch : SDL-1.2
2010-04-25 20:16:38 -04:00
Sam Lantinga
a487ef0eac Fixed bug 978
Yann Leprince      2010-03-31 11:07:53 PDT

Please add a #serial line as below to sdl.m4 and increase the serial number
with each revision of this file. This allows using aclocal --install, thereby
enabling automatic updating of sdl.m4 in SDL-based packages that distribute it.

# serial 1

The complete documentation and rationale for #serial can be found in the
Automake documentation:
<http://www.gnu.org/software/automake/manual/html_node/Serials.html>.

--HG--
branch : SDL-1.2
2010-04-23 02:19:19 -07:00
Sam Lantinga
187b226293 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.

--HG--
branch : SDL-1.2
2010-04-23 02:14:06 -07:00
Sam Lantinga
439d5513cf 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.

--HG--
branch : SDL-1.2
2010-04-13 21:46:10 -07:00
Sam Lantinga
ff222d5115 CVS is so last decade...
--HG--
branch : SDL-1.2
2010-04-13 21:24:55 -07:00
Sam Lantinga
eae15b1ad8 Fixed bug #943
Ozkan Sezer      2010-02-06 12:31:06 PST

Hi:

Here are some small fixes for compiling SDL against mingw-w64.
(see http://mingw-w64.sourceforge.net/ .  Despite the name, it
supports both win32 and win64.)  Two patches, one for SDL-1.2
and one for SDL-1.3 attached.

src/audio/windx5/directx.h and src/video/windx5/directx.h (both
SDL-1.2 and SDL-1.3.)  I get compilation errors about some union
not having a member named u1 and alike, because of other system
headers being included before this one and them already defining
DUMMYUNIONNAME and stuff. This header probably assumes that those
stuff are defined in windef.h, but mingw-w64 headers define them
in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to
the top of the file.  SDL_dx5yuv.c (SDL-1.2-only) also needs to
include the header before SDL_video.h to avoid the same problem.

src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) :
The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric
because _beginthreadex returns uintptr_t, not unsigned long which
is 32 bits in win64. Changing the return type to uintptr_t fixes
it.

Hope these are useful. Thanks.

--HG--
branch : SDL-1.2
2010-03-10 15:04:13 +00:00
Ryan C. Gordon
d047b08e55 Replaced README.SVN with Mercurial information, for 1.2 branch.
--HG--
branch : SDL-1.2
2010-02-28 23:45:02 -08:00
Ryan C. Gordon
412da7f928 Added .hgignore file for 1.2 branch.
--HG--
branch : SDL-1.2
2010-02-28 02:19:04 -05:00
Ryan C. Gordon
bc3d64a52a Readded Xcode.tar.gz to the Mercurial repository.
(This was stripped from previous revisions to make the repo smaller.)

--HG--
branch : SDL-1.2
2010-02-28 00:31:38 -05:00
Ryan C. Gordon
22cd9e3e14 Fixed channel swizzling for ALSA target with 6-channel output.
Fixes Bugzilla #942.

--HG--
branch : SDL-1.2
2010-02-12 16:59:34 +00:00
Ryan C. Gordon
393fd240ce Fixed uninitialized variable in FreeBSD joystick.
Patch by Marcus von Appen.

--HG--
branch : SDL-1.2
2010-02-05 19:20:49 +00:00
Ryan C. Gordon
30d034e824 PulseAudio: get the window title for the context name if it wasn't set already.
Will still fall back to get_progname() if it can't figure out the title.

--HG--
branch : SDL-1.2
2010-01-24 20:08:14 +00:00