Fixed Android compilation
This commit is contained in:
@@ -121,7 +121,7 @@ char *DumpDebugFacilityNames(char *buf, char *last)
|
||||
void DebugPrint(const char *level, const std::string &message)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
__android_log_print(ANDROID_LOG_INFO, "OpenTTD", "[%s] %s", dbg, buf);
|
||||
__android_log_print(ANDROID_LOG_INFO, "OpenTTD", "[%s] %s", level, message.c_str());
|
||||
#endif
|
||||
if (_debug_socket != INVALID_SOCKET) {
|
||||
std::string msg = fmt::format("{}dbg: [{}] {}\n", GetLogPrefix(), level, message);
|
||||
|
||||
@@ -70,7 +70,7 @@ const char *MusicDriver_LibTimidity::Start(const StringList ¶m)
|
||||
return "error initializing timidity";
|
||||
}
|
||||
}
|
||||
DEBUG(driver, 1, "successfully initialised timidity");
|
||||
Debug(driver, 1, "successfully initialised timidity");
|
||||
|
||||
_midi.options.rate = samplerate;
|
||||
_midi.options.format = MID_AUDIO_S16LSB;
|
||||
@@ -102,7 +102,7 @@ void MusicDriver_LibTimidity::PlaySong(const MusicSongInfo &song)
|
||||
|
||||
_midi.stream = mid_istream_open_file(filename.c_str());
|
||||
if (_midi.stream == NULL) {
|
||||
DEBUG(driver, 0, "Could not open music file");
|
||||
Debug(driver, 0, "Could not open music file");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void MusicDriver_LibTimidity::PlaySong(const MusicSongInfo &song)
|
||||
_midi.song_length = mid_song_get_total_time(_midi.song);
|
||||
|
||||
if (_midi.song == NULL) {
|
||||
DEBUG(driver, 1, "Invalid MIDI file");
|
||||
Debug(driver, 1, "Invalid MIDI file");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user