Mercurial > hg > openttd
changeset 5388:9a801b20d4f1 draft
(svn r7577) -Fix (r7565): Missed out some OSX files (Bjarni)
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Wed, 27 Dec 2006 14:27:30 +0000 |
parents | fd0f2a035464 |
children | 6c95f926ef52 |
files | music/qtmidi.c os/macosx/splash.c |
diffstat | 2 files changed, 19 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/music/qtmidi.c +++ b/music/qtmidi.c @@ -92,7 +92,7 @@ if (info.fdType != midiType && !(info.fdFlags & kIsAlias)) { info.fdType = midiType; FSpSetFInfo(spec, &info); - DEBUG(driver, 3) ("qtmidi: changed filetype to 'Midi'"); + DEBUG(driver, 3, "qtmidi: changed filetype to 'Midi'"); } } @@ -116,7 +116,7 @@ assert(path != NULL); assert(moov != NULL); - DEBUG(driver, 2) ("qtmidi: begin loading '%s'...", path); + DEBUG(driver, 2, "qtmidi: start loading '%s'...", path); /* * XXX Manual check for MIDI header ('MThd'), as I don't know how to make @@ -130,7 +130,7 @@ close(fd); if (ret < 4) return false; - DEBUG(driver, 3) ("qtmidi: header is '%.4s'", magic); + DEBUG(driver, 3, "qtmidi: header is '%.4s'", magic); if (magic[0] != 'M' || magic[1] != 'T' || magic[2] != 'h' || magic[3] != 'd') return false; @@ -138,15 +138,14 @@ SetMIDITypeIfNeeded(&fsspec); if (OpenMovieFile(&fsspec, &refnum, fsRdPerm) != noErr) return false; - DEBUG(driver, 1) ("qtmidi: '%s' successfully opened", path); + DEBUG(driver, 3, "qtmidi: '%s' successfully opened", path); if (noErr != NewMovieFromFile(moov, refnum, &resid, NULL, - newMovieActive | newMovieDontAskUnresolvedDataRefs, NULL)) - { + newMovieActive | newMovieDontAskUnresolvedDataRefs, NULL)) { CloseMovieFile(refnum); return false; } - DEBUG(driver, 2) ("qtmidi: movie container created"); + DEBUG(driver, 3, "qtmidi: movie container created"); CloseMovieFile(refnum); return true; @@ -171,14 +170,12 @@ if (_quicktime_started) return; - DEBUG(driver, 2) ("qtmidi: trying to initialize Quicktime"); + DEBUG(driver, 2, "qtmidi: initializing Quicktime"); /* Be polite: check wether QuickTime is available and initialize it. */ _quicktime_started = (noErr == Gestalt(gestaltQuickTime, &dummy)) && (noErr == EnterMovies()); - DEBUG(driver, 1) ("qtmidi: Quicktime was %s initialized", - _quicktime_started ? "successfully" : "NOT" - ); + if (!_quicktime_started) DEBUG(driver, 0, "qtmidi: Quicktime initialization failed!); } @@ -256,10 +253,10 @@ { if (!_quicktime_started) return; - DEBUG(driver, 2) ("qtmidi: trying to stop driver..."); + DEBUG(driver, 2, "qtmidi: stopping driver..."); switch (_quicktime_state) { case QT_STATE_IDLE: - DEBUG(driver, 3) ("qtmidi: nothing to do (already idle)"); + DEBUG(driver, 3, "qtmidi: stopping not needed, already idle"); /* Do nothing. */ break; case QT_STATE_PLAY: @@ -270,7 +267,6 @@ ExitMovies(); _quicktime_started = false; - DEBUG(driver, 1) ("qtmidi: driver successfully stopped"); } @@ -283,15 +279,15 @@ { if (!_quicktime_started) return; - DEBUG(driver, 3) ("qtmidi: request playing of '%s'n", filename); + DEBUG(driver, 2, "qtmidi: trying to play '%s'", filename); switch (_quicktime_state) { case QT_STATE_PLAY: StopSong(); - DEBUG(driver, 2) ("qtmidi: previous tune stopped"); + DEBUG(driver, 3, "qtmidi: previous tune stopped"); /* XXX Fall-through -- no break needed. */ case QT_STATE_STOP: DisposeMovie(_quicktime_movie); - DEBUG(driver, 2) ("qtmidi: previous tune disposed"); + DEBUG(driver, 3, "qtmidi: previous tune disposed"); _quicktime_state = QT_STATE_IDLE; /* XXX Fall-through -- no break needed. */ case QT_STATE_IDLE: @@ -300,7 +296,7 @@ StartMovie(_quicktime_movie); _quicktime_state = QT_STATE_PLAY; } - DEBUG(driver, 1) ("qtmidi: playing '%s'", filename); + DEBUG(driver, 3, "qtmidi: playing '%s'", filename); } @@ -315,13 +311,13 @@ case QT_STATE_IDLE: /* XXX Fall-through -- no break needed. */ case QT_STATE_STOP: - DEBUG(driver, 2) ("qtmidi: stop requested, but already idle"); + DEBUG(driver, 3, "qtmidi: stop requested, but already idle"); /* Do nothing. */ break; case QT_STATE_PLAY: StopMovie(_quicktime_movie); _quicktime_state = QT_STATE_STOP; - DEBUG(driver, 1) ("qtmidi: player stopped"); + DEBUG(driver, 3, "qtmidi: player stopped"); } } @@ -341,7 +337,7 @@ _quicktime_volume = vol; - DEBUG(driver, 3) ("qtmidi: set volume to %u (%hi)", vol, VOLUME); + DEBUG(driver, 2, "qtmidi: set volume to %u (%hi)", vol, VOLUME); switch (_quicktime_state) { case QT_STATE_IDLE: /* Do nothing. */
--- a/os/macosx/splash.c +++ b/os/macosx/splash.c @@ -17,13 +17,13 @@ static void PNGAPI png_my_error(png_structp png_ptr, png_const_charp message) { - DEBUG(misc, 0) ("ERROR(libpng): %s - %s", message, (char *)png_get_error_ptr(png_ptr)); + DEBUG(misc, 0, "[libpng] error: %s - %s", message, (char *)png_get_error_ptr(png_ptr)); longjmp(png_ptr->jmpbuf, 1); } static void PNGAPI png_my_warning(png_structp png_ptr, png_const_charp message) { - DEBUG(misc, 0) ("WARNING(libpng): %s - %s", message, (char *)png_get_error_ptr(png_ptr)); + DEBUG(misc, 1, "[libpng] warning: %s - %s", message, (char *)png_get_error_ptr(png_ptr)); } void DisplaySplashImage(void)