支持解锁 Live, 支持自定义角色, 支持换头, 支持 FOV 调整

This commit is contained in:
chinosk
2024-05-26 00:14:40 +08:00
parent fb65a34684
commit acac544183
10 changed files with 289 additions and 8 deletions

View File

@@ -139,4 +139,28 @@ namespace GakumasLocal::Log {
Debug(result.c_str());
}
void LogUnityLog(int prio, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
va_list args_copy;
va_copy(args_copy, args);
// 计算格式化后的字符串长度
int size = vsnprintf(nullptr, 0, fmt, args_copy) + 1; // 加上额外的终止符空间
va_end(args_copy);
// 动态分配缓冲区
char* buffer = new char[size];
// 格式化字符串
vsnprintf(buffer, size, fmt, args);
va_end(args);
std::string result(buffer);
delete[] buffer; // 释放缓冲区
__android_log_write(prio, "GakumasLog", result.c_str());
}
}