Fix logging with null varargs.
This commit is contained in:
parent
1631e0f234
commit
1d7f345960
|
@ -161,8 +161,13 @@ void LogLineFormat(const char level_char, const char* fmt, ...) {
|
||||||
size_t chars_written = vsnprintf(log_format_buffer_.data(),
|
size_t chars_written = vsnprintf(log_format_buffer_.data(),
|
||||||
log_format_buffer_.capacity(), fmt, args);
|
log_format_buffer_.capacity(), fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
if (chars_written != std::string::npos) {
|
||||||
logger_->AppendLine(xe::threading::current_thread_id(), level_char,
|
logger_->AppendLine(xe::threading::current_thread_id(), level_char,
|
||||||
log_format_buffer_.data(), chars_written);
|
log_format_buffer_.data(), chars_written);
|
||||||
|
} else {
|
||||||
|
logger_->AppendLine(xe::threading::current_thread_id(), level_char, fmt,
|
||||||
|
std::strlen(fmt));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogLineVarargs(const char level_char, const char* fmt, va_list args) {
|
void LogLineVarargs(const char level_char, const char* fmt, va_list args) {
|
||||||
|
|
|
@ -45,6 +45,9 @@ SHIM_CALL XamUserGetSigninState_shim(PPCContext* ppc_context,
|
||||||
|
|
||||||
XELOGD("XamUserGetSigninState(%d)", user_index);
|
XELOGD("XamUserGetSigninState(%d)", user_index);
|
||||||
|
|
||||||
|
// Yield, as some games spam this.
|
||||||
|
xe::threading::MaybeYield();
|
||||||
|
|
||||||
// Lie and say we are signed in, but local-only.
|
// Lie and say we are signed in, but local-only.
|
||||||
// This should keep games from asking us to sign in and also keep them
|
// This should keep games from asking us to sign in and also keep them
|
||||||
// from initializing the network.
|
// from initializing the network.
|
||||||
|
|
Loading…
Reference in New Issue