Commit Graph

2296 Commits

Author SHA1 Message Date
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
Sam Lantinga
9e065e6d87 Debian patch: 214_missing_mmx_blit.diff
--HG--
branch : SDL-1.2
2009-10-10 09:28:35 +00:00
Sam Lantinga
2aa5bf5f41 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
2009-10-10 09:22:11 +00:00
Sam Lantinga
f196b8d1c2 Added patch note for revision 5005
--HG--
branch : SDL-1.2
2009-10-10 09:21:09 +00:00
Sam Lantinga
b11d094c13 Debian patch: 209_alsa_priority.diff
--HG--
branch : SDL-1.2
2009-10-10 09:07:51 +00:00
Sam Lantinga
df8e54f50f Debian patch: 050_altivec_detection.diff
--HG--
branch : SDL-1.2
2009-10-10 09:03:08 +00:00
Sam Lantinga
00f8c1e08c Changed environment variable to match Debian patch 205_lock_keys.diff
--HG--
branch : SDL-1.2
2009-10-10 09:02:17 +00:00
Sam Lantinga
599ce4dcba Disable iPodLinux code by default (can be enabled with --enable-ipod)
--HG--
branch : SDL-1.2
2009-10-10 08:59:28 +00:00
Sam Lantinga
81caff6917 Debian patch: 040_propagate_pic_to_nasm.diff
--HG--
branch : SDL-1.2
2009-10-10 08:56:01 +00:00
Sam Lantinga
282e6d58d5 Debian patch: 030_pulseaudio_enable.diff
--HG--
branch : SDL-1.2
2009-10-10 08:50:35 +00:00
Sam Lantinga
2158b7ad24 Debian patch: 020_libcaca_new_api.diff
--HG--
branch : SDL-1.2
2009-10-10 08:46:06 +00:00
Sam Lantinga
bd32e944cb Updated change log with recent checkins
--HG--
branch : SDL-1.2
2009-10-10 08:11:36 +00:00
Sam Lantinga
95666b4937 Fixed bug #627
Increased accuracy of alpha blend calculation

--HG--
branch : SDL-1.2
2009-10-10 07:48:15 +00:00
Ryan C. Gordon
d32ba2f65c Moved to stable ALSA API.
This cleans up a few problems with our use of the ancient ALSA 0.9 API.

This means we can ditch the dlvsym() nonsense and use SDL_LoadFunction(), too.

 Fixes Bugzilla #745.

--HG--
branch : SDL-1.2
2009-10-10 07:33:18 +00:00
Sam Lantinga
76adf05962 Fixed bug #634
If TranslateMessage() isn't done, then IME messages aren't generated.

--HG--
branch : SDL-1.2
2009-10-10 07:30:00 +00:00
Ryan C. Gordon
e15e4f7acd Cache the swap control setting, even on Mesa.
--HG--
branch : SDL-1.2
2009-10-10 06:38:02 +00:00
Ryan C. Gordon
506ee5e93d Fixed incorrect return value test for SGI swap control.
--HG--
branch : SDL-1.2
2009-10-10 05:21:31 +00:00
Ryan C. Gordon
418bc10147 Default value for SGI swap control GL attribute should be -1.
Explicitly try to set it if you want a different value. Different glX
 implementations appear to have different defaults for this, and you can't
 query them for the current value.

--HG--
branch : SDL-1.2
2009-10-10 05:17:47 +00:00
Sam Lantinga
0ae2005f14 Fixed bug #798
kty@lavabit.com      2009-09-19 14:19:04 PDT

The stable release of SDL 1.2.13 for BeOS/Haiku has a bug in
BE_FindClosestFSMode that causes it to sometimes not select the best mode when
going fullscreen. There are in fact two bugs in the implementation but I will
not go into specifics because there is already a patch for it in the developer
SVN 1.3. However I am still reporting it because I believe the following code
is a better patch for the issue. The current implementation on SVN only works
if it is able to find an exact match for the requested mode. However, by
scanning from lowest-to-highest resolution instead of highest-to-lowest, one
can find the best mode at all times

--HG--
branch : SDL-1.2
2009-10-10 02:11:07 +00:00
Sam Lantinga
cbb826df29 Fixed bug #831
Andrey      2009-10-09 08:08:04 PDT

gapi_hires_fix

I made a mistake with the conclusions.
And last time I as was mistaken with conclusions.
Now I thought about in more detail the algorithm works.
I have made it that the project fheroes2 well worked.
The result of my work in attachment.
I have a possibility to check up it on different models pocketpc.
I checked various modes screen of 320x320, 320x240, 640x480, 800x400.

--HG--
branch : SDL-1.2
2009-10-10 02:03:53 +00:00
Ryan C. Gordon
6f4aba436f Remove sdl.pc during "make uninstall"
Fixes Bugzilla #813 for the 1.2 branch.

--HG--
branch : SDL-1.2
2009-10-08 09:02:03 +00:00
Ryan C. Gordon
1abbe4e2eb Allow Unicode filenames in RWOPS on Windows.
Fixes Bugzilla #733.

--HG--
branch : SDL-1.2
2009-10-08 07:48:37 +00:00
Sam Lantinga
3d5fcac452 Ozkan Sezer 2009-04-01 23:17:13 PDT
This change should be applied to the 1.2 branch, too, because the svn version
SDL_net requires it.

--HG--
branch : SDL-1.2
2009-10-08 07:45:55 +00:00
Sam Lantinga
06a18691c2 Update config.guess and config.sub
--HG--
branch : SDL-1.2
2009-10-08 07:09:04 +00:00
Sam Lantinga
31867aa56e SDL 1.2.14 is a recommended update.
--HG--
branch : SDL-1.2
2009-10-07 08:03:32 +00:00