mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Logging API change (refactor) (#19324)
* Rename LogType to Log * Explicitly use the Log:: enum when logging. Allows for autocomplete when editing. * Mac/ARM64 buildfix * Do the same with the hle result log macros * Rename the log names to mixed case while at it. * iOS buildfix * Qt buildfix attempt, ARM32 buildfix
This commit is contained in:
1 parent
ae3ff686f0
commit
e01ca5b057
393 files changed
+6198
-6193
No files matched your search
@@ -133,7 +133,7 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
char ipstr[INET6_ADDRSTRLEN]; // We use IPv6 length since it's longer than IPv4
|
||||
// getifaddrs first appeared in glibc 2.3, On Android officially supported since __ANDROID_API__ >= 24
|
||||
#if defined(_IFADDRS_H_) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || (__ANDROID_API__ >= 24)
|
||||
INFO_LOG(SCENET, "GetIPList from getifaddrs");
|
||||
INFO_LOG(Log::sceNet, "GetIPList from getifaddrs");
|
||||
struct ifaddrs* ifAddrStruct = NULL;
|
||||
struct ifaddrs* ifa = NULL;
|
||||
|
||||
@@ -161,7 +161,7 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
return true;
|
||||
}
|
||||
#elif defined(SIOCGIFCONF) // Better detection on Linux/UNIX/MacOS/some Android
|
||||
INFO_LOG(SCENET, "GetIPList from SIOCGIFCONF");
|
||||
INFO_LOG(Log::sceNet, "GetIPList from SIOCGIFCONF");
|
||||
static struct ifreq ifreqs[32];
|
||||
struct ifconf ifc;
|
||||
memset(&ifc, 0, sizeof(ifconf));
|
||||
@@ -170,13 +170,13 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
|
||||
int sd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sd < 0) {
|
||||
ERROR_LOG(SCENET, "GetIPList failed to create socket (result = %i, errno = %i)", sd, errno);
|
||||
ERROR_LOG(Log::sceNet, "GetIPList failed to create socket (result = %i, errno = %i)", sd, errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
int r = ioctl(sd, SIOCGIFCONF, (char*)&ifc);
|
||||
if (r != 0) {
|
||||
ERROR_LOG(SCENET, "GetIPList failed ioctl/SIOCGIFCONF (result = %i, errno = %i)", r, errno);
|
||||
ERROR_LOG(Log::sceNet, "GetIPList failed ioctl/SIOCGIFCONF (result = %i, errno = %i)", r, errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
r = ioctl(sd, SIOCGIFADDR, item);
|
||||
if (r != 0)
|
||||
{
|
||||
ERROR_LOG(SCENET, "GetIPList failed ioctl/SIOCGIFADDR (i = %i, result = %i, errno = %i)", i, r, errno);
|
||||
ERROR_LOG(Log::sceNet, "GetIPList failed ioctl/SIOCGIFADDR (i = %i, result = %i, errno = %i)", i, r, errno);
|
||||
}
|
||||
|
||||
if (ifreqs[i].ifr_addr.sa_family == AF_INET) {
|
||||
@@ -212,7 +212,7 @@ bool GetIPList(std::vector<std::string> &IP4s) {
|
||||
close(sd);
|
||||
return true;
|
||||
#else // Fallback to POSIX/Cross-platform way but may not works well on Linux (ie. only shows 127.0.0.1)
|
||||
INFO_LOG(SCENET, "GetIPList from Fallback");
|
||||
INFO_LOG(Log::sceNet, "GetIPList from Fallback");
|
||||
struct addrinfo hints, * res, * p;
|
||||
memset(&hints, 0, sizeof hints);
|
||||
hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version
|
||||
|
||||
Reference in new issue
Block a user