diff --git a/src/Cemu/Logging/CemuLogging.h b/src/Cemu/Logging/CemuLogging.h index 5b2e5fa..3294194 100644 --- a/src/Cemu/Logging/CemuLogging.h +++ b/src/Cemu/Logging/CemuLogging.h @@ -1,6 +1,6 @@ #pragma once -extern uint64 s_loggingFlagMask; +//extern uint64 s_loggingFlagMask; enum class LogType : sint32 { @@ -71,13 +71,34 @@ inline uint64 cemuLog_getFlag(LogType type) inline bool cemuLog_isLoggingEnabled(LogType type) { - return (s_loggingFlagMask & cemuLog_getFlag(type)) != 0; + return true; + //return (s_loggingFlagMask & cemuLog_getFlag(type)) != 0; } bool cemuLog_log(LogType type, std::string_view text); bool cemuLog_log(LogType type, std::u8string_view text); void cemuLog_waitForFlush(); // wait until all log lines are written +inline bool cemuLog_log(LogType type, std::string_view text) +{ + if (!cemuLog_isLoggingEnabled(type)) + return false; + + //if (LaunchSettings::Verbose()) + std::cout << text << std::endl; +/* + cemuLog_writeLineToLog(text); + + const auto it = std::find_if(g_logging_window_mapping.cbegin(), g_logging_window_mapping.cend(), + [type](const auto& entry) { return entry.first == type; }); + if (it == g_logging_window_mapping.cend()) + s_loggingDispatcher.Log(text); + else + s_loggingDispatcher.Log(it->second, text); +*/ + return true; +} + template bool cemuLog_log(LogType type, std::basic_string formatStr, TArgs&&... args) { diff --git a/src/Cemu/nex/nexFriends.cpp b/src/Cemu/nex/nexFriends.cpp index 36ba4a5..326a122 100644 --- a/src/Cemu/nex/nexFriends.cpp +++ b/src/Cemu/nex/nexFriends.cpp @@ -1,7 +1,7 @@ #include "prudp.h" #include "nex.h" #include "nexFriends.h" -#include "Cafe/CafeSystem.h" +//#include "Cafe/CafeSystem.h" static const int NOTIFICATION_SRV_FRIEND_OFFLINE = 0x0A; // the opposite event (friend online) is notified via _PRESENCE_CHANGE static const int NOTIFICATION_SRV_FRIEND_PRESENCE_CHANGE = 0x18; @@ -937,7 +937,7 @@ void NexFriends::markFriendRequestsAsReceived(uint64* messageIdList, sint32 coun void NexFriends::updateMyPresence(nexPresenceV2& myPresence) { this->myPresence = myPresence; - +/* if (GetTitleIdHigh(CafeSystem::GetForegroundTitleId()) == 0x00050000) { myPresence.gameKey.titleId = CafeSystem::GetForegroundTitleId(); @@ -945,9 +945,9 @@ void NexFriends::updateMyPresence(nexPresenceV2& myPresence) } else { - myPresence.gameKey.titleId = 0; // icon will not be ??? or invalid to others +*/ myPresence.gameKey.titleId = 0; // icon will not be ??? or invalid to others myPresence.gameKey.ukn = 0; - } +// } if (nexCon == nullptr || nexCon->getState() != nexService::STATE_CONNECTED) { diff --git a/src/Common/platform.h b/src/Common/platform.h index 3f480f4..ca83733 100644 --- a/src/Common/platform.h +++ b/src/Common/platform.h @@ -14,4 +14,7 @@ #elif BOOST_OS_MACOS #include #include "Common/unix/platform.h" +#elif 1 +#include +#include "Common/unix/platform.h" #endif diff --git a/src/Common/precompiled.h b/src/Common/precompiled.h index bda75ce..1e220b8 100644 --- a/src/Common/precompiled.h +++ b/src/Common/precompiled.h @@ -79,10 +79,10 @@ #include #include #include -#include -#include +//#include +/*#include #include - +*/ namespace fs = std::filesystem; #include "enumFlags.h" @@ -379,7 +379,7 @@ inline void cemu_assert_error() #define assert_dbg() DEBUG_BREAK // old style unconditional generic assert // MEMPTR -#include "Common/MemPtr.h" +//#include "Common/MemPtr.h" template constexpr bool HAS_FLAG(T1 flags, T2 test_flag) { return (flags & (T1)test_flag) == (T1)test_flag; } @@ -556,12 +556,14 @@ inline uint32 GetTitleIdLow(uint64 titleId) #endif // PPC context and memory functions +/* #include "Cafe/HW/MMU/MMU.h" #include "Cafe/HW/Espresso/PPCState.h" #include "Cafe/HW/Espresso/PPCCallback.h" // PPC stack trace printer void DebugLogStackTrace(struct OSThread_t* thread, MPTR sp, bool printSymbols = false); +*/ // generic formatter for enums (to underlying) template diff --git a/src/Common/socket.h b/src/Common/socket.h index 37d53c0..873ab69 100644 --- a/src/Common/socket.h +++ b/src/Common/socket.h @@ -7,6 +7,10 @@ typedef int socklen_t; #else +#include +#include +#include + #include #define SOCKET int #define closesocket close