Commit graph

2312 commits

Author SHA1 Message Date
Sam Lantinga
28207014ab matthew green
actually, please don't apply this upstream.  i need to think about
a better solution..

thanks.

.mrg.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404098
2009-10-17 05:05:29 +00:00
Sam Lantinga
0b57841390 Allow the application to resize the window without destroying the OpenGL context
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404097
2009-10-16 07:24:11 +00:00
Sam Lantinga
cb5e4ff83f patch-pulse (from ahoka@NetBSD.org):
Fix assertion triggered in pulsaudio by returning "unknown" instead
of NULL pointer when guessing application name.

- Use getprogname on NetBSD as it wont return NULL

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404096
2009-10-16 05:12:20 +00:00
Sam Lantinga
242f11f73b patch-ac (from mrg@NetBSD.org):
Look for libGL.so, not any particular libGL.so.<X>, on NetBSD.
(the comment inline explains why)

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404095
2009-10-16 05:06:17 +00:00
Sam Lantinga
dbe69ecf39 patch-ab (from reinoud@NetBSD.org):
Apply patch to first unlock the CD before trying to eject it. Since
SDL doesn't seem to have lock/unlock primitives, this looks like the
right thing to do.

Fixes audio/tcd's eject function too.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404094
2009-10-16 05:05:21 +00:00
Sam Lantinga
a084339a4f It helps to use the right constant. :)
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404093
2009-10-16 04:29:27 +00:00
Sam Lantinga
f068193fd9 Use SDL's byte order check, just to be sure
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404092
2009-10-16 04:24:03 +00:00
Ryan C. Gordon
b627675ba0 Don't call it "ALSA 0.9 PCM audio" anymore, since we moved to the stable API.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404091
2009-10-15 05:29:49 +00:00
Sam Lantinga
aeea9fcac0 Fixed building on Mac OS X
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404090
2009-10-15 05:18:48 +00:00
Sam Lantinga
2b8a4a45ef Fixed bug #728
I am using a headset on my monitor as primary sound output device. From time to
time it happens that I switch off my monitor when I leave my computer and
switch it on when I come back.
When doing so while wesnoth is running I get no sound back when I switch on my
monitor. There is probably good reason for that. Therefore I wanted to exit and
restart wesnoth. Unfortunately, wesnoth always hangs in this situation. It
looks like wesnoth can not be exited when the primary sound device vanished.
I created a backtrace of this situation (please see attachment).

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404089
2009-10-15 02:52:11 +00:00
Sam Lantinga
4270bc2aa0 Thilo helped me track down the audio issue with 22050 hz stereo sound. Yay!
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404088
2009-10-14 07:34:35 +00:00
Patrice Mandin
a7c0a31643 Add a note for experimental Milan support.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404084
2009-10-13 18:14:13 +00:00
Sam Lantinga
4ae0e6460e Use the plug: ALSA devices for surround sound formats, which have automatic sample format/rate conversion.
Based on feedback from the ALSA development mailing list:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-October/022267.html

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404081
2009-10-13 09:59:20 +00:00
Sam Lantinga
ec6a0f32bb Switched from setting the period size and count to setting the buffer size directly, based on feedback from the ALSA development list:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-October/022267.html

This has the nice side effect of reducing latency on my SBLive! card.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404080
2009-10-13 09:56:15 +00:00
Sam Lantinga
9786668dab ALSA's idea of a "frame" is the same as SDL's idea of a "sample". The frame is a single sample on a single channel, and we've defined the frames for each channel as being interleaved.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404079
2009-10-13 09:35:37 +00:00
Sam Lantinga
ff4ec16bb6 Fixed debug code to print correct values
Passed a meaningful value to snd_pcm_sw_params_set_start_threshold()

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404078
2009-10-13 09:24:05 +00:00
Sam Lantinga
7de1a1a813 On recent distributions ALSA pipes streams through PulseAudio anyway, so using PulseAudio first when it's available will improve latency and reduce ALSA configuration quirks.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404077
2009-10-13 08:42:40 +00:00
Ryan C. Gordon
8df8f52eb1 Corrected my snd_pcm_writei fix.
Apparently ALSA says "frames" but it means samples...you don't split this into
 groups by number of channels.

The adventure continues.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404076
2009-10-13 08:27:28 +00:00
Sam Lantinga
41f37eccc5 Only show the dynamic audio libraries if we'll be dynamically loading them
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404072
2009-10-13 06:45:02 +00:00
Sam Lantinga
90ac468f99 Simplify and improve dynamic library detection, taken from SDL_image
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404067
2009-10-13 05:20:09 +00:00
Sam Lantinga
44980b540d We don't need dlvsym() for ALSA anymore, yay!
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404066
2009-10-13 04:23:34 +00:00
Sam Lantinga
9e00bd18a7 Merged fix from SDL 1.3
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404065
2009-10-12 23:21:19 +00:00
Sam Lantinga
deaf4b7e93 Steven Noonan to sdl
While trying to build the SDLMain.m included with SDL 1.2.14, with
#define SDL_USE_NIB_FILE 1:

/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:
In function '-[SDLMain fixMenu:withAppName:]':
/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:122:
warning: 'sizeToFit' is deprecated (declared at
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:281)
/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:
In function 'main':
/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:376:
warning: 'poseAsClass:' is deprecated (declared at
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:127)
/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:376:
error: 'poseAsClass:' is unavailable (declared at
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:127)
/Users/steven/Development/darwinia/targets/macosx/Darwinia/SDLMain.m:377:
warning: passing argument 2 of 'NSApplicationMain' from incompatible
pointer type



Eric Wing to Sam

I don't have time today to look at this in detail, but the problem is definitely the poseAsClass: method.
This was deprecated in Obj-C 2.0 and not retained in 64-bit.

I've never used this method and it has always been limited to esoteric uses. I think this is why Apple wanted to dump it (among complicating some other things they do). I have read about others getting bit by this when migrating. Long story short, there really isn't a migration path for this method. The question that then must be asked is why are we using it (what does it accomplish), and then figure out the 'proper' way of accomplishing that.

Glancing at SDLMain.m, it's not obvious to me why it is there or what it is really accomplishing. My only speculation is that NSApplicationMain hardcodes something to look for NSApplication and a subclass (SDLApplication) fails for some reason (assuming that the original coder did this for good reason).

Three thoughts come to mind.
1) The Info.plist has properties to control things related to the startup class and nib.
NSPrincipalClass, NSMainNibFile

Maybe principle class needs to be SDLApplication and we can delete the poseAs

2) I was told that 10.6 introduced new APIs to make programatic NIB wrangling and avoidance easier. Unfortunately, I don't know the specifics.


3) Instead of subclassing NSApplication in SDLMain.m, maybe we can just add a category. It looks like the following is the only thing that is done (quick glance):

@interface SDLApplication : NSApplication
@end

@implementation SDLApplication
/* Invoked from the Quit menu item */
- (void)terminate:(id)sender
{
   /* Post a SDL_QUIT event */
   SDL_Event event;
   event.type = SDL_QUIT;
   SDL_PushEvent(&event);
}
@end


So instead, we change this to: (warning written in mail and untested)

@interface NSApplication (SDLApplication)
- (void) terminate:(id)sender;
@end

@implementation NSApplication (SDLApplication)
/* Invoked from the Quit menu item */
- (void)terminate:(id)sender
{
   /* Post a SDL_QUIT event */
   SDL_Event event;
   event.type = SDL_QUIT;
   SDL_PushEvent(&event);
}
@end


Then everywhere SDLApplication is used, we change it to NSApplication (and remove the poseAsClass line).

Perhaps you could ask the bug reporter to try this solution (#3).
And if that fails, maybe try #1.


-Eric


Steven Noonan to Sam

The suggested change (diff below) seems to work fine.

- Steven

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404064
2009-10-12 21:07:12 +00:00
Sam Lantinga
0e89501b8e Joystick patch from FreeBSD ports system
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404060
2009-10-12 09:32:55 +00:00
Ryan C. Gordon
d5b19efe79 Forcibly disabled MMX mixers.
Hopefully fixes Bugzilla #649.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404059
2009-10-12 08:58:12 +00:00
Ryan C. Gordon
5409db51f6 Whoops, need to convert from bits to bytes for frame size.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404057
2009-10-12 08:18:36 +00:00
Ryan C. Gordon
c865dbf891 Corrected misuse of snd_pcm_writei() in ALSA driver.
Hopefully fixes Bugzilla #650.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404056
2009-10-12 08:06:40 +00:00
Sam Lantinga
56967065f7 Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404043
2009-10-10 15:10:06 +00:00
Sam Lantinga
007680c438 Added SDL_VIDEO_FULLSCREEN_DISPLAY as a preferred synonym for SDL_VIDEO_FULLSCREEN_HEAD on X11.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404042
2009-10-10 15:06:04 +00:00
Sam Lantinga
7d7dbf1910 Put the braces on the next line so vi can find the beginning of the function.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404041
2009-10-10 14:59:32 +00:00
Patrice Mandin
83b57facc5 Disable double buffer for Milan. Also set current width,height after we read it.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404038
2009-10-10 10:28:05 +00:00
Sam Lantinga
3b682483b5 Added missing caca files
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404037
2009-10-10 10:17:51 +00:00
Sam Lantinga
a1bececfc3 Fixed bug #838
Ozkan Sezer      2009-10-10 01:45:27 PDT

sdlenvvars.html doesn't list pulse among the supported values for
SDL_AUDIODRIVER var.  Attached a quick patch to remedy that, hopefully placing
the entry in the right order.  Regards.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404036
2009-10-10 10:15:35 +00:00
Sam Lantinga
dc6913d2e1 Adapted from Debian patch: 320_activate_xrandr_on_default.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404035
2009-10-10 10:14:01 +00:00
Sam Lantinga
cb2bc4152c Debian patch: 310_segfault_noGLX.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404034
2009-10-10 10:10:36 +00:00
Sam Lantinga
17a7853ac1 Debian patch: f230_manpages.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404033
2009-10-10 10:09:01 +00:00
Sam Lantinga
826b5d2690 Debian patch: 218_joystick_memmove.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404031
2009-10-10 10:01:38 +00:00
Sam Lantinga
dd4a6eaa0d Debian patch: 216_page_size.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404030
2009-10-10 09:59:29 +00:00
Sam Lantinga
bca21936a4 Fixed bug #833
Fixed errors with older autoconf

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404029
2009-10-10 09:58:32 +00:00
Sam Lantinga
55cc565391 Don't double-include sys/param.h
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404026
2009-10-10 09:43:50 +00:00
Sam Lantinga
600685ad07 Whoops, FreeBSD 6.2 doesn't define __FreeBSD_kernel_version
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404025
2009-10-10 09:43:08 +00:00
Sam Lantinga
279116cdd6 Adapted from 215_kfreebsd_gnu.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404024
2009-10-10 09:38:02 +00:00
Sam Lantinga
8e0af4ac94 Debian patch: 214_missing_mmx_blit.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404022
2009-10-10 09:28:35 +00:00
Sam Lantinga
0d0229d870 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.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404020
2009-10-10 09:22:11 +00:00
Sam Lantinga
42b81dd3ee Added patch note for revision 5005
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404019
2009-10-10 09:21:09 +00:00
Sam Lantinga
c56bce7975 Debian patch: 209_alsa_priority.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404018
2009-10-10 09:07:51 +00:00
Sam Lantinga
87ffb1444e Debian patch: 050_altivec_detection.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404017
2009-10-10 09:03:08 +00:00
Sam Lantinga
2fd226c25c Changed environment variable to match Debian patch 205_lock_keys.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404016
2009-10-10 09:02:17 +00:00
Sam Lantinga
37ec7a4604 Disable iPodLinux code by default (can be enabled with --enable-ipod)
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404015
2009-10-10 08:59:28 +00:00
Sam Lantinga
69e01437c8 Debian patch: 040_propagate_pic_to_nasm.diff
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404014
2009-10-10 08:56:01 +00:00