Commit Graph

2320 Commits

Author SHA1 Message Date
Sam Lantinga
0f00a541da Use MacOS line endings for Mac resource files
--HG--
branch : SDL-1.2
2009-10-18 16:23:12 +00:00
Sam Lantinga
0c1cc75bbe Use MacOS line endings for SDL.x
--HG--
branch : SDL-1.2
2009-10-18 16:17:13 +00:00
Sam Lantinga
4ec7a0bc45 Fixed bug #853
Ludwig Nussel      2009-10-18 05:34:18 PDT

src/joystick/linux/SDL_sysjoystick.c has some problems:

- test_bit() might break with strict aliasing
- test_bit() assumes array is Uint32 but its actually "unsigned long"
  on 64bit systems sizeof(long) != sizeof(Uint32).
- the keybit array is too small
- the arrays are unitialized so the number of
  detected buttons is quite random

--HG--
branch : SDL-1.2
2009-10-18 16:14:57 +00:00
Sam Lantinga
c41d89fdc8 We no longer have a DirectInput link requirement
--HG--
branch : SDL-1.2
2009-10-17 17:35:48 +00:00
Sam Lantinga
c97278db23 Fixed bug #849
This was a silly bug. :)

--HG--
branch : SDL-1.2
2009-10-17 16:49:23 +00:00
Sam Lantinga
eea9c5c809 Don't need the define anymore...
--HG--
branch : SDL-1.2
2009-10-17 07:05:33 +00:00
Sam Lantinga
e79fc21546 Enable the ALSA debug code via environment variable
--HG--
branch : SDL-1.2
2009-10-17 07:04:58 +00:00
Sam Lantinga
b634b7d198 Option to fix bug #851
For some people setting the period size works better (and is what SDL 1.2.13 did), but for most people it's the same or worse.  You can use an environment variable to pick which one you want.

--HG--
branch : SDL-1.2
2009-10-17 06:55:17 +00:00
Sam Lantinga
54db02f8b2 matthew green
actually, please don't apply this upstream.  i need to think about
a better solution..

thanks.

.mrg.

--HG--
branch : SDL-1.2
2009-10-17 05:05:29 +00:00
Sam Lantinga
6ccc33a7a8 Allow the application to resize the window without destroying the OpenGL context
--HG--
branch : SDL-1.2
2009-10-16 07:24:11 +00:00
Sam Lantinga
8f203969cf 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
2009-10-16 05:12:20 +00:00
Sam Lantinga
ab219723ac 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
2009-10-16 05:06:17 +00:00
Sam Lantinga
7b8a094162 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
2009-10-16 05:05:21 +00:00
Sam Lantinga
a225b3fe43 It helps to use the right constant. :)
--HG--
branch : SDL-1.2
2009-10-16 04:29:27 +00:00
Sam Lantinga
79753ff54b Use SDL's byte order check, just to be sure
--HG--
branch : SDL-1.2
2009-10-16 04:24:03 +00:00
Ryan C. Gordon
5ef00a7131 Don't call it "ALSA 0.9 PCM audio" anymore, since we moved to the stable API.
--HG--
branch : SDL-1.2
2009-10-15 05:29:49 +00:00
Sam Lantinga
d82e5fefad Fixed building on Mac OS X
--HG--
branch : SDL-1.2
2009-10-15 05:18:48 +00:00
Sam Lantinga
20aa1c739b 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
2009-10-15 02:52:11 +00:00
Sam Lantinga
3507bd99c3 Thilo helped me track down the audio issue with 22050 hz stereo sound. Yay!
--HG--
branch : SDL-1.2
2009-10-14 07:34:35 +00:00
Patrice Mandin
8e4acb5c98 Add a note for experimental Milan support.
--HG--
branch : SDL-1.2
2009-10-13 18:14:13 +00:00
Sam Lantinga
7d2e20993f 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
2009-10-13 09:59:20 +00:00
Sam Lantinga
ffd9005e0f 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
2009-10-13 09:56:15 +00:00
Sam Lantinga
d61038dbd8 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
2009-10-13 09:35:37 +00:00
Sam Lantinga
53ac1950cc Fixed debug code to print correct values
Passed a meaningful value to snd_pcm_sw_params_set_start_threshold()

--HG--
branch : SDL-1.2
2009-10-13 09:24:05 +00:00
Sam Lantinga
46ea188de1 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
2009-10-13 08:42:40 +00:00
Ryan C. Gordon
0689c21666 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
2009-10-13 08:27:28 +00:00
Sam Lantinga
efd3834925 Only show the dynamic audio libraries if we'll be dynamically loading them
--HG--
branch : SDL-1.2
2009-10-13 06:45:02 +00:00
Sam Lantinga
86439276a8 Simplify and improve dynamic library detection, taken from SDL_image
--HG--
branch : SDL-1.2
2009-10-13 05:20:09 +00:00
Sam Lantinga
313fe0b5b4 We don't need dlvsym() for ALSA anymore, yay!
--HG--
branch : SDL-1.2
2009-10-13 04:23:34 +00:00
Sam Lantinga
3c0c9a83e2 Merged fix from SDL 1.3
--HG--
branch : SDL-1.2
2009-10-12 23:21:19 +00:00
Sam Lantinga
b8ea98deb0 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
2009-10-12 21:07:12 +00:00
Sam Lantinga
aa424f5c24 Joystick patch from FreeBSD ports system
--HG--
branch : SDL-1.2
2009-10-12 09:32:55 +00:00
Ryan C. Gordon
502b4667e6 Forcibly disabled MMX mixers.
Hopefully fixes Bugzilla #649.

--HG--
branch : SDL-1.2
2009-10-12 08:58:12 +00:00
Ryan C. Gordon
fdf24e0516 Whoops, need to convert from bits to bytes for frame size.
--HG--
branch : SDL-1.2
2009-10-12 08:18:36 +00:00
Ryan C. Gordon
c14c3e1851 Corrected misuse of snd_pcm_writei() in ALSA driver.
Hopefully fixes Bugzilla #650.

--HG--
branch : SDL-1.2
2009-10-12 08:06:40 +00:00
Sam Lantinga
81deab6316 Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up.
--HG--
branch : SDL-1.2
2009-10-10 15:10:06 +00:00
Sam Lantinga
99588a8072 Added SDL_VIDEO_FULLSCREEN_DISPLAY as a preferred synonym for SDL_VIDEO_FULLSCREEN_HEAD on X11.
--HG--
branch : SDL-1.2
2009-10-10 15:06:04 +00:00
Sam Lantinga
bb0a172363 Put the braces on the next line so vi can find the beginning of the function.
--HG--
branch : SDL-1.2
2009-10-10 14:59:32 +00:00
Patrice Mandin
9d9ccc68d5 Disable double buffer for Milan. Also set current width,height after we read it.
--HG--
branch : SDL-1.2
2009-10-10 10:28:05 +00:00
Sam Lantinga
7af1e847a7 Added missing caca files
--HG--
branch : SDL-1.2
2009-10-10 10:17:51 +00:00
Sam Lantinga
0a6ebe0ca4 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
2009-10-10 10:15:35 +00:00
Sam Lantinga
36e05fe941 Adapted from Debian patch: 320_activate_xrandr_on_default.diff
--HG--
branch : SDL-1.2
2009-10-10 10:14:01 +00:00
Sam Lantinga
226ff42fd6 Debian patch: 310_segfault_noGLX.diff
--HG--
branch : SDL-1.2
2009-10-10 10:10:36 +00:00
Sam Lantinga
7b5f326f66 Debian patch: f230_manpages.diff
--HG--
branch : SDL-1.2
2009-10-10 10:09:01 +00:00
Sam Lantinga
a0d55f57d2 Debian patch: 218_joystick_memmove.diff
--HG--
branch : SDL-1.2
2009-10-10 10:01:38 +00:00
Sam Lantinga
754abe6611 Debian patch: 216_page_size.diff
--HG--
branch : SDL-1.2
2009-10-10 09:59:29 +00:00
Sam Lantinga
9d826b4725 Fixed bug #833
Fixed errors with older autoconf

--HG--
branch : SDL-1.2
2009-10-10 09:58:32 +00:00
Sam Lantinga
6989dcdc70 Don't double-include sys/param.h
--HG--
branch : SDL-1.2
2009-10-10 09:43:50 +00:00
Sam Lantinga
7fa4abf846 Whoops, FreeBSD 6.2 doesn't define __FreeBSD_kernel_version
--HG--
branch : SDL-1.2
2009-10-10 09:43:08 +00:00
Sam Lantinga
5b40072732 Adapted from 215_kfreebsd_gnu.diff
--HG--
branch : SDL-1.2
2009-10-10 09:38:02 +00:00