summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/swap.h14
-rw-r--r--src/core/hle/service/service.cpp12
2 files changed, 19 insertions, 7 deletions
diff --git a/src/common/swap.h b/src/common/swap.h
index d94cbe6b2..4a4012d1a 100644
--- a/src/common/swap.h
+++ b/src/common/swap.h
@@ -103,7 +103,19 @@ inline __attribute__((always_inline)) u64 swap64(u64 _data) {
103 return __builtin_bswap64(_data); 103 return __builtin_bswap64(_data);
104} 104}
105#elif defined(__Bitrig__) || defined(__OpenBSD__) 105#elif defined(__Bitrig__) || defined(__OpenBSD__)
106// swap16, swap32, swap64 are left as is 106// redefine swap16, swap32, swap64 as inline functions
107#undef swap16
108#undef swap32
109#undef swap64
110inline u16 swap16(u16 _data) {
111 return __swap16(_data);
112}
113inline u32 swap32(u32 _data) {
114 return __swap32(_data);
115}
116inline u64 swap64(u64 _data) {
117 return __swap64(_data);
118}
107#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) 119#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
108inline u16 swap16(u16 _data) { 120inline u16 swap16(u16 _data) {
109 return bswap16(_data); 121 return bswap16(_data);
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 8011d0d71..c5490c1ae 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -112,15 +112,15 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext
112 auto cmd_buf = ctx.CommandBuffer(); 112 auto cmd_buf = ctx.CommandBuffer();
113 std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name; 113 std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name;
114 114
115 fmt::MemoryWriter w; 115 fmt::memory_buffer buf;
116 w.write("function '{}': port='{}' cmd_buf={{[0]={:#x}", function_name, service_name, 116 fmt::format_to(buf, "function '{}': port='{}' cmd_buf={{[0]={:#x}", function_name, service_name,
117 cmd_buf[0]); 117 cmd_buf[0]);
118 for (int i = 1; i <= 8; ++i) { 118 for (int i = 1; i <= 8; ++i) {
119 w.write(", [{}]={:#x}", i, cmd_buf[i]); 119 fmt::format_to(buf, ", [{}]={:#x}", i, cmd_buf[i]);
120 } 120 }
121 w << '}'; 121 buf.push_back('}');
122 122
123 LOG_ERROR(Service, "unknown / unimplemented %s", w.c_str()); 123 LOG_ERROR(Service, "unknown / unimplemented %s", fmt::to_string(buf).c_str());
124 UNIMPLEMENTED(); 124 UNIMPLEMENTED();
125} 125}
126 126