Commit graph

2425 commits

Author SHA1 Message Date
Ryan C. Gordon
fcf143d294 Optionally don't clear the fbcon framebuffer on shutdown.
The new behavior is triggered by setting the environment variable
SDL_FBCON_DONT_CLEAR.

This is useful in certain circumstances (specifically: a game launcher on an
embedded device can leave a "now loading!" screen on the framebuffer while
another process is starting up).

Fixes Bugzilla #1251.

Thanks to Paul Cercueil for the patch!

--HG--
branch : SDL-1.2
2011-08-21 09:26:56 -04:00
Ryan C. Gordon
59a7f8a598 Don't force nasm to use a.out on OpenBSD. They've been on ELF for a long time.
Fixes Bugzilla #538.

Thanks to Brad Smith for the patch!

--HG--
branch : SDL-1.2
2011-08-21 02:52:15 -04:00
Sam Lantinga
c3c3d4dcb8 Removed some extra ppc scaffolding
--HG--
branch : SDL-1.2
2011-08-14 17:21:12 -04:00
Sam Lantinga
3b5adfdca1 Fat build doesn't support PPC anymore.
--HG--
branch : SDL-1.2
2011-08-14 17:17:17 -04:00
Patrice Mandin
499690cc0f Fix typo
--HG--
branch : SDL-1.2
2011-08-11 18:50:45 +02:00
Ryan C. Gordon
b80d660a1d Fixed SDL 1.2 fullscreen OpenGL on Mac OS X 10.7.
I'm not sure if there was a way to make CGLSetFullScreen() work, but the
Cocoa path works fine on all Intel Macs.

Please note that the "official" way to do fullscreen in 10.7 is just to make
a window the size of the display mode, and OS X is now smart enough to
recognize this as "fullscreen", but this helps earlier versions of the OS in
any case.

--HG--
branch : SDL-1.2
2011-08-10 01:25:00 -04:00
Ryan C. Gordon
3ac8cc3067 Fixes for OpenGL on Haiku.
testgl now passes when this patch is used.

This patch was originally from Urias McCullough (umccullough).

--HG--
branch : SDL-1.2
2011-08-04 01:44:32 -04:00
Ryan C. Gordon
d4cd5bc4ca Need to add this line for sa_sigaction check in configure to work.
--HG--
branch : SDL-1.2
2011-07-20 16:35:04 -07:00
Ryan C. Gordon
1f822b71a7 Fixed minor typo in a comment.
--HG--
branch : SDL-1.2
extra : rebase_source : 6ce52e4aa61fd862b0af75a6b22424a8e7ea5648
2011-07-19 22:10:35 -07:00
Ryan C. Gordon
e45148e454 Quartz: Don't use -[NSWindow center] on the fullscreen window.
"Centering" is a little off-center, vertically. Apparently in non-fullscreen
 apps, this is more aestetically pleasing or something.

Fixes positioning on fullscreen video modes on Mac OS X.

--HG--
branch : SDL-1.2
2011-07-18 20:32:40 -07:00
Ryan C. Gordon
e28404e104 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
fe0bd83030 Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs.
--HG--
branch : SDL-1.2
2011-07-17 01:03:13 -07:00
Patrice Mandin
619e6fbf06 Check sa_sigaction member of struct sigaction
--HG--
branch : SDL-1.2
2011-07-14 15:40:07 +02:00
Ryan C. Gordon
e296b4d8ec 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
2468efa6b8 Minor whitespace cleanup.
--HG--
branch : SDL-1.2
2011-07-07 11:50:30 -07:00
Ryan C. Gordon
0a9f2c2df9 Cleaned up compiler warnings about unchecked return values.
--HG--
branch : SDL-1.2
2011-07-07 11:49:46 -07:00
Ryan C. Gordon
cdc8dadd58 Don't call CGContextRelease() on object Cocoa already flagged for autorelease.
Thanks to Kirk A. Baker for this fix!

--HG--
branch : SDL-1.2
extra : rebase_source : d95b7cbb9c000b2c23b5e85724782d97de3006aa
2011-06-04 15:34:32 -04:00
Ryan C. Gordon
9f494c72db 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
extra : rebase_source : 3a2684f4ab920927e1299400e3bc894bebee3bcf
2011-06-04 15:33:50 -04:00
Sam Lantinga
2d65370f45 Fixed compiler warning
--HG--
branch : SDL-1.2
2011-03-21 13:33:29 -07:00
Sam Lantinga
4a4b527593 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
e7770b13f0 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
ae48cd353d 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
eff699e265 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
8a45a9a9ef 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
04c6d9c5d9 Fixed compile error
--HG--
branch : SDL-1.2
2011-02-04 09:07:39 -08:00
Sam Lantinga
0cba3ac41b 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
bb7e445843 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
60e40dbbd2 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
dad7b720ca Missed a small part of the patch
--HG--
branch : SDL-1.2
2011-01-24 14:34:58 -08:00
Sam Lantinga
41a38082c1 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
d9afe8da0f 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
7eff917096 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
b2f25a1a3d 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
48c665b227 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
217991f8b4 Use proper GEM API to handle mouse button events
--HG--
branch : SDL-1.2
2010-07-09 17:19:18 +02:00
Sam Lantinga
af92be6d1c Finally fixed bug 894 without breaking bug 716. Yay! :)
--HG--
branch : SDL-1.2
2010-07-20 00:01:26 -07:00
Sam Lantinga
c1daff96e0 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
54b35e5565 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
1973eb05db RedHat patch: SDL-1.2.14-byteorder.patch
--HG--
branch : SDL-1.2
2010-07-18 11:22:47 -07:00
Sam Lantinga
2766d045dc RedHat patch: SDL-1.2.14-audiodriver.patch
--HG--
branch : SDL-1.2
2010-07-18 11:12:27 -07:00
Sam Lantinga
1bb1bc6873 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
0e67e2b55e Fixed bug 993
GCC supports unnamed unions now. :)

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

--HG--
branch : SDL-1.2
2010-07-18 10:39:24 -07:00
Sam Lantinga
a1cee1cf8c Better fix for bug 936
--HG--
branch : SDL-1.2
2010-07-18 10:28:57 -07:00
Sam Lantinga
a213c9590f 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
f0f094ad30 Debian patch: 215_kfreebsd_gnu.diff
--HG--
branch : SDL-1.2
2010-07-18 08:12:48 -07:00
Sam Lantinga
0d461a0322 Debian patch: 012_nasm_include.diff
--HG--
branch : SDL-1.2
2010-07-18 07:55:34 -07:00
Sam Lantinga
38ae897920 Debian patch: 011_no_yasm.diff
--HG--
branch : SDL-1.2
2010-07-18 07:54:00 -07:00
Ryan C. Gordon
18aab5b130 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
8a03e49b27 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