mirror of
https://github.com/esuo1198/TaikoArcadeLoader.git
synced 2026-10-01 19:27:55 +03:00
Refactor Plugins API / Card API / Qr API
Kinda fix exit voice issue by enter testmode before quit fix bnusio::Update not invoked issue when fpsLimit=0 add option in config.toml for cursor (mouse) move FixLanguage to testmode, upgrade it to support release attractdemo add attractdemo control switch after attractmovie (only enable when FixLanguage on) move unlock songs to testmode, add force option to release shop songs move NusBusVolumeHook to audio patches
This commit is contained in:
+10
-1
@@ -45,6 +45,15 @@ LogMessageHandler (const char *function, const char *codeFile, int codeLine, Log
|
||||
// Determine log type string
|
||||
std::string logType = GetLogLevelString (messageLevel);
|
||||
|
||||
int find_idx = 0, begin = -2, end = 0;
|
||||
while (function[find_idx] != 0) {
|
||||
if (begin == -2 && function[find_idx] == ' ') begin = -1;
|
||||
else if (begin == -1 && function[find_idx] == ' ') begin = find_idx + 1;
|
||||
else if (end == 0 && ((begin > 0 && function[find_idx] == ' ') || function[find_idx] == '(')) end = find_idx;
|
||||
find_idx ++;
|
||||
}
|
||||
std::string short_function = std::string(function + begin, end - begin);
|
||||
|
||||
// Remove the absolute path of the build dir
|
||||
constexpr std::string_view build_dir = XSTRING (SOURCE_ROOT);
|
||||
std::string_view filename = codeFile;
|
||||
@@ -60,7 +69,7 @@ LogMessageHandler (const char *function, const char *codeFile, int codeLine, Log
|
||||
|
||||
// Construct the log message
|
||||
std::ostringstream logStream;
|
||||
logStream << function << " (" << filename << ":" << codeLine << "): " << formattedMessage;
|
||||
logStream << short_function << " (" << filename << ":" << codeLine << "): " << formattedMessage;
|
||||
std::string logMessage = logStream.str ();
|
||||
|
||||
// Print the log message
|
||||
|
||||
Reference in New Issue
Block a user