Got OSX-SDL more or less working again.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@695 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2006-08-02 15:09:37 +00:00
parent 16bd367f8c
commit b8e651ffaa
3 changed files with 25 additions and 10 deletions

View File

@ -29,6 +29,7 @@
// Start playing this instance of OOMusic, stopping any other instance
// currently playing.
- (BOOL) play;
- (BOOL) playLooped;
// Stop the music if this instance is currently playing.
- (void) stop;

View File

@ -149,6 +149,19 @@ void musicFinished()
return YES;
}
/*
* Play the music represented by this OOMusic instance, looping until stopped.
* This will replace any music currently playing.
*
* If this instance is already playing, there is no effect.
*
* Returns YES for success, or NO if there was a problem playing the music.
*/
- (BOOL) playLooped
{
return [self play];
}
/*
* Stop playing this piece of music.
*

View File

@ -19,7 +19,7 @@ int debug = NO;
int main(int argc, char *argv[])
{
#ifdef GNUSTEP && !OOLITE_SDL_MAC
#ifdef GNUSTEP
int i;
// Need this because we're not using the default run loop's autorelease
@ -50,19 +50,20 @@ int main(int argc, char *argv[])
// Call applicationDidFinishLaunching because NSApp is not running in
// GNUstep port.
[controller applicationDidFinishLaunching: nil];
#else
return NSApplicationMain(argc, (const char *)argv);
#endif
// never reached
return 0;
}
/*
* This is called from a couple of places, and having it here saves one more
* AppKit dependency.
*/
//void NSBeep()
//{
//}
#if OOLITE_SDL_MAC
@implementation NSWindow (SDLBugWorkaround)
- (void)release
{}
@end
#endif