Skip to content

Commit

Permalink
Merge pull request #19750 from bslenul/lr-crash-fix
Browse files Browse the repository at this point in the history
[Libretro] Crash fix
  • Loading branch information
hrydgard authored Dec 19, 2024
2 parents bf0f08b + c522e53 commit 53cb014
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,23 +292,23 @@ namespace Libretro
using namespace Libretro;

void RetroLogCallback(const LogMessage &message, void *userdata) {
retro_log_printf_t *fn = (retro_log_printf_t *)userdata;
retro_log_printf_t fn = (retro_log_printf_t)userdata;
switch (message.level) {
case LogLevel::LVERBOSE:
case LogLevel::LDEBUG:
(*fn)(RETRO_LOG_DEBUG, "[%s] %s", message.log, message.msg.c_str());
(fn)(RETRO_LOG_DEBUG, "[%s] %s", message.log, message.msg.c_str());
break;

case LogLevel::LERROR:
(*fn)(RETRO_LOG_ERROR, "[%s] %s", message.log, message.msg.c_str());
(fn)(RETRO_LOG_ERROR, "[%s] %s", message.log, message.msg.c_str());
break;
case LogLevel::LNOTICE:
case LogLevel::LWARNING:
(*fn)(RETRO_LOG_WARN, "[%s] %s", message.log, message.msg.c_str());
(fn)(RETRO_LOG_WARN, "[%s] %s", message.log, message.msg.c_str());
break;
case LogLevel::LINFO:
default:
(*fn)(RETRO_LOG_INFO, "[%s] %s", message.log, message.msg.c_str());
(fn)(RETRO_LOG_INFO, "[%s] %s", message.log, message.msg.c_str());
break;
}
}
Expand Down

0 comments on commit 53cb014

Please sign in to comment.