Android fixing logs

This commit is contained in:
Vladislav Khorev committed 2026-07-18 20:44:54 +03:00
1 parent adf9871861
commit 9f812f0318
2 files changed
+10 -8

No files matched your search

+2 -7
View File
@@ -90,21 +90,16 @@ void AudioPlayerAsync::playSoundAsync(const std::string& filePath, int loops, in
sound = it->second;
}
}
if (!sound) {
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_ERROR, "Game",
"AudioPlayerAsync::playSoundAsync step x2");
std::vector<char> buffer = FRG::readFile(filePath);
if (buffer.empty()) {
__android_log_print(ANDROID_LOG_ERROR, "Game",
"AudioPlayerAsync::playSoundAsync step x3");
FRG::logger() << "Failed to read sound file into buffer: " << filePath << std::endl;
return;
}
__android_log_print(ANDROID_LOG_ERROR, "Game",
"AudioPlayerAsync::playSoundAsync step x4");
SDL_RWops* rw = SDL_RWFromMem(buffer.data(), buffer.size());
if (!rw) {
FRG::logger() << "Failed to create RWops from buffer for " << filePath << ": " << SDL_GetError() << std::endl;