Skip to content

Commit

Permalink
NX: fix copy/paste error in custom logging func
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Jan 9, 2024
1 parent 7e9ed71 commit d4b7e8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/platform/switch/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ namespace {
}

static void LogCallback(LogLevel lvl, std::string const& msg, LogCallbackUserData /* userdata */) {
std::string prefix = Output::LogLevelToString(lvl);

if (!is_nro) {
std::string m = std::string("[" GAME_TITLE "] ") +
Output::LogLevelToString(lvl) + ": " + msg;
std::string m = std::string("[" GAME_TITLE "] ") + prefix + ": " + msg;

// HLE in yuzu emulator
svcOutputDebugString(m.c_str(), m.length());
}

// additional to nxlink server
if(nxlinkSocket >= 0) {
printf("%s: %s\n", prefix.c_str(), message.c_str());
printf("%s: %s\n", prefix.c_str(), msg.c_str());
}
}

Expand Down

0 comments on commit d4b7e8e

Please sign in to comment.