diff options
Diffstat (limited to '')
105 files changed, 730 insertions, 730 deletions
diff --git a/src/common/assert.h b/src/common/assert.h index 3ee07f6a2..fbe87273b 100644 --- a/src/common/assert.h +++ b/src/common/assert.h | |||
| @@ -30,7 +30,7 @@ __declspec(noinline, noreturn) | |||
| 30 | #define ASSERT(_a_) \ | 30 | #define ASSERT(_a_) \ |
| 31 | do \ | 31 | do \ |
| 32 | if (!(_a_)) { \ | 32 | if (!(_a_)) { \ |
| 33 | assert_noinline_call([] { NGLOG_CRITICAL(Debug, "Assertion Failed!"); }); \ | 33 | assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \ |
| 34 | } \ | 34 | } \ |
| 35 | while (0) | 35 | while (0) |
| 36 | 36 | ||
| @@ -38,7 +38,7 @@ __declspec(noinline, noreturn) | |||
| 38 | do \ | 38 | do \ |
| 39 | if (!(_a_)) { \ | 39 | if (!(_a_)) { \ |
| 40 | assert_noinline_call( \ | 40 | assert_noinline_call( \ |
| 41 | [&] { NGLOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \ | 41 | [&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \ |
| 42 | } \ | 42 | } \ |
| 43 | while (0) | 43 | while (0) |
| 44 | 44 | ||
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 2d0b81c6e..40b633092 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -118,7 +118,7 @@ bool IsDirectory(const std::string& filename) { | |||
| 118 | #endif | 118 | #endif |
| 119 | 119 | ||
| 120 | if (result < 0) { | 120 | if (result < 0) { |
| 121 | NGLOG_DEBUG(Common_Filesystem, "stat failed on {}: {}", filename, GetLastErrorMsg()); | 121 | LOG_DEBUG(Common_Filesystem, "stat failed on {}: {}", filename, GetLastErrorMsg()); |
| 122 | return false; | 122 | return false; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| @@ -128,29 +128,29 @@ bool IsDirectory(const std::string& filename) { | |||
| 128 | // Deletes a given filename, return true on success | 128 | // Deletes a given filename, return true on success |
| 129 | // Doesn't supports deleting a directory | 129 | // Doesn't supports deleting a directory |
| 130 | bool Delete(const std::string& filename) { | 130 | bool Delete(const std::string& filename) { |
| 131 | NGLOG_TRACE(Common_Filesystem, "file {}", filename); | 131 | LOG_TRACE(Common_Filesystem, "file {}", filename); |
| 132 | 132 | ||
| 133 | // Return true because we care about the file no | 133 | // Return true because we care about the file no |
| 134 | // being there, not the actual delete. | 134 | // being there, not the actual delete. |
| 135 | if (!Exists(filename)) { | 135 | if (!Exists(filename)) { |
| 136 | NGLOG_DEBUG(Common_Filesystem, "{} does not exist", filename); | 136 | LOG_DEBUG(Common_Filesystem, "{} does not exist", filename); |
| 137 | return true; | 137 | return true; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | // We can't delete a directory | 140 | // We can't delete a directory |
| 141 | if (IsDirectory(filename)) { | 141 | if (IsDirectory(filename)) { |
| 142 | NGLOG_ERROR(Common_Filesystem, "Failed: {} is a directory", filename); | 142 | LOG_ERROR(Common_Filesystem, "Failed: {} is a directory", filename); |
| 143 | return false; | 143 | return false; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | #ifdef _WIN32 | 146 | #ifdef _WIN32 |
| 147 | if (!DeleteFileW(Common::UTF8ToUTF16W(filename).c_str())) { | 147 | if (!DeleteFileW(Common::UTF8ToUTF16W(filename).c_str())) { |
| 148 | NGLOG_ERROR(Common_Filesystem, "DeleteFile failed on {}: {}", filename, GetLastErrorMsg()); | 148 | LOG_ERROR(Common_Filesystem, "DeleteFile failed on {}: {}", filename, GetLastErrorMsg()); |
| 149 | return false; | 149 | return false; |
| 150 | } | 150 | } |
| 151 | #else | 151 | #else |
| 152 | if (unlink(filename.c_str()) == -1) { | 152 | if (unlink(filename.c_str()) == -1) { |
| 153 | NGLOG_ERROR(Common_Filesystem, "unlink failed on {}: {}", filename, GetLastErrorMsg()); | 153 | LOG_ERROR(Common_Filesystem, "unlink failed on {}: {}", filename, GetLastErrorMsg()); |
| 154 | return false; | 154 | return false; |
| 155 | } | 155 | } |
| 156 | #endif | 156 | #endif |
| @@ -160,16 +160,16 @@ bool Delete(const std::string& filename) { | |||
| 160 | 160 | ||
| 161 | // Returns true if successful, or path already exists. | 161 | // Returns true if successful, or path already exists. |
| 162 | bool CreateDir(const std::string& path) { | 162 | bool CreateDir(const std::string& path) { |
| 163 | NGLOG_TRACE(Common_Filesystem, "directory {}", path); | 163 | LOG_TRACE(Common_Filesystem, "directory {}", path); |
| 164 | #ifdef _WIN32 | 164 | #ifdef _WIN32 |
| 165 | if (::CreateDirectoryW(Common::UTF8ToUTF16W(path).c_str(), nullptr)) | 165 | if (::CreateDirectoryW(Common::UTF8ToUTF16W(path).c_str(), nullptr)) |
| 166 | return true; | 166 | return true; |
| 167 | DWORD error = GetLastError(); | 167 | DWORD error = GetLastError(); |
| 168 | if (error == ERROR_ALREADY_EXISTS) { | 168 | if (error == ERROR_ALREADY_EXISTS) { |
| 169 | NGLOG_DEBUG(Common_Filesystem, "CreateDirectory failed on {}: already exists", path); | 169 | LOG_DEBUG(Common_Filesystem, "CreateDirectory failed on {}: already exists", path); |
| 170 | return true; | 170 | return true; |
| 171 | } | 171 | } |
| 172 | NGLOG_ERROR(Common_Filesystem, "CreateDirectory failed on {}: {}", path, error); | 172 | LOG_ERROR(Common_Filesystem, "CreateDirectory failed on {}: {}", path, error); |
| 173 | return false; | 173 | return false; |
| 174 | #else | 174 | #else |
| 175 | if (mkdir(path.c_str(), 0755) == 0) | 175 | if (mkdir(path.c_str(), 0755) == 0) |
| @@ -178,11 +178,11 @@ bool CreateDir(const std::string& path) { | |||
| 178 | int err = errno; | 178 | int err = errno; |
| 179 | 179 | ||
| 180 | if (err == EEXIST) { | 180 | if (err == EEXIST) { |
| 181 | NGLOG_DEBUG(Common_Filesystem, "mkdir failed on {}: already exists", path); | 181 | LOG_DEBUG(Common_Filesystem, "mkdir failed on {}: already exists", path); |
| 182 | return true; | 182 | return true; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | NGLOG_ERROR(Common_Filesystem, "mkdir failed on {}: {}", path, strerror(err)); | 185 | LOG_ERROR(Common_Filesystem, "mkdir failed on {}: {}", path, strerror(err)); |
| 186 | return false; | 186 | return false; |
| 187 | #endif | 187 | #endif |
| 188 | } | 188 | } |
| @@ -190,10 +190,10 @@ bool CreateDir(const std::string& path) { | |||
| 190 | // Creates the full path of fullPath returns true on success | 190 | // Creates the full path of fullPath returns true on success |
| 191 | bool CreateFullPath(const std::string& fullPath) { | 191 | bool CreateFullPath(const std::string& fullPath) { |
| 192 | int panicCounter = 100; | 192 | int panicCounter = 100; |
| 193 | NGLOG_TRACE(Common_Filesystem, "path {}", fullPath); | 193 | LOG_TRACE(Common_Filesystem, "path {}", fullPath); |
| 194 | 194 | ||
| 195 | if (FileUtil::Exists(fullPath)) { | 195 | if (FileUtil::Exists(fullPath)) { |
| 196 | NGLOG_DEBUG(Common_Filesystem, "path exists {}", fullPath); | 196 | LOG_DEBUG(Common_Filesystem, "path exists {}", fullPath); |
| 197 | return true; | 197 | return true; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| @@ -209,14 +209,14 @@ bool CreateFullPath(const std::string& fullPath) { | |||
| 209 | // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") | 209 | // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") |
| 210 | std::string const subPath(fullPath.substr(0, position + 1)); | 210 | std::string const subPath(fullPath.substr(0, position + 1)); |
| 211 | if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) { | 211 | if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) { |
| 212 | NGLOG_ERROR(Common, "CreateFullPath: directory creation failed"); | 212 | LOG_ERROR(Common, "CreateFullPath: directory creation failed"); |
| 213 | return false; | 213 | return false; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | // A safety check | 216 | // A safety check |
| 217 | panicCounter--; | 217 | panicCounter--; |
| 218 | if (panicCounter <= 0) { | 218 | if (panicCounter <= 0) { |
| 219 | NGLOG_ERROR(Common, "CreateFullPath: directory structure is too deep"); | 219 | LOG_ERROR(Common, "CreateFullPath: directory structure is too deep"); |
| 220 | return false; | 220 | return false; |
| 221 | } | 221 | } |
| 222 | position++; | 222 | position++; |
| @@ -225,11 +225,11 @@ bool CreateFullPath(const std::string& fullPath) { | |||
| 225 | 225 | ||
| 226 | // Deletes a directory filename, returns true on success | 226 | // Deletes a directory filename, returns true on success |
| 227 | bool DeleteDir(const std::string& filename) { | 227 | bool DeleteDir(const std::string& filename) { |
| 228 | NGLOG_TRACE(Common_Filesystem, "directory {}", filename); | 228 | LOG_TRACE(Common_Filesystem, "directory {}", filename); |
| 229 | 229 | ||
| 230 | // check if a directory | 230 | // check if a directory |
| 231 | if (!FileUtil::IsDirectory(filename)) { | 231 | if (!FileUtil::IsDirectory(filename)) { |
| 232 | NGLOG_ERROR(Common_Filesystem, "Not a directory {}", filename); | 232 | LOG_ERROR(Common_Filesystem, "Not a directory {}", filename); |
| 233 | return false; | 233 | return false; |
| 234 | } | 234 | } |
| 235 | 235 | ||
| @@ -240,14 +240,14 @@ bool DeleteDir(const std::string& filename) { | |||
| 240 | if (rmdir(filename.c_str()) == 0) | 240 | if (rmdir(filename.c_str()) == 0) |
| 241 | return true; | 241 | return true; |
| 242 | #endif | 242 | #endif |
| 243 | NGLOG_ERROR(Common_Filesystem, "failed {}: {}", filename, GetLastErrorMsg()); | 243 | LOG_ERROR(Common_Filesystem, "failed {}: {}", filename, GetLastErrorMsg()); |
| 244 | 244 | ||
| 245 | return false; | 245 | return false; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | // renames file srcFilename to destFilename, returns true on success | 248 | // renames file srcFilename to destFilename, returns true on success |
| 249 | bool Rename(const std::string& srcFilename, const std::string& destFilename) { | 249 | bool Rename(const std::string& srcFilename, const std::string& destFilename) { |
| 250 | NGLOG_TRACE(Common_Filesystem, "{} --> {}", srcFilename, destFilename); | 250 | LOG_TRACE(Common_Filesystem, "{} --> {}", srcFilename, destFilename); |
| 251 | #ifdef _WIN32 | 251 | #ifdef _WIN32 |
| 252 | if (_wrename(Common::UTF8ToUTF16W(srcFilename).c_str(), | 252 | if (_wrename(Common::UTF8ToUTF16W(srcFilename).c_str(), |
| 253 | Common::UTF8ToUTF16W(destFilename).c_str()) == 0) | 253 | Common::UTF8ToUTF16W(destFilename).c_str()) == 0) |
| @@ -256,20 +256,20 @@ bool Rename(const std::string& srcFilename, const std::string& destFilename) { | |||
| 256 | if (rename(srcFilename.c_str(), destFilename.c_str()) == 0) | 256 | if (rename(srcFilename.c_str(), destFilename.c_str()) == 0) |
| 257 | return true; | 257 | return true; |
| 258 | #endif | 258 | #endif |
| 259 | NGLOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, | 259 | LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, |
| 260 | GetLastErrorMsg()); | 260 | GetLastErrorMsg()); |
| 261 | return false; | 261 | return false; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | // copies file srcFilename to destFilename, returns true on success | 264 | // copies file srcFilename to destFilename, returns true on success |
| 265 | bool Copy(const std::string& srcFilename, const std::string& destFilename) { | 265 | bool Copy(const std::string& srcFilename, const std::string& destFilename) { |
| 266 | NGLOG_TRACE(Common_Filesystem, "{} --> {}", srcFilename, destFilename); | 266 | LOG_TRACE(Common_Filesystem, "{} --> {}", srcFilename, destFilename); |
| 267 | #ifdef _WIN32 | 267 | #ifdef _WIN32 |
| 268 | if (CopyFileW(Common::UTF8ToUTF16W(srcFilename).c_str(), | 268 | if (CopyFileW(Common::UTF8ToUTF16W(srcFilename).c_str(), |
| 269 | Common::UTF8ToUTF16W(destFilename).c_str(), FALSE)) | 269 | Common::UTF8ToUTF16W(destFilename).c_str(), FALSE)) |
| 270 | return true; | 270 | return true; |
| 271 | 271 | ||
| 272 | NGLOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, | 272 | LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, |
| 273 | GetLastErrorMsg()); | 273 | GetLastErrorMsg()); |
| 274 | return false; | 274 | return false; |
| 275 | #else | 275 | #else |
| @@ -282,7 +282,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { | |||
| 282 | // Open input file | 282 | // Open input file |
| 283 | FILE* input = fopen(srcFilename.c_str(), "rb"); | 283 | FILE* input = fopen(srcFilename.c_str(), "rb"); |
| 284 | if (!input) { | 284 | if (!input) { |
| 285 | NGLOG_ERROR(Common_Filesystem, "opening input failed {} --> {}: {}", srcFilename, | 285 | LOG_ERROR(Common_Filesystem, "opening input failed {} --> {}: {}", srcFilename, |
| 286 | destFilename, GetLastErrorMsg()); | 286 | destFilename, GetLastErrorMsg()); |
| 287 | return false; | 287 | return false; |
| 288 | } | 288 | } |
| @@ -291,7 +291,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { | |||
| 291 | FILE* output = fopen(destFilename.c_str(), "wb"); | 291 | FILE* output = fopen(destFilename.c_str(), "wb"); |
| 292 | if (!output) { | 292 | if (!output) { |
| 293 | fclose(input); | 293 | fclose(input); |
| 294 | NGLOG_ERROR(Common_Filesystem, "opening output failed {} --> {}: {}", srcFilename, | 294 | LOG_ERROR(Common_Filesystem, "opening output failed {} --> {}: {}", srcFilename, |
| 295 | destFilename, GetLastErrorMsg()); | 295 | destFilename, GetLastErrorMsg()); |
| 296 | return false; | 296 | return false; |
| 297 | } | 297 | } |
| @@ -302,7 +302,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { | |||
| 302 | size_t rnum = fread(buffer, sizeof(char), BSIZE, input); | 302 | size_t rnum = fread(buffer, sizeof(char), BSIZE, input); |
| 303 | if (rnum != BSIZE) { | 303 | if (rnum != BSIZE) { |
| 304 | if (ferror(input) != 0) { | 304 | if (ferror(input) != 0) { |
| 305 | NGLOG_ERROR(Common_Filesystem, "failed reading from source, {} --> {}: {}", | 305 | LOG_ERROR(Common_Filesystem, "failed reading from source, {} --> {}: {}", |
| 306 | srcFilename, destFilename, GetLastErrorMsg()); | 306 | srcFilename, destFilename, GetLastErrorMsg()); |
| 307 | goto bail; | 307 | goto bail; |
| 308 | } | 308 | } |
| @@ -311,7 +311,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { | |||
| 311 | // write output | 311 | // write output |
| 312 | size_t wnum = fwrite(buffer, sizeof(char), rnum, output); | 312 | size_t wnum = fwrite(buffer, sizeof(char), rnum, output); |
| 313 | if (wnum != rnum) { | 313 | if (wnum != rnum) { |
| 314 | NGLOG_ERROR(Common_Filesystem, "failed writing to output, {} --> {}: {}", srcFilename, | 314 | LOG_ERROR(Common_Filesystem, "failed writing to output, {} --> {}: {}", srcFilename, |
| 315 | destFilename, GetLastErrorMsg()); | 315 | destFilename, GetLastErrorMsg()); |
| 316 | goto bail; | 316 | goto bail; |
| 317 | } | 317 | } |
| @@ -332,12 +332,12 @@ bail: | |||
| 332 | // Returns the size of filename (64bit) | 332 | // Returns the size of filename (64bit) |
| 333 | u64 GetSize(const std::string& filename) { | 333 | u64 GetSize(const std::string& filename) { |
| 334 | if (!Exists(filename)) { | 334 | if (!Exists(filename)) { |
| 335 | NGLOG_ERROR(Common_Filesystem, "failed {}: No such file", filename); | 335 | LOG_ERROR(Common_Filesystem, "failed {}: No such file", filename); |
| 336 | return 0; | 336 | return 0; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | if (IsDirectory(filename)) { | 339 | if (IsDirectory(filename)) { |
| 340 | NGLOG_ERROR(Common_Filesystem, "failed {}: is a directory", filename); | 340 | LOG_ERROR(Common_Filesystem, "failed {}: is a directory", filename); |
| 341 | return 0; | 341 | return 0; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| @@ -348,11 +348,11 @@ u64 GetSize(const std::string& filename) { | |||
| 348 | if (stat(filename.c_str(), &buf) == 0) | 348 | if (stat(filename.c_str(), &buf) == 0) |
| 349 | #endif | 349 | #endif |
| 350 | { | 350 | { |
| 351 | NGLOG_TRACE(Common_Filesystem, "{}: {}", filename, buf.st_size); | 351 | LOG_TRACE(Common_Filesystem, "{}: {}", filename, buf.st_size); |
| 352 | return buf.st_size; | 352 | return buf.st_size; |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | NGLOG_ERROR(Common_Filesystem, "Stat failed {}: {}", filename, GetLastErrorMsg()); | 355 | LOG_ERROR(Common_Filesystem, "Stat failed {}: {}", filename, GetLastErrorMsg()); |
| 356 | return 0; | 356 | return 0; |
| 357 | } | 357 | } |
| 358 | 358 | ||
| @@ -360,7 +360,7 @@ u64 GetSize(const std::string& filename) { | |||
| 360 | u64 GetSize(const int fd) { | 360 | u64 GetSize(const int fd) { |
| 361 | struct stat buf; | 361 | struct stat buf; |
| 362 | if (fstat(fd, &buf) != 0) { | 362 | if (fstat(fd, &buf) != 0) { |
| 363 | NGLOG_ERROR(Common_Filesystem, "GetSize: stat failed {}: {}", fd, GetLastErrorMsg()); | 363 | LOG_ERROR(Common_Filesystem, "GetSize: stat failed {}: {}", fd, GetLastErrorMsg()); |
| 364 | return 0; | 364 | return 0; |
| 365 | } | 365 | } |
| 366 | return buf.st_size; | 366 | return buf.st_size; |
| @@ -371,13 +371,13 @@ u64 GetSize(FILE* f) { | |||
| 371 | // can't use off_t here because it can be 32-bit | 371 | // can't use off_t here because it can be 32-bit |
| 372 | u64 pos = ftello(f); | 372 | u64 pos = ftello(f); |
| 373 | if (fseeko(f, 0, SEEK_END) != 0) { | 373 | if (fseeko(f, 0, SEEK_END) != 0) { |
| 374 | NGLOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), | 374 | LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), |
| 375 | GetLastErrorMsg()); | 375 | GetLastErrorMsg()); |
| 376 | return 0; | 376 | return 0; |
| 377 | } | 377 | } |
| 378 | u64 size = ftello(f); | 378 | u64 size = ftello(f); |
| 379 | if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { | 379 | if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { |
| 380 | NGLOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), | 380 | LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), |
| 381 | GetLastErrorMsg()); | 381 | GetLastErrorMsg()); |
| 382 | return 0; | 382 | return 0; |
| 383 | } | 383 | } |
| @@ -386,10 +386,10 @@ u64 GetSize(FILE* f) { | |||
| 386 | 386 | ||
| 387 | // creates an empty file filename, returns true on success | 387 | // creates an empty file filename, returns true on success |
| 388 | bool CreateEmptyFile(const std::string& filename) { | 388 | bool CreateEmptyFile(const std::string& filename) { |
| 389 | NGLOG_TRACE(Common_Filesystem, "{}", filename); | 389 | LOG_TRACE(Common_Filesystem, "{}", filename); |
| 390 | 390 | ||
| 391 | if (!FileUtil::IOFile(filename, "wb")) { | 391 | if (!FileUtil::IOFile(filename, "wb")) { |
| 392 | NGLOG_ERROR(Common_Filesystem, "failed {}: {}", filename, GetLastErrorMsg()); | 392 | LOG_ERROR(Common_Filesystem, "failed {}: {}", filename, GetLastErrorMsg()); |
| 393 | return false; | 393 | return false; |
| 394 | } | 394 | } |
| 395 | 395 | ||
| @@ -398,7 +398,7 @@ bool CreateEmptyFile(const std::string& filename) { | |||
| 398 | 398 | ||
| 399 | bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string& directory, | 399 | bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string& directory, |
| 400 | DirectoryEntryCallable callback) { | 400 | DirectoryEntryCallable callback) { |
| 401 | NGLOG_TRACE(Common_Filesystem, "directory {}", directory); | 401 | LOG_TRACE(Common_Filesystem, "directory {}", directory); |
| 402 | 402 | ||
| 403 | // How many files + directories we found | 403 | // How many files + directories we found |
| 404 | unsigned found_entries = 0; | 404 | unsigned found_entries = 0; |
| @@ -556,7 +556,7 @@ std::string GetCurrentDir() { | |||
| 556 | char* dir; | 556 | char* dir; |
| 557 | if (!(dir = getcwd(nullptr, 0))) { | 557 | if (!(dir = getcwd(nullptr, 0))) { |
| 558 | #endif | 558 | #endif |
| 559 | NGLOG_ERROR(Common_Filesystem, "GetCurrentDirectory failed: {}", GetLastErrorMsg()); | 559 | LOG_ERROR(Common_Filesystem, "GetCurrentDirectory failed: {}", GetLastErrorMsg()); |
| 560 | return nullptr; | 560 | return nullptr; |
| 561 | } | 561 | } |
| 562 | #ifdef _WIN32 | 562 | #ifdef _WIN32 |
| @@ -676,7 +676,7 @@ std::string GetSysDirectory() { | |||
| 676 | #endif | 676 | #endif |
| 677 | sysDir += DIR_SEP; | 677 | sysDir += DIR_SEP; |
| 678 | 678 | ||
| 679 | NGLOG_DEBUG(Common_Filesystem, "Setting to {}:", sysDir); | 679 | LOG_DEBUG(Common_Filesystem, "Setting to {}:", sysDir); |
| 680 | return sysDir; | 680 | return sysDir; |
| 681 | } | 681 | } |
| 682 | 682 | ||
| @@ -692,7 +692,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new | |||
| 692 | if (!FileUtil::IsDirectory(paths[D_USER_IDX])) { | 692 | if (!FileUtil::IsDirectory(paths[D_USER_IDX])) { |
| 693 | paths[D_USER_IDX] = AppDataRoamingDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP; | 693 | paths[D_USER_IDX] = AppDataRoamingDirectory() + DIR_SEP EMU_DATA_DIR DIR_SEP; |
| 694 | } else { | 694 | } else { |
| 695 | NGLOG_INFO(Common_Filesystem, "Using the local user directory"); | 695 | LOG_INFO(Common_Filesystem, "Using the local user directory"); |
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP; | 698 | paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP; |
| @@ -719,7 +719,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new | |||
| 719 | 719 | ||
| 720 | if (!newPath.empty()) { | 720 | if (!newPath.empty()) { |
| 721 | if (!FileUtil::IsDirectory(newPath)) { | 721 | if (!FileUtil::IsDirectory(newPath)) { |
| 722 | NGLOG_ERROR(Common_Filesystem, "Invalid path specified {}", newPath); | 722 | LOG_ERROR(Common_Filesystem, "Invalid path specified {}", newPath); |
| 723 | return paths[DirIDX]; | 723 | return paths[DirIDX]; |
| 724 | } else { | 724 | } else { |
| 725 | paths[DirIDX] = newPath; | 725 | paths[DirIDX] = newPath; |
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 428723dce..fdfb66696 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp | |||
| @@ -65,14 +65,14 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, | |||
| 65 | const std::string::const_iterator end) { | 65 | const std::string::const_iterator end) { |
| 66 | auto level_separator = std::find(begin, end, ':'); | 66 | auto level_separator = std::find(begin, end, ':'); |
| 67 | if (level_separator == end) { | 67 | if (level_separator == end) { |
| 68 | NGLOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", | 68 | LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", |
| 69 | std::string(begin, end).c_str()); | 69 | std::string(begin, end).c_str()); |
| 70 | return false; | 70 | return false; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | const Level level = GetLevelByName(level_separator + 1, end); | 73 | const Level level = GetLevelByName(level_separator + 1, end); |
| 74 | if (level == Level::Count) { | 74 | if (level == Level::Count) { |
| 75 | NGLOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str()); | 75 | LOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str()); |
| 76 | return false; | 76 | return false; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| @@ -83,7 +83,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, | |||
| 83 | 83 | ||
| 84 | const Class log_class = GetClassByName(begin, level_separator); | 84 | const Class log_class = GetClassByName(begin, level_separator); |
| 85 | if (log_class == Class::Count) { | 85 | if (log_class == Class::Count) { |
| 86 | NGLOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str()); | 86 | LOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str()); |
| 87 | return false; | 87 | return false; |
| 88 | } | 88 | } |
| 89 | 89 | ||
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index c5015531c..e96c90e16 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -109,25 +109,25 @@ void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsig | |||
| 109 | } // namespace Log | 109 | } // namespace Log |
| 110 | 110 | ||
| 111 | #ifdef _DEBUG | 111 | #ifdef _DEBUG |
| 112 | #define NGLOG_TRACE(log_class, ...) \ | 112 | #define LOG_TRACE(log_class, ...) \ |
| 113 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \ | 113 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \ |
| 114 | __func__, __VA_ARGS__) | 114 | __func__, __VA_ARGS__) |
| 115 | #else | 115 | #else |
| 116 | #define NGLOG_TRACE(log_class, fmt, ...) (void(0)) | 116 | #define LOG_TRACE(log_class, fmt, ...) (void(0)) |
| 117 | #endif | 117 | #endif |
| 118 | 118 | ||
| 119 | #define NGLOG_DEBUG(log_class, ...) \ | 119 | #define LOG_DEBUG(log_class, ...) \ |
| 120 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Debug, __FILE__, __LINE__, \ | 120 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Debug, __FILE__, __LINE__, \ |
| 121 | __func__, __VA_ARGS__) | 121 | __func__, __VA_ARGS__) |
| 122 | #define NGLOG_INFO(log_class, ...) \ | 122 | #define LOG_INFO(log_class, ...) \ |
| 123 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Info, __FILE__, __LINE__, \ | 123 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Info, __FILE__, __LINE__, \ |
| 124 | __func__, __VA_ARGS__) | 124 | __func__, __VA_ARGS__) |
| 125 | #define NGLOG_WARNING(log_class, ...) \ | 125 | #define LOG_WARNING(log_class, ...) \ |
| 126 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Warning, __FILE__, __LINE__, \ | 126 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Warning, __FILE__, __LINE__, \ |
| 127 | __func__, __VA_ARGS__) | 127 | __func__, __VA_ARGS__) |
| 128 | #define NGLOG_ERROR(log_class, ...) \ | 128 | #define LOG_ERROR(log_class, ...) \ |
| 129 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Error, __FILE__, __LINE__, \ | 129 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Error, __FILE__, __LINE__, \ |
| 130 | __func__, __VA_ARGS__) | 130 | __func__, __VA_ARGS__) |
| 131 | #define NGLOG_CRITICAL(log_class, ...) \ | 131 | #define LOG_CRITICAL(log_class, ...) \ |
| 132 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Critical, __FILE__, __LINE__, \ | 132 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Critical, __FILE__, __LINE__, \ |
| 133 | __func__, __VA_ARGS__) | 133 | __func__, __VA_ARGS__) |
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index 4d1ec8fb9..5d89209ed 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp | |||
| @@ -55,7 +55,7 @@ void* AllocateExecutableMemory(size_t size, bool low) { | |||
| 55 | if (ptr == MAP_FAILED) { | 55 | if (ptr == MAP_FAILED) { |
| 56 | ptr = nullptr; | 56 | ptr = nullptr; |
| 57 | #endif | 57 | #endif |
| 58 | NGLOG_ERROR(Common_Memory, "Failed to allocate executable memory"); | 58 | LOG_ERROR(Common_Memory, "Failed to allocate executable memory"); |
| 59 | } | 59 | } |
| 60 | #if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT) | 60 | #if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT) |
| 61 | else { | 61 | else { |
| @@ -68,7 +68,7 @@ void* AllocateExecutableMemory(size_t size, bool low) { | |||
| 68 | 68 | ||
| 69 | #if EMU_ARCH_BITS == 64 | 69 | #if EMU_ARCH_BITS == 64 |
| 70 | if ((u64)ptr >= 0x80000000 && low == true) | 70 | if ((u64)ptr >= 0x80000000 && low == true) |
| 71 | NGLOG_ERROR(Common_Memory, "Executable memory ended up above 2GB!"); | 71 | LOG_ERROR(Common_Memory, "Executable memory ended up above 2GB!"); |
| 72 | #endif | 72 | #endif |
| 73 | 73 | ||
| 74 | return ptr; | 74 | return ptr; |
| @@ -85,7 +85,7 @@ void* AllocateMemoryPages(size_t size) { | |||
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | if (ptr == nullptr) | 87 | if (ptr == nullptr) |
| 88 | NGLOG_ERROR(Common_Memory, "Failed to allocate raw memory"); | 88 | LOG_ERROR(Common_Memory, "Failed to allocate raw memory"); |
| 89 | 89 | ||
| 90 | return ptr; | 90 | return ptr; |
| 91 | } | 91 | } |
| @@ -99,12 +99,12 @@ void* AllocateAlignedMemory(size_t size, size_t alignment) { | |||
| 99 | ptr = memalign(alignment, size); | 99 | ptr = memalign(alignment, size); |
| 100 | #else | 100 | #else |
| 101 | if (posix_memalign(&ptr, alignment, size) != 0) | 101 | if (posix_memalign(&ptr, alignment, size) != 0) |
| 102 | NGLOG_ERROR(Common_Memory, "Failed to allocate aligned memory"); | 102 | LOG_ERROR(Common_Memory, "Failed to allocate aligned memory"); |
| 103 | #endif | 103 | #endif |
| 104 | #endif | 104 | #endif |
| 105 | 105 | ||
| 106 | if (ptr == nullptr) | 106 | if (ptr == nullptr) |
| 107 | NGLOG_ERROR(Common_Memory, "Failed to allocate aligned memory"); | 107 | LOG_ERROR(Common_Memory, "Failed to allocate aligned memory"); |
| 108 | 108 | ||
| 109 | return ptr; | 109 | return ptr; |
| 110 | } | 110 | } |
| @@ -113,7 +113,7 @@ void FreeMemoryPages(void* ptr, size_t size) { | |||
| 113 | if (ptr) { | 113 | if (ptr) { |
| 114 | #ifdef _WIN32 | 114 | #ifdef _WIN32 |
| 115 | if (!VirtualFree(ptr, 0, MEM_RELEASE)) | 115 | if (!VirtualFree(ptr, 0, MEM_RELEASE)) |
| 116 | NGLOG_ERROR(Common_Memory, "FreeMemoryPages failed!\n{}", GetLastErrorMsg()); | 116 | LOG_ERROR(Common_Memory, "FreeMemoryPages failed!\n{}", GetLastErrorMsg()); |
| 117 | #else | 117 | #else |
| 118 | munmap(ptr, size); | 118 | munmap(ptr, size); |
| 119 | #endif | 119 | #endif |
| @@ -134,7 +134,7 @@ void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) { | |||
| 134 | #ifdef _WIN32 | 134 | #ifdef _WIN32 |
| 135 | DWORD oldValue; | 135 | DWORD oldValue; |
| 136 | if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, &oldValue)) | 136 | if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, &oldValue)) |
| 137 | NGLOG_ERROR(Common_Memory, "WriteProtectMemory failed!\n{}", GetLastErrorMsg()); | 137 | LOG_ERROR(Common_Memory, "WriteProtectMemory failed!\n{}", GetLastErrorMsg()); |
| 138 | #else | 138 | #else |
| 139 | mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_EXEC) : PROT_READ); | 139 | mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_EXEC) : PROT_READ); |
| 140 | #endif | 140 | #endif |
| @@ -145,7 +145,7 @@ void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute) { | |||
| 145 | DWORD oldValue; | 145 | DWORD oldValue; |
| 146 | if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE, | 146 | if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE, |
| 147 | &oldValue)) | 147 | &oldValue)) |
| 148 | NGLOG_ERROR(Common_Memory, "UnWriteProtectMemory failed!\n{}", GetLastErrorMsg()); | 148 | LOG_ERROR(Common_Memory, "UnWriteProtectMemory failed!\n{}", GetLastErrorMsg()); |
| 149 | #else | 149 | #else |
| 150 | mprotect(ptr, size, | 150 | mprotect(ptr, size, |
| 151 | allowExecute ? (PROT_READ | PROT_WRITE | PROT_EXEC) : PROT_WRITE | PROT_READ); | 151 | allowExecute ? (PROT_READ | PROT_WRITE | PROT_EXEC) : PROT_WRITE | PROT_READ); |
diff --git a/src/common/param_package.cpp b/src/common/param_package.cpp index ab0154133..e0df430ab 100644 --- a/src/common/param_package.cpp +++ b/src/common/param_package.cpp | |||
| @@ -25,7 +25,7 @@ ParamPackage::ParamPackage(const std::string& serialized) { | |||
| 25 | std::vector<std::string> key_value; | 25 | std::vector<std::string> key_value; |
| 26 | Common::SplitString(pair, KEY_VALUE_SEPARATOR, key_value); | 26 | Common::SplitString(pair, KEY_VALUE_SEPARATOR, key_value); |
| 27 | if (key_value.size() != 2) { | 27 | if (key_value.size() != 2) { |
| 28 | NGLOG_ERROR(Common, "invalid key pair {}", pair); | 28 | LOG_ERROR(Common, "invalid key pair {}", pair); |
| 29 | continue; | 29 | continue; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| @@ -64,7 +64,7 @@ std::string ParamPackage::Serialize() const { | |||
| 64 | std::string ParamPackage::Get(const std::string& key, const std::string& default_value) const { | 64 | std::string ParamPackage::Get(const std::string& key, const std::string& default_value) const { |
| 65 | auto pair = data.find(key); | 65 | auto pair = data.find(key); |
| 66 | if (pair == data.end()) { | 66 | if (pair == data.end()) { |
| 67 | NGLOG_DEBUG(Common, "key '{}' not found", key); | 67 | LOG_DEBUG(Common, "key '{}' not found", key); |
| 68 | return default_value; | 68 | return default_value; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| @@ -74,14 +74,14 @@ std::string ParamPackage::Get(const std::string& key, const std::string& default | |||
| 74 | int ParamPackage::Get(const std::string& key, int default_value) const { | 74 | int ParamPackage::Get(const std::string& key, int default_value) const { |
| 75 | auto pair = data.find(key); | 75 | auto pair = data.find(key); |
| 76 | if (pair == data.end()) { | 76 | if (pair == data.end()) { |
| 77 | NGLOG_DEBUG(Common, "key '{}' not found", key); | 77 | LOG_DEBUG(Common, "key '{}' not found", key); |
| 78 | return default_value; | 78 | return default_value; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | try { | 81 | try { |
| 82 | return std::stoi(pair->second); | 82 | return std::stoi(pair->second); |
| 83 | } catch (const std::logic_error&) { | 83 | } catch (const std::logic_error&) { |
| 84 | NGLOG_ERROR(Common, "failed to convert {} to int", pair->second); | 84 | LOG_ERROR(Common, "failed to convert {} to int", pair->second); |
| 85 | return default_value; | 85 | return default_value; |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| @@ -89,14 +89,14 @@ int ParamPackage::Get(const std::string& key, int default_value) const { | |||
| 89 | float ParamPackage::Get(const std::string& key, float default_value) const { | 89 | float ParamPackage::Get(const std::string& key, float default_value) const { |
| 90 | auto pair = data.find(key); | 90 | auto pair = data.find(key); |
| 91 | if (pair == data.end()) { | 91 | if (pair == data.end()) { |
| 92 | NGLOG_DEBUG(Common, "key {} not found", key); | 92 | LOG_DEBUG(Common, "key {} not found", key); |
| 93 | return default_value; | 93 | return default_value; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | try { | 96 | try { |
| 97 | return std::stof(pair->second); | 97 | return std::stof(pair->second); |
| 98 | } catch (const std::logic_error&) { | 98 | } catch (const std::logic_error&) { |
| 99 | NGLOG_ERROR(Common, "failed to convert {} to float", pair->second); | 99 | LOG_ERROR(Common, "failed to convert {} to float", pair->second); |
| 100 | return default_value; | 100 | return default_value; |
| 101 | } | 101 | } |
| 102 | } | 102 | } |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 646400db0..ea9d8f77c 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -281,7 +281,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 281 | 281 | ||
| 282 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); | 282 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); |
| 283 | if ((iconv_t)(-1) == conv_desc) { | 283 | if ((iconv_t)(-1) == conv_desc) { |
| 284 | NGLOG_ERROR(Common, "Iconv initialization failure [{}]: {}", fromcode, strerror(errno)); | 284 | LOG_ERROR(Common, "Iconv initialization failure [{}]: {}", fromcode, strerror(errno)); |
| 285 | iconv_close(conv_desc); | 285 | iconv_close(conv_desc); |
| 286 | return {}; | 286 | return {}; |
| 287 | } | 287 | } |
| @@ -310,7 +310,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 310 | ++src_buffer; | 310 | ++src_buffer; |
| 311 | } | 311 | } |
| 312 | } else { | 312 | } else { |
| 313 | NGLOG_ERROR(Common, "iconv failure [{}]: {}", fromcode, strerror(errno)); | 313 | LOG_ERROR(Common, "iconv failure [{}]: {}", fromcode, strerror(errno)); |
| 314 | break; | 314 | break; |
| 315 | } | 315 | } |
| 316 | } | 316 | } |
| @@ -329,7 +329,7 @@ std::u16string UTF8ToUTF16(const std::string& input) { | |||
| 329 | 329 | ||
| 330 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); | 330 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); |
| 331 | if ((iconv_t)(-1) == conv_desc) { | 331 | if ((iconv_t)(-1) == conv_desc) { |
| 332 | NGLOG_ERROR(Common, "Iconv initialization failure [UTF-8]: {}", strerror(errno)); | 332 | LOG_ERROR(Common, "Iconv initialization failure [UTF-8]: {}", strerror(errno)); |
| 333 | iconv_close(conv_desc); | 333 | iconv_close(conv_desc); |
| 334 | return {}; | 334 | return {}; |
| 335 | } | 335 | } |
| @@ -358,7 +358,7 @@ std::u16string UTF8ToUTF16(const std::string& input) { | |||
| 358 | ++src_buffer; | 358 | ++src_buffer; |
| 359 | } | 359 | } |
| 360 | } else { | 360 | } else { |
| 361 | NGLOG_ERROR(Common, "iconv failure [UTF-8]: {}", strerror(errno)); | 361 | LOG_ERROR(Common, "iconv failure [UTF-8]: {}", strerror(errno)); |
| 362 | break; | 362 | break; |
| 363 | } | 363 | } |
| 364 | } | 364 | } |
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index b5db47667..975ac6e3f 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp | |||
| @@ -55,7 +55,7 @@ public: | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | void InterpreterFallback(u64 pc, size_t num_instructions) override { | 57 | void InterpreterFallback(u64 pc, size_t num_instructions) override { |
| 58 | NGLOG_INFO(Core_ARM, "Unicorn fallback @ 0x{:X} for {} instructions (instr = {:08X})", pc, | 58 | LOG_INFO(Core_ARM, "Unicorn fallback @ 0x{:X} for {} instructions (instr = {:08X})", pc, |
| 59 | num_instructions, MemoryReadCode(pc)); | 59 | num_instructions, MemoryReadCode(pc)); |
| 60 | 60 | ||
| 61 | ARM_Interface::ThreadContext ctx; | 61 | ARM_Interface::ThreadContext ctx; |
diff --git a/src/core/core.cpp b/src/core/core.cpp index 84ab876cc..8c2977522 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -87,14 +87,14 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 87 | app_loader = Loader::GetLoader(filepath); | 87 | app_loader = Loader::GetLoader(filepath); |
| 88 | 88 | ||
| 89 | if (!app_loader) { | 89 | if (!app_loader) { |
| 90 | NGLOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); | 90 | LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); |
| 91 | return ResultStatus::ErrorGetLoader; | 91 | return ResultStatus::ErrorGetLoader; |
| 92 | } | 92 | } |
| 93 | std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode = | 93 | std::pair<boost::optional<u32>, Loader::ResultStatus> system_mode = |
| 94 | app_loader->LoadKernelSystemMode(); | 94 | app_loader->LoadKernelSystemMode(); |
| 95 | 95 | ||
| 96 | if (system_mode.second != Loader::ResultStatus::Success) { | 96 | if (system_mode.second != Loader::ResultStatus::Success) { |
| 97 | NGLOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", | 97 | LOG_CRITICAL(Core, "Failed to determine system mode (Error {})!", |
| 98 | static_cast<int>(system_mode.second)); | 98 | static_cast<int>(system_mode.second)); |
| 99 | 99 | ||
| 100 | switch (system_mode.second) { | 100 | switch (system_mode.second) { |
| @@ -111,7 +111,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 111 | 111 | ||
| 112 | ResultStatus init_result{Init(emu_window, system_mode.first.get())}; | 112 | ResultStatus init_result{Init(emu_window, system_mode.first.get())}; |
| 113 | if (init_result != ResultStatus::Success) { | 113 | if (init_result != ResultStatus::Success) { |
| 114 | NGLOG_CRITICAL(Core, "Failed to initialize system (Error {})!", | 114 | LOG_CRITICAL(Core, "Failed to initialize system (Error {})!", |
| 115 | static_cast<int>(init_result)); | 115 | static_cast<int>(init_result)); |
| 116 | System::Shutdown(); | 116 | System::Shutdown(); |
| 117 | return init_result; | 117 | return init_result; |
| @@ -119,7 +119,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file | |||
| 119 | 119 | ||
| 120 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; | 120 | const Loader::ResultStatus load_result{app_loader->Load(current_process)}; |
| 121 | if (Loader::ResultStatus::Success != load_result) { | 121 | if (Loader::ResultStatus::Success != load_result) { |
| 122 | NGLOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); | 122 | LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); |
| 123 | System::Shutdown(); | 123 | System::Shutdown(); |
| 124 | 124 | ||
| 125 | switch (load_result) { | 125 | switch (load_result) { |
| @@ -161,7 +161,7 @@ Cpu& System::CpuCore(size_t core_index) { | |||
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | 163 | System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { |
| 164 | NGLOG_DEBUG(HW_Memory, "initialized OK"); | 164 | LOG_DEBUG(HW_Memory, "initialized OK"); |
| 165 | 165 | ||
| 166 | CoreTiming::Init(); | 166 | CoreTiming::Init(); |
| 167 | 167 | ||
| @@ -196,7 +196,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 196 | } | 196 | } |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | NGLOG_DEBUG(Core, "Initialized OK"); | 199 | LOG_DEBUG(Core, "Initialized OK"); |
| 200 | 200 | ||
| 201 | // Reset counters and set time origin to current frame | 201 | // Reset counters and set time origin to current frame |
| 202 | GetAndResetPerfStats(); | 202 | GetAndResetPerfStats(); |
| @@ -245,7 +245,7 @@ void System::Shutdown() { | |||
| 245 | // Close app loader | 245 | // Close app loader |
| 246 | app_loader.reset(); | 246 | app_loader.reset(); |
| 247 | 247 | ||
| 248 | NGLOG_DEBUG(Core, "Shutdown OK"); | 248 | LOG_DEBUG(Core, "Shutdown OK"); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | Service::SM::ServiceManager& System::ServiceManager() { | 251 | Service::SM::ServiceManager& System::ServiceManager() { |
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 099f2bb1a..f22d6a9d0 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp | |||
| @@ -56,7 +56,7 @@ Cpu::Cpu(std::shared_ptr<CpuBarrier> cpu_barrier, size_t core_index) | |||
| 56 | arm_interface = std::make_shared<ARM_Dynarmic>(); | 56 | arm_interface = std::make_shared<ARM_Dynarmic>(); |
| 57 | #else | 57 | #else |
| 58 | cpu_core = std::make_shared<ARM_Unicorn>(); | 58 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| 59 | NGLOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | 59 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); |
| 60 | #endif | 60 | #endif |
| 61 | } else { | 61 | } else { |
| 62 | arm_interface = std::make_shared<ARM_Unicorn>(); | 62 | arm_interface = std::make_shared<ARM_Unicorn>(); |
| @@ -75,7 +75,7 @@ void Cpu::RunLoop(bool tight_loop) { | |||
| 75 | // If we don't have a currently active thread then don't execute instructions, | 75 | // If we don't have a currently active thread then don't execute instructions, |
| 76 | // instead advance to the next event and try to yield to the next thread | 76 | // instead advance to the next event and try to yield to the next thread |
| 77 | if (Kernel::GetCurrentThread() == nullptr) { | 77 | if (Kernel::GetCurrentThread() == nullptr) { |
| 78 | NGLOG_TRACE(Core, "Core-{} idling", core_index); | 78 | LOG_TRACE(Core, "Core-{} idling", core_index); |
| 79 | 79 | ||
| 80 | if (IsMainCore()) { | 80 | if (IsMainCore()) { |
| 81 | CoreTiming::Idle(); | 81 | CoreTiming::Idle(); |
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index dc1d8668f..50d1e3fc9 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -74,11 +74,11 @@ static void EmptyTimedCallback(u64 userdata, s64 cyclesLate) {} | |||
| 74 | 74 | ||
| 75 | s64 usToCycles(s64 us) { | 75 | s64 usToCycles(s64 us) { |
| 76 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | 76 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |
| 77 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 77 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 78 | return std::numeric_limits<s64>::max(); | 78 | return std::numeric_limits<s64>::max(); |
| 79 | } | 79 | } |
| 80 | if (us > MAX_VALUE_TO_MULTIPLY) { | 80 | if (us > MAX_VALUE_TO_MULTIPLY) { |
| 81 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 81 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 82 | return BASE_CLOCK_RATE * (us / 1000000); | 82 | return BASE_CLOCK_RATE * (us / 1000000); |
| 83 | } | 83 | } |
| 84 | return (BASE_CLOCK_RATE * us) / 1000000; | 84 | return (BASE_CLOCK_RATE * us) / 1000000; |
| @@ -86,11 +86,11 @@ s64 usToCycles(s64 us) { | |||
| 86 | 86 | ||
| 87 | s64 usToCycles(u64 us) { | 87 | s64 usToCycles(u64 us) { |
| 88 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { | 88 | if (us / 1000000 > MAX_VALUE_TO_MULTIPLY) { |
| 89 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 89 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 90 | return std::numeric_limits<s64>::max(); | 90 | return std::numeric_limits<s64>::max(); |
| 91 | } | 91 | } |
| 92 | if (us > MAX_VALUE_TO_MULTIPLY) { | 92 | if (us > MAX_VALUE_TO_MULTIPLY) { |
| 93 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 93 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 94 | return BASE_CLOCK_RATE * static_cast<s64>(us / 1000000); | 94 | return BASE_CLOCK_RATE * static_cast<s64>(us / 1000000); |
| 95 | } | 95 | } |
| 96 | return (BASE_CLOCK_RATE * static_cast<s64>(us)) / 1000000; | 96 | return (BASE_CLOCK_RATE * static_cast<s64>(us)) / 1000000; |
| @@ -98,11 +98,11 @@ s64 usToCycles(u64 us) { | |||
| 98 | 98 | ||
| 99 | s64 nsToCycles(s64 ns) { | 99 | s64 nsToCycles(s64 ns) { |
| 100 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | 100 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |
| 101 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 101 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 102 | return std::numeric_limits<s64>::max(); | 102 | return std::numeric_limits<s64>::max(); |
| 103 | } | 103 | } |
| 104 | if (ns > MAX_VALUE_TO_MULTIPLY) { | 104 | if (ns > MAX_VALUE_TO_MULTIPLY) { |
| 105 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 105 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 106 | return BASE_CLOCK_RATE * (ns / 1000000000); | 106 | return BASE_CLOCK_RATE * (ns / 1000000000); |
| 107 | } | 107 | } |
| 108 | return (BASE_CLOCK_RATE * ns) / 1000000000; | 108 | return (BASE_CLOCK_RATE * ns) / 1000000000; |
| @@ -110,11 +110,11 @@ s64 nsToCycles(s64 ns) { | |||
| 110 | 110 | ||
| 111 | s64 nsToCycles(u64 ns) { | 111 | s64 nsToCycles(u64 ns) { |
| 112 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { | 112 | if (ns / 1000000000 > MAX_VALUE_TO_MULTIPLY) { |
| 113 | NGLOG_ERROR(Core_Timing, "Integer overflow, use max value"); | 113 | LOG_ERROR(Core_Timing, "Integer overflow, use max value"); |
| 114 | return std::numeric_limits<s64>::max(); | 114 | return std::numeric_limits<s64>::max(); |
| 115 | } | 115 | } |
| 116 | if (ns > MAX_VALUE_TO_MULTIPLY) { | 116 | if (ns > MAX_VALUE_TO_MULTIPLY) { |
| 117 | NGLOG_DEBUG(Core_Timing, "Time very big, do rounding"); | 117 | LOG_DEBUG(Core_Timing, "Time very big, do rounding"); |
| 118 | return BASE_CLOCK_RATE * (static_cast<s64>(ns) / 1000000000); | 118 | return BASE_CLOCK_RATE * (static_cast<s64>(ns) / 1000000000); |
| 119 | } | 119 | } |
| 120 | return (BASE_CLOCK_RATE * static_cast<s64>(ns)) / 1000000000; | 120 | return (BASE_CLOCK_RATE * static_cast<s64>(ns)) / 1000000000; |
diff --git a/src/core/file_sys/disk_filesystem.cpp b/src/core/file_sys/disk_filesystem.cpp index 8aa0e0aa4..8c6f15bb5 100644 --- a/src/core/file_sys/disk_filesystem.cpp +++ b/src/core/file_sys/disk_filesystem.cpp | |||
| @@ -80,19 +80,19 @@ ResultCode Disk_FileSystem::RenameFile(const std::string& src_path, | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | ResultCode Disk_FileSystem::DeleteDirectory(const Path& path) const { | 82 | ResultCode Disk_FileSystem::DeleteDirectory(const Path& path) const { |
| 83 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 83 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 84 | // TODO(wwylele): Use correct error code | 84 | // TODO(wwylele): Use correct error code |
| 85 | return ResultCode(-1); | 85 | return ResultCode(-1); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | ResultCode Disk_FileSystem::DeleteDirectoryRecursively(const Path& path) const { | 88 | ResultCode Disk_FileSystem::DeleteDirectoryRecursively(const Path& path) const { |
| 89 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 89 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 90 | // TODO(wwylele): Use correct error code | 90 | // TODO(wwylele): Use correct error code |
| 91 | return ResultCode(-1); | 91 | return ResultCode(-1); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | ResultCode Disk_FileSystem::CreateFile(const std::string& path, u64 size) const { | 94 | ResultCode Disk_FileSystem::CreateFile(const std::string& path, u64 size) const { |
| 95 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 95 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 96 | 96 | ||
| 97 | std::string full_path = base_directory + path; | 97 | std::string full_path = base_directory + path; |
| 98 | if (size == 0) { | 98 | if (size == 0) { |
| @@ -107,7 +107,7 @@ ResultCode Disk_FileSystem::CreateFile(const std::string& path, u64 size) const | |||
| 107 | return RESULT_SUCCESS; | 107 | return RESULT_SUCCESS; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | NGLOG_ERROR(Service_FS, "Too large file"); | 110 | LOG_ERROR(Service_FS, "Too large file"); |
| 111 | // TODO(Subv): Find out the correct error code | 111 | // TODO(Subv): Find out the correct error code |
| 112 | return ResultCode(-1); | 112 | return ResultCode(-1); |
| 113 | } | 113 | } |
| @@ -120,13 +120,13 @@ ResultCode Disk_FileSystem::CreateDirectory(const std::string& path) const { | |||
| 120 | return RESULT_SUCCESS; | 120 | return RESULT_SUCCESS; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | NGLOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", full_path); | 123 | LOG_CRITICAL(Service_FS, "(unreachable) Unknown error creating {}", full_path); |
| 124 | // TODO(wwylele): Use correct error code | 124 | // TODO(wwylele): Use correct error code |
| 125 | return ResultCode(-1); | 125 | return ResultCode(-1); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | ResultCode Disk_FileSystem::RenameDirectory(const Path& src_path, const Path& dest_path) const { | 128 | ResultCode Disk_FileSystem::RenameDirectory(const Path& src_path, const Path& dest_path) const { |
| 129 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 129 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 130 | // TODO(wwylele): Use correct error code | 130 | // TODO(wwylele): Use correct error code |
| 131 | return ResultCode(-1); | 131 | return ResultCode(-1); |
| 132 | } | 132 | } |
| @@ -146,7 +146,7 @@ ResultVal<std::unique_ptr<DirectoryBackend>> Disk_FileSystem::OpenDirectory( | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | u64 Disk_FileSystem::GetFreeSpaceSize() const { | 148 | u64 Disk_FileSystem::GetFreeSpaceSize() const { |
| 149 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 149 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 150 | return 0; | 150 | return 0; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| @@ -163,14 +163,14 @@ ResultVal<FileSys::EntryType> Disk_FileSystem::GetEntryType(const std::string& p | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | ResultVal<size_t> Disk_Storage::Read(const u64 offset, const size_t length, u8* buffer) const { | 165 | ResultVal<size_t> Disk_Storage::Read(const u64 offset, const size_t length, u8* buffer) const { |
| 166 | NGLOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | 166 | LOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); |
| 167 | file->Seek(offset, SEEK_SET); | 167 | file->Seek(offset, SEEK_SET); |
| 168 | return MakeResult<size_t>(file->ReadBytes(buffer, length)); | 168 | return MakeResult<size_t>(file->ReadBytes(buffer, length)); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | ResultVal<size_t> Disk_Storage::Write(const u64 offset, const size_t length, const bool flush, | 171 | ResultVal<size_t> Disk_Storage::Write(const u64 offset, const size_t length, const bool flush, |
| 172 | const u8* buffer) const { | 172 | const u8* buffer) const { |
| 173 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 173 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 174 | file->Seek(offset, SEEK_SET); | 174 | file->Seek(offset, SEEK_SET); |
| 175 | size_t written = file->WriteBytes(buffer, length); | 175 | size_t written = file->WriteBytes(buffer, length); |
| 176 | if (flush) { | 176 | if (flush) { |
| @@ -204,7 +204,7 @@ u64 Disk_Directory::Read(const u64 count, Entry* entries) { | |||
| 204 | const std::string& filename = file.virtualName; | 204 | const std::string& filename = file.virtualName; |
| 205 | Entry& entry = entries[entries_read]; | 205 | Entry& entry = entries[entries_read]; |
| 206 | 206 | ||
| 207 | NGLOG_TRACE(Service_FS, "File {}: size={} dir={}", filename, file.size, file.isDirectory); | 207 | LOG_TRACE(Service_FS, "File {}: size={} dir={}", filename, file.size, file.isDirectory); |
| 208 | 208 | ||
| 209 | // TODO(Link Mauve): use a proper conversion to UTF-16. | 209 | // TODO(Link Mauve): use a proper conversion to UTF-16. |
| 210 | for (size_t j = 0; j < FILENAME_LENGTH; ++j) { | 210 | for (size_t j = 0; j < FILENAME_LENGTH; ++j) { |
diff --git a/src/core/file_sys/filesystem.cpp b/src/core/file_sys/filesystem.cpp index 87083878b..82fdb3c46 100644 --- a/src/core/file_sys/filesystem.cpp +++ b/src/core/file_sys/filesystem.cpp | |||
| @@ -71,7 +71,7 @@ std::string Path::AsString() const { | |||
| 71 | case Binary: | 71 | case Binary: |
| 72 | default: | 72 | default: |
| 73 | // TODO(yuriks): Add assert | 73 | // TODO(yuriks): Add assert |
| 74 | NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); | 74 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); |
| 75 | return {}; | 75 | return {}; |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| @@ -87,7 +87,7 @@ std::u16string Path::AsU16Str() const { | |||
| 87 | case Invalid: | 87 | case Invalid: |
| 88 | case Binary: | 88 | case Binary: |
| 89 | // TODO(yuriks): Add assert | 89 | // TODO(yuriks): Add assert |
| 90 | NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); | 90 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); |
| 91 | return {}; | 91 | return {}; |
| 92 | } | 92 | } |
| 93 | 93 | ||
| @@ -115,7 +115,7 @@ std::vector<u8> Path::AsBinary() const { | |||
| 115 | case Invalid: | 115 | case Invalid: |
| 116 | default: | 116 | default: |
| 117 | // TODO(yuriks): Add assert | 117 | // TODO(yuriks): Add assert |
| 118 | NGLOG_ERROR(Service_FS, "LowPathType cannot be converted to binary!"); | 118 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to binary!"); |
| 119 | return {}; | 119 | return {}; |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
diff --git a/src/core/file_sys/partition_filesystem.cpp b/src/core/file_sys/partition_filesystem.cpp index 874b9e23b..ebbc0b252 100644 --- a/src/core/file_sys/partition_filesystem.cpp +++ b/src/core/file_sys/partition_filesystem.cpp | |||
| @@ -46,7 +46,7 @@ Loader::ResultStatus PartitionFilesystem::Load(const std::string& file_path, siz | |||
| 46 | 46 | ||
| 47 | Loader::ResultStatus result = Load(file_data); | 47 | Loader::ResultStatus result = Load(file_data); |
| 48 | if (result != Loader::ResultStatus::Success) | 48 | if (result != Loader::ResultStatus::Success) |
| 49 | NGLOG_ERROR(Service_FS, "Failed to load PFS from file {}!", file_path); | 49 | LOG_ERROR(Service_FS, "Failed to load PFS from file {}!", file_path); |
| 50 | 50 | ||
| 51 | return result; | 51 | return result; |
| 52 | } | 52 | } |
| @@ -125,10 +125,10 @@ u64 PartitionFilesystem::GetFileSize(const std::string& name) const { | |||
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | void PartitionFilesystem::Print() const { | 127 | void PartitionFilesystem::Print() const { |
| 128 | NGLOG_DEBUG(Service_FS, "Magic: {}", pfs_header.magic); | 128 | LOG_DEBUG(Service_FS, "Magic: {}", pfs_header.magic); |
| 129 | NGLOG_DEBUG(Service_FS, "Files: {}", pfs_header.num_entries); | 129 | LOG_DEBUG(Service_FS, "Files: {}", pfs_header.num_entries); |
| 130 | for (u32 i = 0; i < pfs_header.num_entries; i++) { | 130 | for (u32 i = 0; i < pfs_header.num_entries; i++) { |
| 131 | NGLOG_DEBUG(Service_FS, " > File {}: {} (0x{:X} bytes, at 0x{:X})", i, | 131 | LOG_DEBUG(Service_FS, " > File {}: {} (0x{:X} bytes, at 0x{:X})", i, |
| 132 | pfs_entries[i].name.c_str(), pfs_entries[i].fs_entry.size, | 132 | pfs_entries[i].name.c_str(), pfs_entries[i].fs_entry.size, |
| 133 | GetFileOffset(pfs_entries[i].name)); | 133 | GetFileOffset(pfs_entries[i].name)); |
| 134 | } | 134 | } |
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index 25a822891..a17268b2c 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp | |||
| @@ -21,7 +21,7 @@ Loader::ResultStatus ProgramMetadata::Load(const std::string& file_path) { | |||
| 21 | 21 | ||
| 22 | Loader::ResultStatus result = Load(file_data); | 22 | Loader::ResultStatus result = Load(file_data); |
| 23 | if (result != Loader::ResultStatus::Success) | 23 | if (result != Loader::ResultStatus::Success) |
| 24 | NGLOG_ERROR(Service_FS, "Failed to load NPDM from file {}!", file_path); | 24 | LOG_ERROR(Service_FS, "Failed to load NPDM from file {}!", file_path); |
| 25 | 25 | ||
| 26 | return result; | 26 | return result; |
| 27 | } | 27 | } |
| @@ -76,13 +76,13 @@ u64 ProgramMetadata::GetFilesystemPermissions() const { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | void ProgramMetadata::Print() const { | 78 | void ProgramMetadata::Print() const { |
| 79 | NGLOG_DEBUG(Service_FS, "Magic: {:.4}", npdm_header.magic.data()); | 79 | LOG_DEBUG(Service_FS, "Magic: {:.4}", npdm_header.magic.data()); |
| 80 | NGLOG_DEBUG(Service_FS, "Main thread priority: 0x{:02X}", npdm_header.main_thread_priority); | 80 | LOG_DEBUG(Service_FS, "Main thread priority: 0x{:02X}", npdm_header.main_thread_priority); |
| 81 | NGLOG_DEBUG(Service_FS, "Main thread core: {}", npdm_header.main_thread_cpu); | 81 | LOG_DEBUG(Service_FS, "Main thread core: {}", npdm_header.main_thread_cpu); |
| 82 | NGLOG_DEBUG(Service_FS, "Main thread stack size: 0x{:X} bytes", npdm_header.main_stack_size); | 82 | LOG_DEBUG(Service_FS, "Main thread stack size: 0x{:X} bytes", npdm_header.main_stack_size); |
| 83 | NGLOG_DEBUG(Service_FS, "Process category: {}", npdm_header.process_category); | 83 | LOG_DEBUG(Service_FS, "Process category: {}", npdm_header.process_category); |
| 84 | NGLOG_DEBUG(Service_FS, "Flags: 0x{:02X}", npdm_header.flags); | 84 | LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", npdm_header.flags); |
| 85 | NGLOG_DEBUG(Service_FS, " > 64-bit instructions: {}", | 85 | LOG_DEBUG(Service_FS, " > 64-bit instructions: {}", |
| 86 | npdm_header.has_64_bit_instructions ? "YES" : "NO"); | 86 | npdm_header.has_64_bit_instructions ? "YES" : "NO"); |
| 87 | 87 | ||
| 88 | auto address_space = "Unknown"; | 88 | auto address_space = "Unknown"; |
| @@ -95,19 +95,19 @@ void ProgramMetadata::Print() const { | |||
| 95 | break; | 95 | break; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | NGLOG_DEBUG(Service_FS, " > Address space: {}\n", address_space); | 98 | LOG_DEBUG(Service_FS, " > Address space: {}\n", address_space); |
| 99 | 99 | ||
| 100 | // Begin ACID printing (potential perms, signed) | 100 | // Begin ACID printing (potential perms, signed) |
| 101 | NGLOG_DEBUG(Service_FS, "Magic: {:.4}", acid_header.magic.data()); | 101 | LOG_DEBUG(Service_FS, "Magic: {:.4}", acid_header.magic.data()); |
| 102 | NGLOG_DEBUG(Service_FS, "Flags: 0x{:02X}", acid_header.flags); | 102 | LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", acid_header.flags); |
| 103 | NGLOG_DEBUG(Service_FS, " > Is Retail: {}", acid_header.is_retail ? "YES" : "NO"); | 103 | LOG_DEBUG(Service_FS, " > Is Retail: {}", acid_header.is_retail ? "YES" : "NO"); |
| 104 | NGLOG_DEBUG(Service_FS, "Title ID Min: 0x{:016X}", acid_header.title_id_min); | 104 | LOG_DEBUG(Service_FS, "Title ID Min: 0x{:016X}", acid_header.title_id_min); |
| 105 | NGLOG_DEBUG(Service_FS, "Title ID Max: 0x{:016X}", acid_header.title_id_max); | 105 | LOG_DEBUG(Service_FS, "Title ID Max: 0x{:016X}", acid_header.title_id_max); |
| 106 | NGLOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", acid_file_access.permissions); | 106 | LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", acid_file_access.permissions); |
| 107 | 107 | ||
| 108 | // Begin ACI0 printing (actual perms, unsigned) | 108 | // Begin ACI0 printing (actual perms, unsigned) |
| 109 | NGLOG_DEBUG(Service_FS, "Magic: {:.4}", aci_header.magic.data()); | 109 | LOG_DEBUG(Service_FS, "Magic: {:.4}", aci_header.magic.data()); |
| 110 | NGLOG_DEBUG(Service_FS, "Title ID: 0x{:016X}", aci_header.title_id); | 110 | LOG_DEBUG(Service_FS, "Title ID: 0x{:016X}", aci_header.title_id); |
| 111 | NGLOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", aci_file_access.permissions); | 111 | LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", aci_file_access.permissions); |
| 112 | } | 112 | } |
| 113 | } // namespace FileSys | 113 | } // namespace FileSys |
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index dc7591aca..84ae0d99b 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp | |||
| @@ -14,7 +14,7 @@ namespace FileSys { | |||
| 14 | RomFS_Factory::RomFS_Factory(Loader::AppLoader& app_loader) { | 14 | RomFS_Factory::RomFS_Factory(Loader::AppLoader& app_loader) { |
| 15 | // Load the RomFS from the app | 15 | // Load the RomFS from the app |
| 16 | if (Loader::ResultStatus::Success != app_loader.ReadRomFS(romfs_file, data_offset, data_size)) { | 16 | if (Loader::ResultStatus::Success != app_loader.ReadRomFS(romfs_file, data_offset, data_size)) { |
| 17 | NGLOG_ERROR(Service_FS, "Unable to read RomFS!"); | 17 | LOG_ERROR(Service_FS, "Unable to read RomFS!"); |
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | 20 | ||
| @@ -24,13 +24,13 @@ ResultVal<std::unique_ptr<FileSystemBackend>> RomFS_Factory::Open(const Path& pa | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | ResultCode RomFS_Factory::Format(const Path& path) { | 26 | ResultCode RomFS_Factory::Format(const Path& path) { |
| 27 | NGLOG_ERROR(Service_FS, "Unimplemented Format archive {}", GetName()); | 27 | LOG_ERROR(Service_FS, "Unimplemented Format archive {}", GetName()); |
| 28 | // TODO(bunnei): Find the right error code for this | 28 | // TODO(bunnei): Find the right error code for this |
| 29 | return ResultCode(-1); | 29 | return ResultCode(-1); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | ResultVal<ArchiveFormatInfo> RomFS_Factory::GetFormatInfo(const Path& path) const { | 32 | ResultVal<ArchiveFormatInfo> RomFS_Factory::GetFormatInfo(const Path& path) const { |
| 33 | NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | 33 | LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); |
| 34 | // TODO(bunnei): Find the right error code for this | 34 | // TODO(bunnei): Find the right error code for this |
| 35 | return ResultCode(-1); | 35 | return ResultCode(-1); |
| 36 | } | 36 | } |
diff --git a/src/core/file_sys/romfs_filesystem.cpp b/src/core/file_sys/romfs_filesystem.cpp index 8e2bce687..4dbd6a786 100644 --- a/src/core/file_sys/romfs_filesystem.cpp +++ b/src/core/file_sys/romfs_filesystem.cpp | |||
| @@ -21,48 +21,48 @@ ResultVal<std::unique_ptr<StorageBackend>> RomFS_FileSystem::OpenFile(const std: | |||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | ResultCode RomFS_FileSystem::DeleteFile(const std::string& path) const { | 23 | ResultCode RomFS_FileSystem::DeleteFile(const std::string& path) const { |
| 24 | NGLOG_CRITICAL(Service_FS, "Attempted to delete a file from an ROMFS archive ({}).", GetName()); | 24 | LOG_CRITICAL(Service_FS, "Attempted to delete a file from an ROMFS archive ({}).", GetName()); |
| 25 | // TODO(bunnei): Use correct error code | 25 | // TODO(bunnei): Use correct error code |
| 26 | return ResultCode(-1); | 26 | return ResultCode(-1); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | ResultCode RomFS_FileSystem::RenameFile(const std::string& src_path, | 29 | ResultCode RomFS_FileSystem::RenameFile(const std::string& src_path, |
| 30 | const std::string& dest_path) const { | 30 | const std::string& dest_path) const { |
| 31 | NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an ROMFS archive ({}).", | 31 | LOG_CRITICAL(Service_FS, "Attempted to rename a file within an ROMFS archive ({}).", |
| 32 | GetName()); | 32 | GetName()); |
| 33 | // TODO(wwylele): Use correct error code | 33 | // TODO(wwylele): Use correct error code |
| 34 | return ResultCode(-1); | 34 | return ResultCode(-1); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | ResultCode RomFS_FileSystem::DeleteDirectory(const Path& path) const { | 37 | ResultCode RomFS_FileSystem::DeleteDirectory(const Path& path) const { |
| 38 | NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an ROMFS archive ({}).", | 38 | LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an ROMFS archive ({}).", |
| 39 | GetName()); | 39 | GetName()); |
| 40 | // TODO(wwylele): Use correct error code | 40 | // TODO(wwylele): Use correct error code |
| 41 | return ResultCode(-1); | 41 | return ResultCode(-1); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | ResultCode RomFS_FileSystem::DeleteDirectoryRecursively(const Path& path) const { | 44 | ResultCode RomFS_FileSystem::DeleteDirectoryRecursively(const Path& path) const { |
| 45 | NGLOG_CRITICAL(Service_FS, "Attempted to delete a directory from an ROMFS archive ({}).", | 45 | LOG_CRITICAL(Service_FS, "Attempted to delete a directory from an ROMFS archive ({}).", |
| 46 | GetName()); | 46 | GetName()); |
| 47 | // TODO(wwylele): Use correct error code | 47 | // TODO(wwylele): Use correct error code |
| 48 | return ResultCode(-1); | 48 | return ResultCode(-1); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | ResultCode RomFS_FileSystem::CreateFile(const std::string& path, u64 size) const { | 51 | ResultCode RomFS_FileSystem::CreateFile(const std::string& path, u64 size) const { |
| 52 | NGLOG_CRITICAL(Service_FS, "Attempted to create a file in an ROMFS archive ({}).", GetName()); | 52 | LOG_CRITICAL(Service_FS, "Attempted to create a file in an ROMFS archive ({}).", GetName()); |
| 53 | // TODO(bunnei): Use correct error code | 53 | // TODO(bunnei): Use correct error code |
| 54 | return ResultCode(-1); | 54 | return ResultCode(-1); |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | ResultCode RomFS_FileSystem::CreateDirectory(const std::string& path) const { | 57 | ResultCode RomFS_FileSystem::CreateDirectory(const std::string& path) const { |
| 58 | NGLOG_CRITICAL(Service_FS, "Attempted to create a directory in an ROMFS archive ({}).", | 58 | LOG_CRITICAL(Service_FS, "Attempted to create a directory in an ROMFS archive ({}).", |
| 59 | GetName()); | 59 | GetName()); |
| 60 | // TODO(wwylele): Use correct error code | 60 | // TODO(wwylele): Use correct error code |
| 61 | return ResultCode(-1); | 61 | return ResultCode(-1); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | ResultCode RomFS_FileSystem::RenameDirectory(const Path& src_path, const Path& dest_path) const { | 64 | ResultCode RomFS_FileSystem::RenameDirectory(const Path& src_path, const Path& dest_path) const { |
| 65 | NGLOG_CRITICAL(Service_FS, "Attempted to rename a file within an ROMFS archive ({}).", | 65 | LOG_CRITICAL(Service_FS, "Attempted to rename a file within an ROMFS archive ({}).", |
| 66 | GetName()); | 66 | GetName()); |
| 67 | // TODO(wwylele): Use correct error code | 67 | // TODO(wwylele): Use correct error code |
| 68 | return ResultCode(-1); | 68 | return ResultCode(-1); |
| @@ -70,23 +70,23 @@ ResultCode RomFS_FileSystem::RenameDirectory(const Path& src_path, const Path& d | |||
| 70 | 70 | ||
| 71 | ResultVal<std::unique_ptr<DirectoryBackend>> RomFS_FileSystem::OpenDirectory( | 71 | ResultVal<std::unique_ptr<DirectoryBackend>> RomFS_FileSystem::OpenDirectory( |
| 72 | const std::string& path) const { | 72 | const std::string& path) const { |
| 73 | NGLOG_WARNING(Service_FS, "Opening Directory in a ROMFS archive"); | 73 | LOG_WARNING(Service_FS, "Opening Directory in a ROMFS archive"); |
| 74 | return MakeResult<std::unique_ptr<DirectoryBackend>>(std::make_unique<ROMFSDirectory>()); | 74 | return MakeResult<std::unique_ptr<DirectoryBackend>>(std::make_unique<ROMFSDirectory>()); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | u64 RomFS_FileSystem::GetFreeSpaceSize() const { | 77 | u64 RomFS_FileSystem::GetFreeSpaceSize() const { |
| 78 | NGLOG_WARNING(Service_FS, "Attempted to get the free space in an ROMFS archive"); | 78 | LOG_WARNING(Service_FS, "Attempted to get the free space in an ROMFS archive"); |
| 79 | return 0; | 79 | return 0; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | ResultVal<FileSys::EntryType> RomFS_FileSystem::GetEntryType(const std::string& path) const { | 82 | ResultVal<FileSys::EntryType> RomFS_FileSystem::GetEntryType(const std::string& path) const { |
| 83 | NGLOG_CRITICAL(Service_FS, "Called within an ROMFS archive (path {}).", path); | 83 | LOG_CRITICAL(Service_FS, "Called within an ROMFS archive (path {}).", path); |
| 84 | // TODO(wwylele): Use correct error code | 84 | // TODO(wwylele): Use correct error code |
| 85 | return ResultCode(-1); | 85 | return ResultCode(-1); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | ResultVal<size_t> RomFS_Storage::Read(const u64 offset, const size_t length, u8* buffer) const { | 88 | ResultVal<size_t> RomFS_Storage::Read(const u64 offset, const size_t length, u8* buffer) const { |
| 89 | NGLOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); | 89 | LOG_TRACE(Service_FS, "called offset={}, length={}", offset, length); |
| 90 | romfs_file->Seek(data_offset + offset, SEEK_SET); | 90 | romfs_file->Seek(data_offset + offset, SEEK_SET); |
| 91 | size_t read_length = (size_t)std::min((u64)length, data_size - offset); | 91 | size_t read_length = (size_t)std::min((u64)length, data_size - offset); |
| 92 | 92 | ||
| @@ -95,7 +95,7 @@ ResultVal<size_t> RomFS_Storage::Read(const u64 offset, const size_t length, u8* | |||
| 95 | 95 | ||
| 96 | ResultVal<size_t> RomFS_Storage::Write(const u64 offset, const size_t length, const bool flush, | 96 | ResultVal<size_t> RomFS_Storage::Write(const u64 offset, const size_t length, const bool flush, |
| 97 | const u8* buffer) const { | 97 | const u8* buffer) const { |
| 98 | NGLOG_ERROR(Service_FS, "Attempted to write to ROMFS file"); | 98 | LOG_ERROR(Service_FS, "Attempted to write to ROMFS file"); |
| 99 | // TODO(Subv): Find error code | 99 | // TODO(Subv): Find error code |
| 100 | return MakeResult<size_t>(0); | 100 | return MakeResult<size_t>(0); |
| 101 | } | 101 | } |
| @@ -105,7 +105,7 @@ u64 RomFS_Storage::GetSize() const { | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | bool RomFS_Storage::SetSize(const u64 size) const { | 107 | bool RomFS_Storage::SetSize(const u64 size) const { |
| 108 | NGLOG_ERROR(Service_FS, "Attempted to set the size of an ROMFS file"); | 108 | LOG_ERROR(Service_FS, "Attempted to set the size of an ROMFS file"); |
| 109 | return false; | 109 | return false; |
| 110 | } | 110 | } |
| 111 | 111 | ||
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index c1be8fee4..d78baf9c3 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -28,7 +28,7 @@ ResultVal<std::unique_ptr<FileSystemBackend>> SaveData_Factory::Open(const Path& | |||
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | ResultCode SaveData_Factory::Format(const Path& path) { | 30 | ResultCode SaveData_Factory::Format(const Path& path) { |
| 31 | NGLOG_WARNING(Service_FS, "Format archive {}", GetName()); | 31 | LOG_WARNING(Service_FS, "Format archive {}", GetName()); |
| 32 | // Create the save data directory. | 32 | // Create the save data directory. |
| 33 | if (!FileUtil::CreateFullPath(GetFullPath())) { | 33 | if (!FileUtil::CreateFullPath(GetFullPath())) { |
| 34 | // TODO(Subv): Find the correct error code. | 34 | // TODO(Subv): Find the correct error code. |
| @@ -39,7 +39,7 @@ ResultCode SaveData_Factory::Format(const Path& path) { | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | ResultVal<ArchiveFormatInfo> SaveData_Factory::GetFormatInfo(const Path& path) const { | 41 | ResultVal<ArchiveFormatInfo> SaveData_Factory::GetFormatInfo(const Path& path) const { |
| 42 | NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | 42 | LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); |
| 43 | // TODO(bunnei): Find the right error code for this | 43 | // TODO(bunnei): Find the right error code for this |
| 44 | return ResultCode(-1); | 44 | return ResultCode(-1); |
| 45 | } | 45 | } |
diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp index 59ac3e0be..2e5ffb764 100644 --- a/src/core/file_sys/sdmc_factory.cpp +++ b/src/core/file_sys/sdmc_factory.cpp | |||
| @@ -25,13 +25,13 @@ ResultVal<std::unique_ptr<FileSystemBackend>> SDMC_Factory::Open(const Path& pat | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | ResultCode SDMC_Factory::Format(const Path& path) { | 27 | ResultCode SDMC_Factory::Format(const Path& path) { |
| 28 | NGLOG_ERROR(Service_FS, "Unimplemented Format archive {}", GetName()); | 28 | LOG_ERROR(Service_FS, "Unimplemented Format archive {}", GetName()); |
| 29 | // TODO(Subv): Find the right error code for this | 29 | // TODO(Subv): Find the right error code for this |
| 30 | return ResultCode(-1); | 30 | return ResultCode(-1); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | ResultVal<ArchiveFormatInfo> SDMC_Factory::GetFormatInfo(const Path& path) const { | 33 | ResultVal<ArchiveFormatInfo> SDMC_Factory::GetFormatInfo(const Path& path) const { |
| 34 | NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); | 34 | LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName()); |
| 35 | // TODO(bunnei): Find the right error code for this | 35 | // TODO(bunnei): Find the right error code for this |
| 36 | return ResultCode(-1); | 36 | return ResultCode(-1); |
| 37 | } | 37 | } |
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 79e52488f..39bdf4e21 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h | |||
| @@ -59,7 +59,7 @@ template <typename InputDeviceType> | |||
| 59 | void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDeviceType>> factory) { | 59 | void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDeviceType>> factory) { |
| 60 | auto pair = std::make_pair(name, std::move(factory)); | 60 | auto pair = std::make_pair(name, std::move(factory)); |
| 61 | if (!Impl::FactoryList<InputDeviceType>::list.insert(std::move(pair)).second) { | 61 | if (!Impl::FactoryList<InputDeviceType>::list.insert(std::move(pair)).second) { |
| 62 | NGLOG_ERROR(Input, "Factory '{}' already registered", name); | 62 | LOG_ERROR(Input, "Factory '{}' already registered", name); |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -71,7 +71,7 @@ void RegisterFactory(const std::string& name, std::shared_ptr<Factory<InputDevic | |||
| 71 | template <typename InputDeviceType> | 71 | template <typename InputDeviceType> |
| 72 | void UnregisterFactory(const std::string& name) { | 72 | void UnregisterFactory(const std::string& name) { |
| 73 | if (Impl::FactoryList<InputDeviceType>::list.erase(name) == 0) { | 73 | if (Impl::FactoryList<InputDeviceType>::list.erase(name) == 0) { |
| 74 | NGLOG_ERROR(Input, "Factory '{}' not registered", name); | 74 | LOG_ERROR(Input, "Factory '{}' not registered", name); |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -88,7 +88,7 @@ std::unique_ptr<InputDeviceType> CreateDevice(const std::string& params) { | |||
| 88 | const auto pair = factory_list.find(engine); | 88 | const auto pair = factory_list.find(engine); |
| 89 | if (pair == factory_list.end()) { | 89 | if (pair == factory_list.end()) { |
| 90 | if (engine != "null") { | 90 | if (engine != "null") { |
| 91 | NGLOG_ERROR(Input, "Unknown engine name: {}", engine); | 91 | LOG_ERROR(Input, "Unknown engine name: {}", engine); |
| 92 | } | 92 | } |
| 93 | return std::make_unique<InputDeviceType>(); | 93 | return std::make_unique<InputDeviceType>(); |
| 94 | } | 94 | } |
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 2603192fe..500734f2d 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp | |||
| @@ -232,7 +232,7 @@ static u8 HexCharToValue(u8 hex) { | |||
| 232 | return hex - 'A' + 0xA; | 232 | return hex - 'A' + 0xA; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | NGLOG_ERROR(Debug_GDBStub, "Invalid nibble: {} ({:02X})", hex, hex); | 235 | LOG_ERROR(Debug_GDBStub, "Invalid nibble: {} ({:02X})", hex, hex); |
| 236 | return 0; | 236 | return 0; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| @@ -372,7 +372,7 @@ static u8 ReadByte() { | |||
| 372 | u8 c; | 372 | u8 c; |
| 373 | size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); | 373 | size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); |
| 374 | if (received_size != 1) { | 374 | if (received_size != 1) { |
| 375 | NGLOG_ERROR(Debug_GDBStub, "recv failed: {}", received_size); | 375 | LOG_ERROR(Debug_GDBStub, "recv failed: {}", received_size); |
| 376 | Shutdown(); | 376 | Shutdown(); |
| 377 | } | 377 | } |
| 378 | 378 | ||
| @@ -413,7 +413,7 @@ static void RemoveBreakpoint(BreakpointType type, PAddr addr) { | |||
| 413 | 413 | ||
| 414 | auto bp = p.find(static_cast<u64>(addr)); | 414 | auto bp = p.find(static_cast<u64>(addr)); |
| 415 | if (bp != p.end()) { | 415 | if (bp != p.end()) { |
| 416 | NGLOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:016X} bytes at {:016X} of type {}", | 416 | LOG_DEBUG(Debug_GDBStub, "gdb: removed a breakpoint: {:016X} bytes at {:016X} of type {}", |
| 417 | bp->second.len, bp->second.addr, static_cast<int>(type)); | 417 | bp->second.len, bp->second.addr, static_cast<int>(type)); |
| 418 | p.erase(static_cast<u64>(addr)); | 418 | p.erase(static_cast<u64>(addr)); |
| 419 | } | 419 | } |
| @@ -459,7 +459,7 @@ bool CheckBreakpoint(PAddr addr, BreakpointType type) { | |||
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | if (bp->second.active && (addr >= bp->second.addr && addr < bp->second.addr + len)) { | 461 | if (bp->second.active && (addr >= bp->second.addr && addr < bp->second.addr + len)) { |
| 462 | NGLOG_DEBUG(Debug_GDBStub, | 462 | LOG_DEBUG(Debug_GDBStub, |
| 463 | "Found breakpoint type {} @ {:016X}, range: {:016X}" | 463 | "Found breakpoint type {} @ {:016X}, range: {:016X}" |
| 464 | " - {:016X} ({:X} bytes)", | 464 | " - {:016X} ({:X} bytes)", |
| 465 | static_cast<int>(type), addr, bp->second.addr, bp->second.addr + len, len); | 465 | static_cast<int>(type), addr, bp->second.addr, bp->second.addr + len, len); |
| @@ -478,7 +478,7 @@ bool CheckBreakpoint(PAddr addr, BreakpointType type) { | |||
| 478 | static void SendPacket(const char packet) { | 478 | static void SendPacket(const char packet) { |
| 479 | size_t sent_size = send(gdbserver_socket, &packet, 1, 0); | 479 | size_t sent_size = send(gdbserver_socket, &packet, 1, 0); |
| 480 | if (sent_size != 1) { | 480 | if (sent_size != 1) { |
| 481 | NGLOG_ERROR(Debug_GDBStub, "send failed"); | 481 | LOG_ERROR(Debug_GDBStub, "send failed"); |
| 482 | } | 482 | } |
| 483 | } | 483 | } |
| 484 | 484 | ||
| @@ -492,13 +492,13 @@ static void SendReply(const char* reply) { | |||
| 492 | return; | 492 | return; |
| 493 | } | 493 | } |
| 494 | 494 | ||
| 495 | NGLOG_DEBUG(Debug_GDBStub, "Reply: {}", reply); | 495 | LOG_DEBUG(Debug_GDBStub, "Reply: {}", reply); |
| 496 | 496 | ||
| 497 | memset(command_buffer, 0, sizeof(command_buffer)); | 497 | memset(command_buffer, 0, sizeof(command_buffer)); |
| 498 | 498 | ||
| 499 | command_length = static_cast<u32>(strlen(reply)); | 499 | command_length = static_cast<u32>(strlen(reply)); |
| 500 | if (command_length + 4 > sizeof(command_buffer)) { | 500 | if (command_length + 4 > sizeof(command_buffer)) { |
| 501 | NGLOG_ERROR(Debug_GDBStub, "command_buffer overflow in SendReply"); | 501 | LOG_ERROR(Debug_GDBStub, "command_buffer overflow in SendReply"); |
| 502 | return; | 502 | return; |
| 503 | } | 503 | } |
| 504 | 504 | ||
| @@ -515,7 +515,7 @@ static void SendReply(const char* reply) { | |||
| 515 | while (left > 0) { | 515 | while (left > 0) { |
| 516 | int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0); | 516 | int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0); |
| 517 | if (sent_size < 0) { | 517 | if (sent_size < 0) { |
| 518 | NGLOG_ERROR(Debug_GDBStub, "gdb: send failed"); | 518 | LOG_ERROR(Debug_GDBStub, "gdb: send failed"); |
| 519 | return Shutdown(); | 519 | return Shutdown(); |
| 520 | } | 520 | } |
| 521 | 521 | ||
| @@ -526,7 +526,7 @@ static void SendReply(const char* reply) { | |||
| 526 | 526 | ||
| 527 | /// Handle query command from gdb client. | 527 | /// Handle query command from gdb client. |
| 528 | static void HandleQuery() { | 528 | static void HandleQuery() { |
| 529 | NGLOG_DEBUG(Debug_GDBStub, "gdb: query '{}'", command_buffer + 1); | 529 | LOG_DEBUG(Debug_GDBStub, "gdb: query '{}'", command_buffer + 1); |
| 530 | 530 | ||
| 531 | const char* query = reinterpret_cast<const char*>(command_buffer + 1); | 531 | const char* query = reinterpret_cast<const char*>(command_buffer + 1); |
| 532 | 532 | ||
| @@ -634,18 +634,18 @@ static void ReadCommand() { | |||
| 634 | // ignore ack | 634 | // ignore ack |
| 635 | return; | 635 | return; |
| 636 | } else if (c == 0x03) { | 636 | } else if (c == 0x03) { |
| 637 | NGLOG_INFO(Debug_GDBStub, "gdb: found break command"); | 637 | LOG_INFO(Debug_GDBStub, "gdb: found break command"); |
| 638 | halt_loop = true; | 638 | halt_loop = true; |
| 639 | SendSignal(current_thread, SIGTRAP); | 639 | SendSignal(current_thread, SIGTRAP); |
| 640 | return; | 640 | return; |
| 641 | } else if (c != GDB_STUB_START) { | 641 | } else if (c != GDB_STUB_START) { |
| 642 | NGLOG_DEBUG(Debug_GDBStub, "gdb: read invalid byte {:02X}", c); | 642 | LOG_DEBUG(Debug_GDBStub, "gdb: read invalid byte {:02X}", c); |
| 643 | return; | 643 | return; |
| 644 | } | 644 | } |
| 645 | 645 | ||
| 646 | while ((c = ReadByte()) != GDB_STUB_END) { | 646 | while ((c = ReadByte()) != GDB_STUB_END) { |
| 647 | if (command_length >= sizeof(command_buffer)) { | 647 | if (command_length >= sizeof(command_buffer)) { |
| 648 | NGLOG_ERROR(Debug_GDBStub, "gdb: command_buffer overflow"); | 648 | LOG_ERROR(Debug_GDBStub, "gdb: command_buffer overflow"); |
| 649 | SendPacket(GDB_STUB_NACK); | 649 | SendPacket(GDB_STUB_NACK); |
| 650 | return; | 650 | return; |
| 651 | } | 651 | } |
| @@ -658,7 +658,7 @@ static void ReadCommand() { | |||
| 658 | u8 checksum_calculated = CalculateChecksum(command_buffer, command_length); | 658 | u8 checksum_calculated = CalculateChecksum(command_buffer, command_length); |
| 659 | 659 | ||
| 660 | if (checksum_received != checksum_calculated) { | 660 | if (checksum_received != checksum_calculated) { |
| 661 | NGLOG_ERROR( | 661 | LOG_ERROR( |
| 662 | Debug_GDBStub, | 662 | Debug_GDBStub, |
| 663 | "gdb: invalid checksum: calculated {:02X} and read {:02X} for ${}# (length: {})", | 663 | "gdb: invalid checksum: calculated {:02X} and read {:02X} for ${}# (length: {})", |
| 664 | checksum_calculated, checksum_received, command_buffer, command_length); | 664 | checksum_calculated, checksum_received, command_buffer, command_length); |
| @@ -688,7 +688,7 @@ static bool IsDataAvailable() { | |||
| 688 | t.tv_usec = 0; | 688 | t.tv_usec = 0; |
| 689 | 689 | ||
| 690 | if (select(gdbserver_socket + 1, &fd_socket, nullptr, nullptr, &t) < 0) { | 690 | if (select(gdbserver_socket + 1, &fd_socket, nullptr, nullptr, &t) < 0) { |
| 691 | NGLOG_ERROR(Debug_GDBStub, "select failed"); | 691 | LOG_ERROR(Debug_GDBStub, "select failed"); |
| 692 | return false; | 692 | return false; |
| 693 | } | 693 | } |
| 694 | 694 | ||
| @@ -801,7 +801,7 @@ static void ReadMemory() { | |||
| 801 | u64 len = | 801 | u64 len = |
| 802 | HexToLong(start_offset, static_cast<u64>((command_buffer + command_length) - start_offset)); | 802 | HexToLong(start_offset, static_cast<u64>((command_buffer + command_length) - start_offset)); |
| 803 | 803 | ||
| 804 | NGLOG_DEBUG(Debug_GDBStub, "gdb: addr: {:016X} len: {:016X}", addr, len); | 804 | LOG_DEBUG(Debug_GDBStub, "gdb: addr: {:016X} len: {:016X}", addr, len); |
| 805 | 805 | ||
| 806 | if (len * 2 > sizeof(reply)) { | 806 | if (len * 2 > sizeof(reply)) { |
| 807 | SendReply("E01"); | 807 | SendReply("E01"); |
| @@ -888,7 +888,7 @@ static bool CommitBreakpoint(BreakpointType type, PAddr addr, u64 len) { | |||
| 888 | breakpoint.len = len; | 888 | breakpoint.len = len; |
| 889 | p.insert({addr, breakpoint}); | 889 | p.insert({addr, breakpoint}); |
| 890 | 890 | ||
| 891 | NGLOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:016X} bytes at {:016X}", | 891 | LOG_DEBUG(Debug_GDBStub, "gdb: added {} breakpoint: {:016X} bytes at {:016X}", |
| 892 | static_cast<int>(type), breakpoint.len, breakpoint.addr); | 892 | static_cast<int>(type), breakpoint.len, breakpoint.addr); |
| 893 | 893 | ||
| 894 | return true; | 894 | return true; |
| @@ -996,7 +996,7 @@ void HandlePacket() { | |||
| 996 | return; | 996 | return; |
| 997 | } | 997 | } |
| 998 | 998 | ||
| 999 | NGLOG_DEBUG(Debug_GDBStub, "Packet: {}", command_buffer); | 999 | LOG_DEBUG(Debug_GDBStub, "Packet: {}", command_buffer); |
| 1000 | 1000 | ||
| 1001 | switch (command_buffer[0]) { | 1001 | switch (command_buffer[0]) { |
| 1002 | case 'q': | 1002 | case 'q': |
| @@ -1010,7 +1010,7 @@ void HandlePacket() { | |||
| 1010 | break; | 1010 | break; |
| 1011 | case 'k': | 1011 | case 'k': |
| 1012 | Shutdown(); | 1012 | Shutdown(); |
| 1013 | NGLOG_INFO(Debug_GDBStub, "killed by gdb"); | 1013 | LOG_INFO(Debug_GDBStub, "killed by gdb"); |
| 1014 | return; | 1014 | return; |
| 1015 | case 'g': | 1015 | case 'g': |
| 1016 | ReadRegisters(); | 1016 | ReadRegisters(); |
| @@ -1092,7 +1092,7 @@ static void Init(u16 port) { | |||
| 1092 | breakpoints_write.clear(); | 1092 | breakpoints_write.clear(); |
| 1093 | 1093 | ||
| 1094 | // Start gdb server | 1094 | // Start gdb server |
| 1095 | NGLOG_INFO(Debug_GDBStub, "Starting GDB server on port {}...", port); | 1095 | LOG_INFO(Debug_GDBStub, "Starting GDB server on port {}...", port); |
| 1096 | 1096 | ||
| 1097 | sockaddr_in saddr_server = {}; | 1097 | sockaddr_in saddr_server = {}; |
| 1098 | saddr_server.sin_family = AF_INET; | 1098 | saddr_server.sin_family = AF_INET; |
| @@ -1105,28 +1105,28 @@ static void Init(u16 port) { | |||
| 1105 | 1105 | ||
| 1106 | int tmpsock = static_cast<int>(socket(PF_INET, SOCK_STREAM, 0)); | 1106 | int tmpsock = static_cast<int>(socket(PF_INET, SOCK_STREAM, 0)); |
| 1107 | if (tmpsock == -1) { | 1107 | if (tmpsock == -1) { |
| 1108 | NGLOG_ERROR(Debug_GDBStub, "Failed to create gdb socket"); | 1108 | LOG_ERROR(Debug_GDBStub, "Failed to create gdb socket"); |
| 1109 | } | 1109 | } |
| 1110 | 1110 | ||
| 1111 | // Set socket to SO_REUSEADDR so it can always bind on the same port | 1111 | // Set socket to SO_REUSEADDR so it can always bind on the same port |
| 1112 | int reuse_enabled = 1; | 1112 | int reuse_enabled = 1; |
| 1113 | if (setsockopt(tmpsock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuse_enabled, | 1113 | if (setsockopt(tmpsock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuse_enabled, |
| 1114 | sizeof(reuse_enabled)) < 0) { | 1114 | sizeof(reuse_enabled)) < 0) { |
| 1115 | NGLOG_ERROR(Debug_GDBStub, "Failed to set gdb socket option"); | 1115 | LOG_ERROR(Debug_GDBStub, "Failed to set gdb socket option"); |
| 1116 | } | 1116 | } |
| 1117 | 1117 | ||
| 1118 | const sockaddr* server_addr = reinterpret_cast<const sockaddr*>(&saddr_server); | 1118 | const sockaddr* server_addr = reinterpret_cast<const sockaddr*>(&saddr_server); |
| 1119 | socklen_t server_addrlen = sizeof(saddr_server); | 1119 | socklen_t server_addrlen = sizeof(saddr_server); |
| 1120 | if (bind(tmpsock, server_addr, server_addrlen) < 0) { | 1120 | if (bind(tmpsock, server_addr, server_addrlen) < 0) { |
| 1121 | NGLOG_ERROR(Debug_GDBStub, "Failed to bind gdb socket"); | 1121 | LOG_ERROR(Debug_GDBStub, "Failed to bind gdb socket"); |
| 1122 | } | 1122 | } |
| 1123 | 1123 | ||
| 1124 | if (listen(tmpsock, 1) < 0) { | 1124 | if (listen(tmpsock, 1) < 0) { |
| 1125 | NGLOG_ERROR(Debug_GDBStub, "Failed to listen to gdb socket"); | 1125 | LOG_ERROR(Debug_GDBStub, "Failed to listen to gdb socket"); |
| 1126 | } | 1126 | } |
| 1127 | 1127 | ||
| 1128 | // Wait for gdb to connect | 1128 | // Wait for gdb to connect |
| 1129 | NGLOG_INFO(Debug_GDBStub, "Waiting for gdb to connect..."); | 1129 | LOG_INFO(Debug_GDBStub, "Waiting for gdb to connect..."); |
| 1130 | sockaddr_in saddr_client; | 1130 | sockaddr_in saddr_client; |
| 1131 | sockaddr* client_addr = reinterpret_cast<sockaddr*>(&saddr_client); | 1131 | sockaddr* client_addr = reinterpret_cast<sockaddr*>(&saddr_client); |
| 1132 | socklen_t client_addrlen = sizeof(saddr_client); | 1132 | socklen_t client_addrlen = sizeof(saddr_client); |
| @@ -1137,9 +1137,9 @@ static void Init(u16 port) { | |||
| 1137 | halt_loop = false; | 1137 | halt_loop = false; |
| 1138 | step_loop = false; | 1138 | step_loop = false; |
| 1139 | 1139 | ||
| 1140 | NGLOG_ERROR(Debug_GDBStub, "Failed to accept gdb client"); | 1140 | LOG_ERROR(Debug_GDBStub, "Failed to accept gdb client"); |
| 1141 | } else { | 1141 | } else { |
| 1142 | NGLOG_INFO(Debug_GDBStub, "Client connected."); | 1142 | LOG_INFO(Debug_GDBStub, "Client connected."); |
| 1143 | saddr_client.sin_addr.s_addr = ntohl(saddr_client.sin_addr.s_addr); | 1143 | saddr_client.sin_addr.s_addr = ntohl(saddr_client.sin_addr.s_addr); |
| 1144 | } | 1144 | } |
| 1145 | 1145 | ||
| @@ -1158,7 +1158,7 @@ void Shutdown() { | |||
| 1158 | return; | 1158 | return; |
| 1159 | } | 1159 | } |
| 1160 | 1160 | ||
| 1161 | NGLOG_INFO(Debug_GDBStub, "Stopping GDB ..."); | 1161 | LOG_INFO(Debug_GDBStub, "Stopping GDB ..."); |
| 1162 | if (gdbserver_socket != -1) { | 1162 | if (gdbserver_socket != -1) { |
| 1163 | shutdown(gdbserver_socket, SHUT_RDWR); | 1163 | shutdown(gdbserver_socket, SHUT_RDWR); |
| 1164 | gdbserver_socket = -1; | 1164 | gdbserver_socket = -1; |
| @@ -1168,7 +1168,7 @@ void Shutdown() { | |||
| 1168 | WSACleanup(); | 1168 | WSACleanup(); |
| 1169 | #endif | 1169 | #endif |
| 1170 | 1170 | ||
| 1171 | NGLOG_INFO(Debug_GDBStub, "GDB stopped."); | 1171 | LOG_INFO(Debug_GDBStub, "GDB stopped."); |
| 1172 | } | 1172 | } |
| 1173 | 1173 | ||
| 1174 | bool IsServerEnabled() { | 1174 | bool IsServerEnabled() { |
diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index f7a9920d8..7dd67f80f 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp | |||
| @@ -26,7 +26,7 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) { | |||
| 26 | 26 | ||
| 27 | u16 slot = next_free_slot; | 27 | u16 slot = next_free_slot; |
| 28 | if (slot >= generations.size()) { | 28 | if (slot >= generations.size()) { |
| 29 | NGLOG_ERROR(Kernel, "Unable to allocate Handle, too many slots in use."); | 29 | LOG_ERROR(Kernel, "Unable to allocate Handle, too many slots in use."); |
| 30 | return ERR_OUT_OF_HANDLES; | 30 | return ERR_OUT_OF_HANDLES; |
| 31 | } | 31 | } |
| 32 | next_free_slot = generations[slot]; | 32 | next_free_slot = generations[slot]; |
| @@ -48,7 +48,7 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) { | |||
| 48 | ResultVal<Handle> HandleTable::Duplicate(Handle handle) { | 48 | ResultVal<Handle> HandleTable::Duplicate(Handle handle) { |
| 49 | SharedPtr<Object> object = GetGeneric(handle); | 49 | SharedPtr<Object> object = GetGeneric(handle); |
| 50 | if (object == nullptr) { | 50 | if (object == nullptr) { |
| 51 | NGLOG_ERROR(Kernel, "Tried to duplicate invalid handle: {:08X}", handle); | 51 | LOG_ERROR(Kernel, "Tried to duplicate invalid handle: {:08X}", handle); |
| 52 | return ERR_INVALID_HANDLE; | 52 | return ERR_INVALID_HANDLE; |
| 53 | } | 53 | } |
| 54 | return Create(std::move(object)); | 54 | return Create(std::move(object)); |
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index b0d83f401..5ac3227d1 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -120,7 +120,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { | |||
| 120 | std::make_shared<IPC::DomainMessageHeader>(rp.PopRaw<IPC::DomainMessageHeader>()); | 120 | std::make_shared<IPC::DomainMessageHeader>(rp.PopRaw<IPC::DomainMessageHeader>()); |
| 121 | } else { | 121 | } else { |
| 122 | if (Session()->IsDomain()) | 122 | if (Session()->IsDomain()) |
| 123 | NGLOG_WARNING(IPC, "Domain request has no DomainMessageHeader!"); | 123 | LOG_WARNING(IPC, "Domain request has no DomainMessageHeader!"); |
| 124 | } | 124 | } |
| 125 | } | 125 | } |
| 126 | 126 | ||
| @@ -272,14 +272,14 @@ std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const { | |||
| 272 | 272 | ||
| 273 | size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size, int buffer_index) const { | 273 | size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size, int buffer_index) const { |
| 274 | if (size == 0) { | 274 | if (size == 0) { |
| 275 | NGLOG_WARNING(Core, "skip empty buffer write"); | 275 | LOG_WARNING(Core, "skip empty buffer write"); |
| 276 | return 0; | 276 | return 0; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[buffer_index].Size()}; | 279 | const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[buffer_index].Size()}; |
| 280 | const size_t buffer_size{GetWriteBufferSize(buffer_index)}; | 280 | const size_t buffer_size{GetWriteBufferSize(buffer_index)}; |
| 281 | if (size > buffer_size) { | 281 | if (size > buffer_size) { |
| 282 | NGLOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size, | 282 | LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size, |
| 283 | buffer_size); | 283 | buffer_size); |
| 284 | size = buffer_size; // TODO(bunnei): This needs to be HW tested | 284 | size = buffer_size; // TODO(bunnei): This needs to be HW tested |
| 285 | } | 285 | } |
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 651d932d3..0c0506085 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -54,7 +54,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { | |||
| 54 | continue; | 54 | continue; |
| 55 | } else if ((type & 0xF00) == 0xE00) { // 0x0FFF | 55 | } else if ((type & 0xF00) == 0xE00) { // 0x0FFF |
| 56 | // Allowed interrupts list | 56 | // Allowed interrupts list |
| 57 | NGLOG_WARNING(Loader, "ExHeader allowed interrupts list ignored"); | 57 | LOG_WARNING(Loader, "ExHeader allowed interrupts list ignored"); |
| 58 | } else if ((type & 0xF80) == 0xF00) { // 0x07FF | 58 | } else if ((type & 0xF80) == 0xF00) { // 0x07FF |
| 59 | // Allowed syscalls mask | 59 | // Allowed syscalls mask |
| 60 | unsigned int index = ((descriptor >> 24) & 7) * 24; | 60 | unsigned int index = ((descriptor >> 24) & 7) * 24; |
| @@ -74,7 +74,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { | |||
| 74 | } else if ((type & 0xFFE) == 0xFF8) { // 0x001F | 74 | } else if ((type & 0xFFE) == 0xFF8) { // 0x001F |
| 75 | // Mapped memory range | 75 | // Mapped memory range |
| 76 | if (i + 1 >= len || ((kernel_caps[i + 1] >> 20) & 0xFFE) != 0xFF8) { | 76 | if (i + 1 >= len || ((kernel_caps[i + 1] >> 20) & 0xFFE) != 0xFF8) { |
| 77 | NGLOG_WARNING(Loader, "Incomplete exheader memory range descriptor ignored."); | 77 | LOG_WARNING(Loader, "Incomplete exheader memory range descriptor ignored."); |
| 78 | continue; | 78 | continue; |
| 79 | } | 79 | } |
| 80 | u32 end_desc = kernel_caps[i + 1]; | 80 | u32 end_desc = kernel_caps[i + 1]; |
| @@ -109,9 +109,9 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { | |||
| 109 | 109 | ||
| 110 | int minor = kernel_version & 0xFF; | 110 | int minor = kernel_version & 0xFF; |
| 111 | int major = (kernel_version >> 8) & 0xFF; | 111 | int major = (kernel_version >> 8) & 0xFF; |
| 112 | NGLOG_INFO(Loader, "ExHeader kernel version: {}.{}", major, minor); | 112 | LOG_INFO(Loader, "ExHeader kernel version: {}.{}", major, minor); |
| 113 | } else { | 113 | } else { |
| 114 | NGLOG_ERROR(Loader, "Unhandled kernel caps descriptor: 0x{:08X}", descriptor); | 114 | LOG_ERROR(Loader, "Unhandled kernel caps descriptor: 0x{:08X}", descriptor); |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | } | 117 | } |
diff --git a/src/core/hle/kernel/resource_limit.cpp b/src/core/hle/kernel/resource_limit.cpp index 0ef5fc57d..17a3e8a74 100644 --- a/src/core/hle/kernel/resource_limit.cpp +++ b/src/core/hle/kernel/resource_limit.cpp | |||
| @@ -29,7 +29,7 @@ SharedPtr<ResourceLimit> ResourceLimit::GetForCategory(ResourceLimitCategory cat | |||
| 29 | case ResourceLimitCategory::OTHER: | 29 | case ResourceLimitCategory::OTHER: |
| 30 | return resource_limits[static_cast<u8>(category)]; | 30 | return resource_limits[static_cast<u8>(category)]; |
| 31 | default: | 31 | default: |
| 32 | NGLOG_CRITICAL(Kernel, "Unknown resource limit category"); | 32 | LOG_CRITICAL(Kernel, "Unknown resource limit category"); |
| 33 | UNREACHABLE(); | 33 | UNREACHABLE(); |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| @@ -55,7 +55,7 @@ s32 ResourceLimit::GetCurrentResourceValue(ResourceType resource) const { | |||
| 55 | case ResourceType::CPUTime: | 55 | case ResourceType::CPUTime: |
| 56 | return current_cpu_time; | 56 | return current_cpu_time; |
| 57 | default: | 57 | default: |
| 58 | NGLOG_ERROR(Kernel, "Unknown resource type={:08X}", static_cast<u32>(resource)); | 58 | LOG_ERROR(Kernel, "Unknown resource type={:08X}", static_cast<u32>(resource)); |
| 59 | UNIMPLEMENTED(); | 59 | UNIMPLEMENTED(); |
| 60 | return 0; | 60 | return 0; |
| 61 | } | 61 | } |
| @@ -84,7 +84,7 @@ u32 ResourceLimit::GetMaxResourceValue(ResourceType resource) const { | |||
| 84 | case ResourceType::CPUTime: | 84 | case ResourceType::CPUTime: |
| 85 | return max_cpu_time; | 85 | return max_cpu_time; |
| 86 | default: | 86 | default: |
| 87 | NGLOG_ERROR(Kernel, "Unknown resource type={:08X}", static_cast<u32>(resource)); | 87 | LOG_ERROR(Kernel, "Unknown resource type={:08X}", static_cast<u32>(resource)); |
| 88 | UNIMPLEMENTED(); | 88 | UNIMPLEMENTED(); |
| 89 | return 0; | 89 | return 0; |
| 90 | } | 90 | } |
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 9cb9e0e5c..11c2cb69e 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -99,11 +99,11 @@ void Scheduler::Reschedule() { | |||
| 99 | Thread* next = PopNextReadyThread(); | 99 | Thread* next = PopNextReadyThread(); |
| 100 | 100 | ||
| 101 | if (cur && next) { | 101 | if (cur && next) { |
| 102 | NGLOG_TRACE(Kernel, "context switch {} -> {}", cur->GetObjectId(), next->GetObjectId()); | 102 | LOG_TRACE(Kernel, "context switch {} -> {}", cur->GetObjectId(), next->GetObjectId()); |
| 103 | } else if (cur) { | 103 | } else if (cur) { |
| 104 | NGLOG_TRACE(Kernel, "context switch {} -> idle", cur->GetObjectId()); | 104 | LOG_TRACE(Kernel, "context switch {} -> idle", cur->GetObjectId()); |
| 105 | } else if (next) { | 105 | } else if (next) { |
| 106 | NGLOG_TRACE(Kernel, "context switch idle -> {}", next->GetObjectId()); | 106 | LOG_TRACE(Kernel, "context switch idle -> {}", next->GetObjectId()); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | SwitchContext(next); | 109 | SwitchContext(next); |
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index bf812c543..29fecef20 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp | |||
| @@ -71,7 +71,7 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con | |||
| 71 | return domain_request_handlers[object_id - 1]->HandleSyncRequest(context); | 71 | return domain_request_handlers[object_id - 1]->HandleSyncRequest(context); |
| 72 | 72 | ||
| 73 | case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: { | 73 | case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: { |
| 74 | NGLOG_DEBUG(IPC, "CloseVirtualHandle, object_id=0x{:08X}", object_id); | 74 | LOG_DEBUG(IPC, "CloseVirtualHandle, object_id=0x{:08X}", object_id); |
| 75 | 75 | ||
| 76 | domain_request_handlers[object_id - 1] = nullptr; | 76 | domain_request_handlers[object_id - 1] = nullptr; |
| 77 | 77 | ||
| @@ -81,7 +81,7 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con | |||
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | NGLOG_CRITICAL(IPC, "Unknown domain command={}", | 84 | LOG_CRITICAL(IPC, "Unknown domain command={}", |
| 85 | static_cast<int>(domain_message_header->command.Value())); | 85 | static_cast<int>(domain_message_header->command.Value())); |
| 86 | ASSERT(false); | 86 | ASSERT(false); |
| 87 | } | 87 | } |
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index ac4921298..80fa81abd 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -107,7 +107,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 107 | 107 | ||
| 108 | // Error out if the requested permissions don't match what the creator process allows. | 108 | // Error out if the requested permissions don't match what the creator process allows. |
| 109 | if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) { | 109 | if (static_cast<u32>(permissions) & ~static_cast<u32>(own_other_permissions)) { |
| 110 | NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{:X} name={}, permissions don't match", | 110 | LOG_ERROR(Kernel, "cannot map id={}, address=0x{:X} name={}, permissions don't match", |
| 111 | GetObjectId(), address, name); | 111 | GetObjectId(), address, name); |
| 112 | return ERR_INVALID_COMBINATION; | 112 | return ERR_INVALID_COMBINATION; |
| 113 | } | 113 | } |
| @@ -115,7 +115,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 115 | // Error out if the provided permissions are not compatible with what the creator process needs. | 115 | // Error out if the provided permissions are not compatible with what the creator process needs. |
| 116 | if (other_permissions != MemoryPermission::DontCare && | 116 | if (other_permissions != MemoryPermission::DontCare && |
| 117 | static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) { | 117 | static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) { |
| 118 | NGLOG_ERROR(Kernel, "cannot map id={}, address=0x{:X} name={}, permissions don't match", | 118 | LOG_ERROR(Kernel, "cannot map id={}, address=0x{:X} name={}, permissions don't match", |
| 119 | GetObjectId(), address, name); | 119 | GetObjectId(), address, name); |
| 120 | return ERR_WRONG_PERMISSION; | 120 | return ERR_WRONG_PERMISSION; |
| 121 | } | 121 | } |
| @@ -131,7 +131,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 131 | auto result = target_process->vm_manager.MapMemoryBlock( | 131 | auto result = target_process->vm_manager.MapMemoryBlock( |
| 132 | target_address, backing_block, backing_block_offset, size, MemoryState::Shared); | 132 | target_address, backing_block, backing_block_offset, size, MemoryState::Shared); |
| 133 | if (result.Failed()) { | 133 | if (result.Failed()) { |
| 134 | NGLOG_ERROR( | 134 | LOG_ERROR( |
| 135 | Kernel, | 135 | Kernel, |
| 136 | "cannot map id={}, target_address=0x{:X} name={}, error mapping to virtual memory", | 136 | "cannot map id={}, target_address=0x{:X} name={}, error mapping to virtual memory", |
| 137 | GetObjectId(), target_address, name); | 137 | GetObjectId(), target_address, name); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 1a36e0d02..843fffd7e 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -32,7 +32,7 @@ namespace Kernel { | |||
| 32 | 32 | ||
| 33 | /// Set the process heap to a given Size. It can both extend and shrink the heap. | 33 | /// Set the process heap to a given Size. It can both extend and shrink the heap. |
| 34 | static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { | 34 | static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { |
| 35 | NGLOG_TRACE(Kernel_SVC, "called, heap_size=0x{:X}", heap_size); | 35 | LOG_TRACE(Kernel_SVC, "called, heap_size=0x{:X}", heap_size); |
| 36 | auto& process = *Core::CurrentProcess(); | 36 | auto& process = *Core::CurrentProcess(); |
| 37 | CASCADE_RESULT(*heap_addr, | 37 | CASCADE_RESULT(*heap_addr, |
| 38 | process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite)); | 38 | process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite)); |
| @@ -40,20 +40,20 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { | 42 | static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { |
| 43 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}", addr); | 43 | LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}", addr); |
| 44 | return RESULT_SUCCESS; | 44 | return RESULT_SUCCESS; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | /// Maps a memory range into a different range. | 47 | /// Maps a memory range into a different range. |
| 48 | static ResultCode MapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { | 48 | static ResultCode MapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { |
| 49 | NGLOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, | 49 | LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, |
| 50 | src_addr, size); | 50 | src_addr, size); |
| 51 | return Core::CurrentProcess()->MirrorMemory(dst_addr, src_addr, size); | 51 | return Core::CurrentProcess()->MirrorMemory(dst_addr, src_addr, size); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | /// Unmaps a region that was previously mapped with svcMapMemory | 54 | /// Unmaps a region that was previously mapped with svcMapMemory |
| 55 | static ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { | 55 | static ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { |
| 56 | NGLOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, | 56 | LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, |
| 57 | src_addr, size); | 57 | src_addr, size); |
| 58 | return Core::CurrentProcess()->UnmapMemory(dst_addr, src_addr, size); | 58 | return Core::CurrentProcess()->UnmapMemory(dst_addr, src_addr, size); |
| 59 | } | 59 | } |
| @@ -69,11 +69,11 @@ static ResultCode ConnectToNamedPort(Handle* out_handle, VAddr port_name_address | |||
| 69 | if (port_name.size() > PortNameMaxLength) | 69 | if (port_name.size() > PortNameMaxLength) |
| 70 | return ERR_PORT_NAME_TOO_LONG; | 70 | return ERR_PORT_NAME_TOO_LONG; |
| 71 | 71 | ||
| 72 | NGLOG_TRACE(Kernel_SVC, "called port_name={}", port_name); | 72 | LOG_TRACE(Kernel_SVC, "called port_name={}", port_name); |
| 73 | 73 | ||
| 74 | auto it = Service::g_kernel_named_ports.find(port_name); | 74 | auto it = Service::g_kernel_named_ports.find(port_name); |
| 75 | if (it == Service::g_kernel_named_ports.end()) { | 75 | if (it == Service::g_kernel_named_ports.end()) { |
| 76 | NGLOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name); | 76 | LOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name); |
| 77 | return ERR_NOT_FOUND; | 77 | return ERR_NOT_FOUND; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| @@ -91,11 +91,11 @@ static ResultCode ConnectToNamedPort(Handle* out_handle, VAddr port_name_address | |||
| 91 | static ResultCode SendSyncRequest(Handle handle) { | 91 | static ResultCode SendSyncRequest(Handle handle) { |
| 92 | SharedPtr<ClientSession> session = g_handle_table.Get<ClientSession>(handle); | 92 | SharedPtr<ClientSession> session = g_handle_table.Get<ClientSession>(handle); |
| 93 | if (!session) { | 93 | if (!session) { |
| 94 | NGLOG_ERROR(Kernel_SVC, "called with invalid handle=0x{:08X}", handle); | 94 | LOG_ERROR(Kernel_SVC, "called with invalid handle=0x{:08X}", handle); |
| 95 | return ERR_INVALID_HANDLE; | 95 | return ERR_INVALID_HANDLE; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | NGLOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName()); | 98 | LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName()); |
| 99 | 99 | ||
| 100 | Core::System::GetInstance().PrepareReschedule(); | 100 | Core::System::GetInstance().PrepareReschedule(); |
| 101 | 101 | ||
| @@ -106,7 +106,7 @@ static ResultCode SendSyncRequest(Handle handle) { | |||
| 106 | 106 | ||
| 107 | /// Get the ID for the specified thread. | 107 | /// Get the ID for the specified thread. |
| 108 | static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) { | 108 | static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) { |
| 109 | NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle); | 109 | LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle); |
| 110 | 110 | ||
| 111 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | 111 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| 112 | if (!thread) { | 112 | if (!thread) { |
| @@ -119,7 +119,7 @@ static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) { | |||
| 119 | 119 | ||
| 120 | /// Get the ID of the specified process | 120 | /// Get the ID of the specified process |
| 121 | static ResultCode GetProcessId(u32* process_id, Handle process_handle) { | 121 | static ResultCode GetProcessId(u32* process_id, Handle process_handle) { |
| 122 | NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle); | 122 | LOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle); |
| 123 | 123 | ||
| 124 | const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle); | 124 | const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle); |
| 125 | if (!process) { | 125 | if (!process) { |
| @@ -149,7 +149,7 @@ static bool DefaultThreadWakeupCallback(ThreadWakeupReason reason, SharedPtr<Thr | |||
| 149 | /// Wait for the given handles to synchronize, timeout after the specified nanoseconds | 149 | /// Wait for the given handles to synchronize, timeout after the specified nanoseconds |
| 150 | static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 handle_count, | 150 | static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 handle_count, |
| 151 | s64 nano_seconds) { | 151 | s64 nano_seconds) { |
| 152 | NGLOG_TRACE(Kernel_SVC, "called handles_address=0x{:X}, handle_count={}, nano_seconds={}", | 152 | LOG_TRACE(Kernel_SVC, "called handles_address=0x{:X}, handle_count={}, nano_seconds={}", |
| 153 | handles_address, handle_count, nano_seconds); | 153 | handles_address, handle_count, nano_seconds); |
| 154 | 154 | ||
| 155 | if (!Memory::IsValidVirtualAddress(handles_address)) | 155 | if (!Memory::IsValidVirtualAddress(handles_address)) |
| @@ -210,7 +210,7 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 | |||
| 210 | 210 | ||
| 211 | /// Resumes a thread waiting on WaitSynchronization | 211 | /// Resumes a thread waiting on WaitSynchronization |
| 212 | static ResultCode CancelSynchronization(Handle thread_handle) { | 212 | static ResultCode CancelSynchronization(Handle thread_handle) { |
| 213 | NGLOG_TRACE(Kernel_SVC, "called thread=0x{:X}", thread_handle); | 213 | LOG_TRACE(Kernel_SVC, "called thread=0x{:X}", thread_handle); |
| 214 | 214 | ||
| 215 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | 215 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| 216 | if (!thread) { | 216 | if (!thread) { |
| @@ -227,7 +227,7 @@ static ResultCode CancelSynchronization(Handle thread_handle) { | |||
| 227 | /// Attempts to locks a mutex, creating it if it does not already exist | 227 | /// Attempts to locks a mutex, creating it if it does not already exist |
| 228 | static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, | 228 | static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, |
| 229 | Handle requesting_thread_handle) { | 229 | Handle requesting_thread_handle) { |
| 230 | NGLOG_TRACE(Kernel_SVC, | 230 | LOG_TRACE(Kernel_SVC, |
| 231 | "called holding_thread_handle=0x{:08X}, mutex_addr=0x{:X}, " | 231 | "called holding_thread_handle=0x{:08X}, mutex_addr=0x{:X}, " |
| 232 | "requesting_current_thread_handle=0x{:08X}", | 232 | "requesting_current_thread_handle=0x{:08X}", |
| 233 | holding_thread_handle, mutex_addr, requesting_thread_handle); | 233 | holding_thread_handle, mutex_addr, requesting_thread_handle); |
| @@ -237,14 +237,14 @@ static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, | |||
| 237 | 237 | ||
| 238 | /// Unlock a mutex | 238 | /// Unlock a mutex |
| 239 | static ResultCode ArbitrateUnlock(VAddr mutex_addr) { | 239 | static ResultCode ArbitrateUnlock(VAddr mutex_addr) { |
| 240 | NGLOG_TRACE(Kernel_SVC, "called mutex_addr=0x{:X}", mutex_addr); | 240 | LOG_TRACE(Kernel_SVC, "called mutex_addr=0x{:X}", mutex_addr); |
| 241 | 241 | ||
| 242 | return Mutex::Release(mutex_addr); | 242 | return Mutex::Release(mutex_addr); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | /// Break program execution | 245 | /// Break program execution |
| 246 | static void Break(u64 unk_0, u64 unk_1, u64 unk_2) { | 246 | static void Break(u64 unk_0, u64 unk_1, u64 unk_2) { |
| 247 | NGLOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!"); | 247 | LOG_CRITICAL(Debug_Emulated, "Emulated program broke execution!"); |
| 248 | ASSERT(false); | 248 | ASSERT(false); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| @@ -252,12 +252,12 @@ static void Break(u64 unk_0, u64 unk_1, u64 unk_2) { | |||
| 252 | static void OutputDebugString(VAddr address, s32 len) { | 252 | static void OutputDebugString(VAddr address, s32 len) { |
| 253 | std::string str(len, '\0'); | 253 | std::string str(len, '\0'); |
| 254 | Memory::ReadBlock(address, str.data(), str.size()); | 254 | Memory::ReadBlock(address, str.data(), str.size()); |
| 255 | NGLOG_DEBUG(Debug_Emulated, "{}", str); | 255 | LOG_DEBUG(Debug_Emulated, "{}", str); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | /// Gets system/memory information for the current process | 258 | /// Gets system/memory information for the current process |
| 259 | static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) { | 259 | static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) { |
| 260 | NGLOG_TRACE(Kernel_SVC, "called info_id=0x{:X}, info_sub_id=0x{:X}, handle=0x{:08X}", info_id, | 260 | LOG_TRACE(Kernel_SVC, "called info_id=0x{:X}, info_sub_id=0x{:X}, handle=0x{:08X}", info_id, |
| 261 | info_sub_id, handle); | 261 | info_sub_id, handle); |
| 262 | 262 | ||
| 263 | auto& vm_manager = Core::CurrentProcess()->vm_manager; | 263 | auto& vm_manager = Core::CurrentProcess()->vm_manager; |
| @@ -309,16 +309,16 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) | |||
| 309 | *result = Core::CurrentProcess()->is_virtual_address_memory_enabled; | 309 | *result = Core::CurrentProcess()->is_virtual_address_memory_enabled; |
| 310 | break; | 310 | break; |
| 311 | case GetInfoType::TitleId: | 311 | case GetInfoType::TitleId: |
| 312 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query titleid, returned 0"); | 312 | LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query titleid, returned 0"); |
| 313 | *result = 0; | 313 | *result = 0; |
| 314 | break; | 314 | break; |
| 315 | case GetInfoType::PrivilegedProcessId: | 315 | case GetInfoType::PrivilegedProcessId: |
| 316 | NGLOG_WARNING(Kernel_SVC, | 316 | LOG_WARNING(Kernel_SVC, |
| 317 | "(STUBBED) Attempted to query privileged process id bounds, returned 0"); | 317 | "(STUBBED) Attempted to query privileged process id bounds, returned 0"); |
| 318 | *result = 0; | 318 | *result = 0; |
| 319 | break; | 319 | break; |
| 320 | case GetInfoType::UserExceptionContextAddr: | 320 | case GetInfoType::UserExceptionContextAddr: |
| 321 | NGLOG_WARNING(Kernel_SVC, | 321 | LOG_WARNING(Kernel_SVC, |
| 322 | "(STUBBED) Attempted to query user exception context address, returned 0"); | 322 | "(STUBBED) Attempted to query user exception context address, returned 0"); |
| 323 | *result = 0; | 323 | *result = 0; |
| 324 | break; | 324 | break; |
| @@ -331,14 +331,14 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) | |||
| 331 | 331 | ||
| 332 | /// Sets the thread activity | 332 | /// Sets the thread activity |
| 333 | static ResultCode SetThreadActivity(Handle handle, u32 unknown) { | 333 | static ResultCode SetThreadActivity(Handle handle, u32 unknown) { |
| 334 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, unknown=0x{:08X}", handle, | 334 | LOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, unknown=0x{:08X}", handle, |
| 335 | unknown); | 335 | unknown); |
| 336 | return RESULT_SUCCESS; | 336 | return RESULT_SUCCESS; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | /// Gets the thread context | 339 | /// Gets the thread context |
| 340 | static ResultCode GetThreadContext(Handle handle, VAddr addr) { | 340 | static ResultCode GetThreadContext(Handle handle, VAddr addr) { |
| 341 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, addr=0x{:X}", handle, addr); | 341 | LOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, addr=0x{:X}", handle, addr); |
| 342 | return RESULT_SUCCESS; | 342 | return RESULT_SUCCESS; |
| 343 | } | 343 | } |
| 344 | 344 | ||
| @@ -377,13 +377,13 @@ static ResultCode SetThreadPriority(Handle handle, u32 priority) { | |||
| 377 | 377 | ||
| 378 | /// Get which CPU core is executing the current thread | 378 | /// Get which CPU core is executing the current thread |
| 379 | static u32 GetCurrentProcessorNumber() { | 379 | static u32 GetCurrentProcessorNumber() { |
| 380 | NGLOG_TRACE(Kernel_SVC, "called"); | 380 | LOG_TRACE(Kernel_SVC, "called"); |
| 381 | return GetCurrentThread()->processor_id; | 381 | return GetCurrentThread()->processor_id; |
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size, | 384 | static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size, |
| 385 | u32 permissions) { | 385 | u32 permissions) { |
| 386 | NGLOG_TRACE( | 386 | LOG_TRACE( |
| 387 | Kernel_SVC, | 387 | Kernel_SVC, |
| 388 | "called, shared_memory_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}", | 388 | "called, shared_memory_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}", |
| 389 | shared_memory_handle, addr, size, permissions); | 389 | shared_memory_handle, addr, size, permissions); |
| @@ -406,14 +406,14 @@ static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 s | |||
| 406 | return shared_memory->Map(Core::CurrentProcess().get(), addr, permissions_type, | 406 | return shared_memory->Map(Core::CurrentProcess().get(), addr, permissions_type, |
| 407 | MemoryPermission::DontCare); | 407 | MemoryPermission::DontCare); |
| 408 | default: | 408 | default: |
| 409 | NGLOG_ERROR(Kernel_SVC, "unknown permissions=0x{:08X}", permissions); | 409 | LOG_ERROR(Kernel_SVC, "unknown permissions=0x{:08X}", permissions); |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | return RESULT_SUCCESS; | 412 | return RESULT_SUCCESS; |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) { | 415 | static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) { |
| 416 | NGLOG_WARNING(Kernel_SVC, "called, shared_memory_handle=0x{:08X}, addr=0x{:X}, size=0x{:X}", | 416 | LOG_WARNING(Kernel_SVC, "called, shared_memory_handle=0x{:08X}, addr=0x{:X}, size=0x{:X}", |
| 417 | shared_memory_handle, addr, size); | 417 | shared_memory_handle, addr, size); |
| 418 | 418 | ||
| 419 | SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle); | 419 | SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle); |
| @@ -442,19 +442,19 @@ static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_i | |||
| 442 | memory_info->type = static_cast<u32>(vma->second.meminfo_state); | 442 | memory_info->type = static_cast<u32>(vma->second.meminfo_state); |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X} addr={:X}", process_handle, addr); | 445 | LOG_TRACE(Kernel_SVC, "called process=0x{:08X} addr={:X}", process_handle, addr); |
| 446 | return RESULT_SUCCESS; | 446 | return RESULT_SUCCESS; |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | /// Query memory | 449 | /// Query memory |
| 450 | static ResultCode QueryMemory(MemoryInfo* memory_info, PageInfo* page_info, VAddr addr) { | 450 | static ResultCode QueryMemory(MemoryInfo* memory_info, PageInfo* page_info, VAddr addr) { |
| 451 | NGLOG_TRACE(Kernel_SVC, "called, addr={:X}", addr); | 451 | LOG_TRACE(Kernel_SVC, "called, addr={:X}", addr); |
| 452 | return QueryProcessMemory(memory_info, page_info, CurrentProcess, addr); | 452 | return QueryProcessMemory(memory_info, page_info, CurrentProcess, addr); |
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | /// Exits the current process | 455 | /// Exits the current process |
| 456 | static void ExitProcess() { | 456 | static void ExitProcess() { |
| 457 | NGLOG_INFO(Kernel_SVC, "Process {} exiting", Core::CurrentProcess()->process_id); | 457 | LOG_INFO(Kernel_SVC, "Process {} exiting", Core::CurrentProcess()->process_id); |
| 458 | 458 | ||
| 459 | ASSERT_MSG(Core::CurrentProcess()->status == ProcessStatus::Running, | 459 | ASSERT_MSG(Core::CurrentProcess()->status == ProcessStatus::Running, |
| 460 | "Process has already exited"); | 460 | "Process has already exited"); |
| @@ -530,7 +530,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 530 | Core::System::GetInstance().PrepareReschedule(); | 530 | Core::System::GetInstance().PrepareReschedule(); |
| 531 | Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule(); | 531 | Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule(); |
| 532 | 532 | ||
| 533 | NGLOG_TRACE(Kernel_SVC, | 533 | LOG_TRACE(Kernel_SVC, |
| 534 | "called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, " | 534 | "called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, " |
| 535 | "threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}", | 535 | "threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}", |
| 536 | entry_point, name, arg, stack_top, priority, processor_id, *out_handle); | 536 | entry_point, name, arg, stack_top, priority, processor_id, *out_handle); |
| @@ -540,7 +540,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 540 | 540 | ||
| 541 | /// Starts the thread for the provided handle | 541 | /// Starts the thread for the provided handle |
| 542 | static ResultCode StartThread(Handle thread_handle) { | 542 | static ResultCode StartThread(Handle thread_handle) { |
| 543 | NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle); | 543 | LOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle); |
| 544 | 544 | ||
| 545 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | 545 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| 546 | if (!thread) { | 546 | if (!thread) { |
| @@ -557,7 +557,7 @@ static ResultCode StartThread(Handle thread_handle) { | |||
| 557 | 557 | ||
| 558 | /// Called when a thread exits | 558 | /// Called when a thread exits |
| 559 | static void ExitThread() { | 559 | static void ExitThread() { |
| 560 | NGLOG_TRACE(Kernel_SVC, "called, pc=0x{:08X}", Core::CurrentArmInterface().GetPC()); | 560 | LOG_TRACE(Kernel_SVC, "called, pc=0x{:08X}", Core::CurrentArmInterface().GetPC()); |
| 561 | 561 | ||
| 562 | ExitCurrentThread(); | 562 | ExitCurrentThread(); |
| 563 | Core::System::GetInstance().PrepareReschedule(); | 563 | Core::System::GetInstance().PrepareReschedule(); |
| @@ -565,7 +565,7 @@ static void ExitThread() { | |||
| 565 | 565 | ||
| 566 | /// Sleep the current thread | 566 | /// Sleep the current thread |
| 567 | static void SleepThread(s64 nanoseconds) { | 567 | static void SleepThread(s64 nanoseconds) { |
| 568 | NGLOG_TRACE(Kernel_SVC, "called nanoseconds={}", nanoseconds); | 568 | LOG_TRACE(Kernel_SVC, "called nanoseconds={}", nanoseconds); |
| 569 | 569 | ||
| 570 | // Don't attempt to yield execution if there are no available threads to run, | 570 | // Don't attempt to yield execution if there are no available threads to run, |
| 571 | // this way we avoid a useless reschedule to the idle thread. | 571 | // this way we avoid a useless reschedule to the idle thread. |
| @@ -584,7 +584,7 @@ static void SleepThread(s64 nanoseconds) { | |||
| 584 | /// Wait process wide key atomic | 584 | /// Wait process wide key atomic |
| 585 | static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_variable_addr, | 585 | static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_variable_addr, |
| 586 | Handle thread_handle, s64 nano_seconds) { | 586 | Handle thread_handle, s64 nano_seconds) { |
| 587 | NGLOG_TRACE( | 587 | LOG_TRACE( |
| 588 | Kernel_SVC, | 588 | Kernel_SVC, |
| 589 | "called mutex_addr={:X}, condition_variable_addr={:X}, thread_handle=0x{:08X}, timeout={}", | 589 | "called mutex_addr={:X}, condition_variable_addr={:X}, thread_handle=0x{:08X}, timeout={}", |
| 590 | mutex_addr, condition_variable_addr, thread_handle, nano_seconds); | 590 | mutex_addr, condition_variable_addr, thread_handle, nano_seconds); |
| @@ -611,7 +611,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_var | |||
| 611 | 611 | ||
| 612 | /// Signal process wide key | 612 | /// Signal process wide key |
| 613 | static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target) { | 613 | static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target) { |
| 614 | NGLOG_TRACE(Kernel_SVC, "called, condition_variable_addr=0x{:X}, target=0x{:08X}", | 614 | LOG_TRACE(Kernel_SVC, "called, condition_variable_addr=0x{:X}, target=0x{:08X}", |
| 615 | condition_variable_addr, target); | 615 | condition_variable_addr, target); |
| 616 | 616 | ||
| 617 | auto RetrieveWaitingThreads = | 617 | auto RetrieveWaitingThreads = |
| @@ -692,7 +692,7 @@ static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target | |||
| 692 | 692 | ||
| 693 | // Wait for an address (via Address Arbiter) | 693 | // Wait for an address (via Address Arbiter) |
| 694 | static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout) { | 694 | static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout) { |
| 695 | NGLOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, timeout={}", | 695 | LOG_WARNING(Kernel_SVC, "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, timeout={}", |
| 696 | address, type, value, timeout); | 696 | address, type, value, timeout); |
| 697 | // If the passed address is a kernel virtual address, return invalid memory state. | 697 | // If the passed address is a kernel virtual address, return invalid memory state. |
| 698 | if (Memory::IsKernelVirtualAddress(address)) { | 698 | if (Memory::IsKernelVirtualAddress(address)) { |
| @@ -717,7 +717,7 @@ static ResultCode WaitForAddress(VAddr address, u32 type, s32 value, s64 timeout | |||
| 717 | 717 | ||
| 718 | // Signals to an address (via Address Arbiter) | 718 | // Signals to an address (via Address Arbiter) |
| 719 | static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) { | 719 | static ResultCode SignalToAddress(VAddr address, u32 type, s32 value, s32 num_to_wake) { |
| 720 | NGLOG_WARNING(Kernel_SVC, | 720 | LOG_WARNING(Kernel_SVC, |
| 721 | "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", address, | 721 | "called, address=0x{:X}, type=0x{:X}, value=0x{:X}, num_to_wake=0x{:X}", address, |
| 722 | type, value, num_to_wake); | 722 | type, value, num_to_wake); |
| 723 | // If the passed address is a kernel virtual address, return invalid memory state. | 723 | // If the passed address is a kernel virtual address, return invalid memory state. |
| @@ -754,13 +754,13 @@ static u64 GetSystemTick() { | |||
| 754 | 754 | ||
| 755 | /// Close a handle | 755 | /// Close a handle |
| 756 | static ResultCode CloseHandle(Handle handle) { | 756 | static ResultCode CloseHandle(Handle handle) { |
| 757 | NGLOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle); | 757 | LOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle); |
| 758 | return g_handle_table.Close(handle); | 758 | return g_handle_table.Close(handle); |
| 759 | } | 759 | } |
| 760 | 760 | ||
| 761 | /// Reset an event | 761 | /// Reset an event |
| 762 | static ResultCode ResetSignal(Handle handle) { | 762 | static ResultCode ResetSignal(Handle handle) { |
| 763 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called handle 0x{:08X}", handle); | 763 | LOG_WARNING(Kernel_SVC, "(STUBBED) called handle 0x{:08X}", handle); |
| 764 | auto event = g_handle_table.Get<Event>(handle); | 764 | auto event = g_handle_table.Get<Event>(handle); |
| 765 | ASSERT(event != nullptr); | 765 | ASSERT(event != nullptr); |
| 766 | event->Clear(); | 766 | event->Clear(); |
| @@ -769,14 +769,14 @@ static ResultCode ResetSignal(Handle handle) { | |||
| 769 | 769 | ||
| 770 | /// Creates a TransferMemory object | 770 | /// Creates a TransferMemory object |
| 771 | static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) { | 771 | static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) { |
| 772 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x{:X}, size=0x{:X}, perms=0x{:08X}", addr, | 772 | LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x{:X}, size=0x{:X}, perms=0x{:08X}", addr, |
| 773 | size, permissions); | 773 | size, permissions); |
| 774 | *handle = 0; | 774 | *handle = 0; |
| 775 | return RESULT_SUCCESS; | 775 | return RESULT_SUCCESS; |
| 776 | } | 776 | } |
| 777 | 777 | ||
| 778 | static ResultCode GetThreadCoreMask(Handle thread_handle, u32* core, u64* mask) { | 778 | static ResultCode GetThreadCoreMask(Handle thread_handle, u32* core, u64* mask) { |
| 779 | NGLOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle); | 779 | LOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle); |
| 780 | 780 | ||
| 781 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | 781 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| 782 | if (!thread) { | 782 | if (!thread) { |
| @@ -790,7 +790,7 @@ static ResultCode GetThreadCoreMask(Handle thread_handle, u32* core, u64* mask) | |||
| 790 | } | 790 | } |
| 791 | 791 | ||
| 792 | static ResultCode SetThreadCoreMask(Handle thread_handle, u32 core, u64 mask) { | 792 | static ResultCode SetThreadCoreMask(Handle thread_handle, u32 core, u64 mask) { |
| 793 | NGLOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, mask=0x{:16X}, core=0x{:X}", thread_handle, | 793 | LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, mask=0x{:16X}, core=0x{:X}", thread_handle, |
| 794 | mask, core); | 794 | mask, core); |
| 795 | 795 | ||
| 796 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | 796 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| @@ -830,7 +830,7 @@ static ResultCode SetThreadCoreMask(Handle thread_handle, u32 core, u64 mask) { | |||
| 830 | 830 | ||
| 831 | static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permissions, | 831 | static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permissions, |
| 832 | u32 remote_permissions) { | 832 | u32 remote_permissions) { |
| 833 | NGLOG_TRACE(Kernel_SVC, "called, size=0x{:X}, localPerms=0x{:08X}, remotePerms=0x{:08X}", size, | 833 | LOG_TRACE(Kernel_SVC, "called, size=0x{:X}, localPerms=0x{:08X}, remotePerms=0x{:08X}", size, |
| 834 | local_permissions, remote_permissions); | 834 | local_permissions, remote_permissions); |
| 835 | auto sharedMemHandle = | 835 | auto sharedMemHandle = |
| 836 | SharedMemory::Create(g_handle_table.Get<Process>(KernelHandle::CurrentProcess), size, | 836 | SharedMemory::Create(g_handle_table.Get<Process>(KernelHandle::CurrentProcess), size, |
| @@ -842,7 +842,7 @@ static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permiss | |||
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | static ResultCode ClearEvent(Handle handle) { | 844 | static ResultCode ClearEvent(Handle handle) { |
| 845 | NGLOG_TRACE(Kernel_SVC, "called, event=0x{:08X}", handle); | 845 | LOG_TRACE(Kernel_SVC, "called, event=0x{:08X}", handle); |
| 846 | 846 | ||
| 847 | SharedPtr<Event> evt = g_handle_table.Get<Event>(handle); | 847 | SharedPtr<Event> evt = g_handle_table.Get<Event>(handle); |
| 848 | if (evt == nullptr) | 848 | if (evt == nullptr) |
| @@ -994,7 +994,7 @@ static const FunctionDef SVC_Table[] = { | |||
| 994 | 994 | ||
| 995 | static const FunctionDef* GetSVCInfo(u32 func_num) { | 995 | static const FunctionDef* GetSVCInfo(u32 func_num) { |
| 996 | if (func_num >= std::size(SVC_Table)) { | 996 | if (func_num >= std::size(SVC_Table)) { |
| 997 | NGLOG_ERROR(Kernel_SVC, "Unknown svc=0x{:02X}", func_num); | 997 | LOG_ERROR(Kernel_SVC, "Unknown svc=0x{:02X}", func_num); |
| 998 | return nullptr; | 998 | return nullptr; |
| 999 | } | 999 | } |
| 1000 | return &SVC_Table[func_num]; | 1000 | return &SVC_Table[func_num]; |
| @@ -1013,10 +1013,10 @@ void CallSVC(u32 immediate) { | |||
| 1013 | if (info->func) { | 1013 | if (info->func) { |
| 1014 | info->func(); | 1014 | info->func(); |
| 1015 | } else { | 1015 | } else { |
| 1016 | NGLOG_CRITICAL(Kernel_SVC, "Unimplemented SVC function {}(..)", info->name); | 1016 | LOG_CRITICAL(Kernel_SVC, "Unimplemented SVC function {}(..)", info->name); |
| 1017 | } | 1017 | } |
| 1018 | } else { | 1018 | } else { |
| 1019 | NGLOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate); | 1019 | LOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate); |
| 1020 | } | 1020 | } |
| 1021 | } | 1021 | } |
| 1022 | 1022 | ||
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 2f333ec34..01c346520 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -104,7 +104,7 @@ static void ThreadWakeupCallback(u64 thread_handle, int cycles_late) { | |||
| 104 | const auto proper_handle = static_cast<Handle>(thread_handle); | 104 | const auto proper_handle = static_cast<Handle>(thread_handle); |
| 105 | SharedPtr<Thread> thread = wakeup_callback_handle_table.Get<Thread>(proper_handle); | 105 | SharedPtr<Thread> thread = wakeup_callback_handle_table.Get<Thread>(proper_handle); |
| 106 | if (thread == nullptr) { | 106 | if (thread == nullptr) { |
| 107 | NGLOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", proper_handle); | 107 | LOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", proper_handle); |
| 108 | return; | 108 | return; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| @@ -290,19 +290,19 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, | |||
| 290 | SharedPtr<Process> owner_process) { | 290 | SharedPtr<Process> owner_process) { |
| 291 | // Check if priority is in ranged. Lowest priority -> highest priority id. | 291 | // Check if priority is in ranged. Lowest priority -> highest priority id. |
| 292 | if (priority > THREADPRIO_LOWEST) { | 292 | if (priority > THREADPRIO_LOWEST) { |
| 293 | NGLOG_ERROR(Kernel_SVC, "Invalid thread priority: {}", priority); | 293 | LOG_ERROR(Kernel_SVC, "Invalid thread priority: {}", priority); |
| 294 | return ERR_OUT_OF_RANGE; | 294 | return ERR_OUT_OF_RANGE; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | if (processor_id > THREADPROCESSORID_MAX) { | 297 | if (processor_id > THREADPROCESSORID_MAX) { |
| 298 | NGLOG_ERROR(Kernel_SVC, "Invalid processor id: {}", processor_id); | 298 | LOG_ERROR(Kernel_SVC, "Invalid processor id: {}", processor_id); |
| 299 | return ERR_OUT_OF_RANGE_KERNEL; | 299 | return ERR_OUT_OF_RANGE_KERNEL; |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | // TODO(yuriks): Other checks, returning 0xD9001BEA | 302 | // TODO(yuriks): Other checks, returning 0xD9001BEA |
| 303 | 303 | ||
| 304 | if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) { | 304 | if (!Memory::IsValidVirtualAddress(*owner_process, entry_point)) { |
| 305 | NGLOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:016X}", name, entry_point); | 305 | LOG_ERROR(Kernel_SVC, "(name={}): invalid entry {:016X}", name, entry_point); |
| 306 | // TODO (bunnei): Find the correct error code to use here | 306 | // TODO (bunnei): Find the correct error code to use here |
| 307 | return ResultCode(-1); | 307 | return ResultCode(-1); |
| 308 | } | 308 | } |
| @@ -343,7 +343,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, | |||
| 343 | auto& linheap_memory = memory_region->linear_heap_memory; | 343 | auto& linheap_memory = memory_region->linear_heap_memory; |
| 344 | 344 | ||
| 345 | if (linheap_memory->size() + Memory::PAGE_SIZE > memory_region->size) { | 345 | if (linheap_memory->size() + Memory::PAGE_SIZE > memory_region->size) { |
| 346 | NGLOG_ERROR(Kernel_SVC, | 346 | LOG_ERROR(Kernel_SVC, |
| 347 | "Not enough space in region to allocate a new TLS page for thread"); | 347 | "Not enough space in region to allocate a new TLS page for thread"); |
| 348 | return ERR_OUT_OF_MEMORY; | 348 | return ERR_OUT_OF_MEMORY; |
| 349 | } | 349 | } |
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index 661356a97..0141125e4 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp | |||
| @@ -78,7 +78,7 @@ void Timer::WakeupAllWaitingThreads() { | |||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void Timer::Signal(int cycles_late) { | 80 | void Timer::Signal(int cycles_late) { |
| 81 | NGLOG_TRACE(Kernel, "Timer {} fired", GetObjectId()); | 81 | LOG_TRACE(Kernel, "Timer {} fired", GetObjectId()); |
| 82 | 82 | ||
| 83 | signaled = true; | 83 | signaled = true; |
| 84 | 84 | ||
| @@ -98,7 +98,7 @@ static void TimerCallback(u64 timer_handle, int cycles_late) { | |||
| 98 | timer_callback_handle_table.Get<Timer>(static_cast<Handle>(timer_handle)); | 98 | timer_callback_handle_table.Get<Timer>(static_cast<Handle>(timer_handle)); |
| 99 | 99 | ||
| 100 | if (timer == nullptr) { | 100 | if (timer == nullptr) { |
| 101 | NGLOG_CRITICAL(Kernel, "Callback fired for invalid timer {:016X}", timer_handle); | 101 | LOG_CRITICAL(Kernel, "Callback fired for invalid timer {:016X}", timer_handle); |
| 102 | return; | 102 | return; |
| 103 | } | 103 | } |
| 104 | 104 | ||
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 676e5b282..e05aa5931 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp | |||
| @@ -242,7 +242,7 @@ void VMManager::RefreshMemoryBlockMappings(const std::vector<u8>* block) { | |||
| 242 | void VMManager::LogLayout() const { | 242 | void VMManager::LogLayout() const { |
| 243 | for (const auto& p : vma_map) { | 243 | for (const auto& p : vma_map) { |
| 244 | const VirtualMemoryArea& vma = p.second; | 244 | const VirtualMemoryArea& vma = p.second; |
| 245 | NGLOG_DEBUG(Kernel, "{:016X} - {:016X} size: {:016X} {}{}{} {}", vma.base, | 245 | LOG_DEBUG(Kernel, "{:016X} - {:016X} size: {:016X} {}{}{} {}", vma.base, |
| 246 | vma.base + vma.size, vma.size, | 246 | vma.base + vma.size, vma.size, |
| 247 | (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-', | 247 | (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-', |
| 248 | (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-', | 248 | (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-', |
| @@ -392,22 +392,22 @@ void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) { | |||
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | u64 VMManager::GetTotalMemoryUsage() { | 394 | u64 VMManager::GetTotalMemoryUsage() { |
| 395 | NGLOG_WARNING(Kernel, "(STUBBED) called"); | 395 | LOG_WARNING(Kernel, "(STUBBED) called"); |
| 396 | return 0xF8000000; | 396 | return 0xF8000000; |
| 397 | } | 397 | } |
| 398 | 398 | ||
| 399 | u64 VMManager::GetTotalHeapUsage() { | 399 | u64 VMManager::GetTotalHeapUsage() { |
| 400 | NGLOG_WARNING(Kernel, "(STUBBED) called"); | 400 | LOG_WARNING(Kernel, "(STUBBED) called"); |
| 401 | return 0x0; | 401 | return 0x0; |
| 402 | } | 402 | } |
| 403 | 403 | ||
| 404 | VAddr VMManager::GetAddressSpaceBaseAddr() { | 404 | VAddr VMManager::GetAddressSpaceBaseAddr() { |
| 405 | NGLOG_WARNING(Kernel, "(STUBBED) called"); | 405 | LOG_WARNING(Kernel, "(STUBBED) called"); |
| 406 | return 0x8000000; | 406 | return 0x8000000; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | u64 VMManager::GetAddressSpaceSize() { | 409 | u64 VMManager::GetAddressSpaceSize() { |
| 410 | NGLOG_WARNING(Kernel, "(STUBBED) called"); | 410 | LOG_WARNING(Kernel, "(STUBBED) called"); |
| 411 | return MAX_ADDRESS; | 411 | return MAX_ADDRESS; |
| 412 | } | 412 | } |
| 413 | 413 | ||
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index f2fffa760..6bafb2dce 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -47,7 +47,7 @@ public: | |||
| 47 | 47 | ||
| 48 | private: | 48 | private: |
| 49 | void GetBase(Kernel::HLERequestContext& ctx) { | 49 | void GetBase(Kernel::HLERequestContext& ctx) { |
| 50 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 50 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 51 | ProfileBase profile_base{}; | 51 | ProfileBase profile_base{}; |
| 52 | IPC::ResponseBuilder rb{ctx, 16}; | 52 | IPC::ResponseBuilder rb{ctx, 16}; |
| 53 | rb.Push(RESULT_SUCCESS); | 53 | rb.Push(RESULT_SUCCESS); |
| @@ -72,14 +72,14 @@ public: | |||
| 72 | 72 | ||
| 73 | private: | 73 | private: |
| 74 | void CheckAvailability(Kernel::HLERequestContext& ctx) { | 74 | void CheckAvailability(Kernel::HLERequestContext& ctx) { |
| 75 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 75 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 76 | IPC::ResponseBuilder rb{ctx, 3}; | 76 | IPC::ResponseBuilder rb{ctx, 3}; |
| 77 | rb.Push(RESULT_SUCCESS); | 77 | rb.Push(RESULT_SUCCESS); |
| 78 | rb.Push(true); // TODO: Check when this is supposed to return true and when not | 78 | rb.Push(true); // TODO: Check when this is supposed to return true and when not |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void GetAccountId(Kernel::HLERequestContext& ctx) { | 81 | void GetAccountId(Kernel::HLERequestContext& ctx) { |
| 82 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 82 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 83 | IPC::ResponseBuilder rb{ctx, 4}; | 83 | IPC::ResponseBuilder rb{ctx, 4}; |
| 84 | rb.Push(RESULT_SUCCESS); | 84 | rb.Push(RESULT_SUCCESS); |
| 85 | rb.Push<u64>(0x12345678ABCDEF); | 85 | rb.Push<u64>(0x12345678ABCDEF); |
| @@ -87,14 +87,14 @@ private: | |||
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { | 89 | void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) { |
| 90 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 90 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 91 | IPC::ResponseBuilder rb{ctx, 3}; | 91 | IPC::ResponseBuilder rb{ctx, 3}; |
| 92 | rb.Push(RESULT_SUCCESS); | 92 | rb.Push(RESULT_SUCCESS); |
| 93 | rb.Push(true); // TODO: Check when this is supposed to return true and when not | 93 | rb.Push(true); // TODO: Check when this is supposed to return true and when not |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) { | 96 | void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) { |
| 97 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 97 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 98 | constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; | 98 | constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; |
| 99 | ctx.WriteBuffer(user_ids.data(), user_ids.size()); | 99 | ctx.WriteBuffer(user_ids.data(), user_ids.size()); |
| 100 | IPC::ResponseBuilder rb{ctx, 2}; | 100 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -102,7 +102,7 @@ void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) { | |||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) { | 104 | void Module::Interface::ListOpenUsers(Kernel::HLERequestContext& ctx) { |
| 105 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 105 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 106 | constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; | 106 | constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; |
| 107 | ctx.WriteBuffer(user_ids.data(), user_ids.size()); | 107 | ctx.WriteBuffer(user_ids.data(), user_ids.size()); |
| 108 | IPC::ResponseBuilder rb{ctx, 2}; | 108 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -113,11 +113,11 @@ void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) { | |||
| 113 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 113 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 114 | rb.Push(RESULT_SUCCESS); | 114 | rb.Push(RESULT_SUCCESS); |
| 115 | rb.PushIpcInterface<IProfile>(); | 115 | rb.PushIpcInterface<IProfile>(); |
| 116 | NGLOG_DEBUG(Service_ACC, "called"); | 116 | LOG_DEBUG(Service_ACC, "called"); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { | 119 | void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { |
| 120 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 120 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 121 | IPC::ResponseBuilder rb{ctx, 2}; | 121 | IPC::ResponseBuilder rb{ctx, 2}; |
| 122 | rb.Push(RESULT_SUCCESS); | 122 | rb.Push(RESULT_SUCCESS); |
| 123 | } | 123 | } |
| @@ -126,11 +126,11 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo | |||
| 126 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 126 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 127 | rb.Push(RESULT_SUCCESS); | 127 | rb.Push(RESULT_SUCCESS); |
| 128 | rb.PushIpcInterface<IManagerForApplication>(); | 128 | rb.PushIpcInterface<IManagerForApplication>(); |
| 129 | NGLOG_DEBUG(Service_ACC, "called"); | 129 | LOG_DEBUG(Service_ACC, "called"); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { | 132 | void Module::Interface::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { |
| 133 | NGLOG_WARNING(Service_ACC, "(STUBBED) called"); | 133 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
| 134 | IPC::ResponseBuilder rb{ctx, 6}; | 134 | IPC::ResponseBuilder rb{ctx, 6}; |
| 135 | rb.Push(RESULT_SUCCESS); | 135 | rb.Push(RESULT_SUCCESS); |
| 136 | rb.PushRaw(DEFAULT_USER_ID); | 136 | rb.PushRaw(DEFAULT_USER_ID); |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index b8d6b8d4d..a871b3eaa 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -30,14 +30,14 @@ IWindowController::IWindowController() : ServiceFramework("IWindowController") { | |||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) { | 32 | void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) { |
| 33 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 33 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 34 | IPC::ResponseBuilder rb{ctx, 4}; | 34 | IPC::ResponseBuilder rb{ctx, 4}; |
| 35 | rb.Push(RESULT_SUCCESS); | 35 | rb.Push(RESULT_SUCCESS); |
| 36 | rb.Push<u64>(0); | 36 | rb.Push<u64>(0); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) { | 39 | void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) { |
| 40 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 40 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 41 | IPC::ResponseBuilder rb{ctx, 2}; | 41 | IPC::ResponseBuilder rb{ctx, 2}; |
| 42 | rb.Push(RESULT_SUCCESS); | 42 | rb.Push(RESULT_SUCCESS); |
| 43 | } | 43 | } |
| @@ -56,20 +56,20 @@ IAudioController::IAudioController() : ServiceFramework("IAudioController") { | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 58 | void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) { |
| 59 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 59 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 60 | IPC::ResponseBuilder rb{ctx, 2}; | 60 | IPC::ResponseBuilder rb{ctx, 2}; |
| 61 | rb.Push(RESULT_SUCCESS); | 61 | rb.Push(RESULT_SUCCESS); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 64 | void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { |
| 65 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 65 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 66 | IPC::ResponseBuilder rb{ctx, 3}; | 66 | IPC::ResponseBuilder rb{ctx, 3}; |
| 67 | rb.Push(RESULT_SUCCESS); | 67 | rb.Push(RESULT_SUCCESS); |
| 68 | rb.Push(volume); | 68 | rb.Push(volume); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | 71 | void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { |
| 72 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 72 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 73 | IPC::ResponseBuilder rb{ctx, 3}; | 73 | IPC::ResponseBuilder rb{ctx, 3}; |
| 74 | rb.Push(RESULT_SUCCESS); | 74 | rb.Push(RESULT_SUCCESS); |
| 75 | rb.Push(volume); | 75 | rb.Push(volume); |
| @@ -174,14 +174,14 @@ void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) { | |||
| 174 | IPC::ResponseBuilder rb{ctx, 2}; | 174 | IPC::ResponseBuilder rb{ctx, 2}; |
| 175 | rb.Push(RESULT_SUCCESS); | 175 | rb.Push(RESULT_SUCCESS); |
| 176 | 176 | ||
| 177 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 177 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) { | 180 | void ISelfController::SetRestartMessageEnabled(Kernel::HLERequestContext& ctx) { |
| 181 | IPC::ResponseBuilder rb{ctx, 2}; | 181 | IPC::ResponseBuilder rb{ctx, 2}; |
| 182 | rb.Push(RESULT_SUCCESS); | 182 | rb.Push(RESULT_SUCCESS); |
| 183 | 183 | ||
| 184 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 184 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) { | 187 | void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx) { |
| @@ -192,14 +192,14 @@ void ISelfController::SetPerformanceModeChangedNotification(Kernel::HLERequestCo | |||
| 192 | IPC::ResponseBuilder rb{ctx, 2}; | 192 | IPC::ResponseBuilder rb{ctx, 2}; |
| 193 | rb.Push(RESULT_SUCCESS); | 193 | rb.Push(RESULT_SUCCESS); |
| 194 | 194 | ||
| 195 | NGLOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag); | 195 | LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) { | 198 | void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) { |
| 199 | IPC::ResponseBuilder rb{ctx, 2}; | 199 | IPC::ResponseBuilder rb{ctx, 2}; |
| 200 | rb.Push(RESULT_SUCCESS); | 200 | rb.Push(RESULT_SUCCESS); |
| 201 | 201 | ||
| 202 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 202 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) { | 205 | void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx) { |
| @@ -210,7 +210,7 @@ void ISelfController::SetOperationModeChangedNotification(Kernel::HLERequestCont | |||
| 210 | IPC::ResponseBuilder rb{ctx, 2}; | 210 | IPC::ResponseBuilder rb{ctx, 2}; |
| 211 | rb.Push(RESULT_SUCCESS); | 211 | rb.Push(RESULT_SUCCESS); |
| 212 | 212 | ||
| 213 | NGLOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag); | 213 | LOG_WARNING(Service_AM, "(STUBBED) called flag={}", flag); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) { | 216 | void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx) { |
| @@ -223,21 +223,21 @@ void ISelfController::SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& | |||
| 223 | IPC::ResponseBuilder rb{ctx, 2}; | 223 | IPC::ResponseBuilder rb{ctx, 2}; |
| 224 | rb.Push(RESULT_SUCCESS); | 224 | rb.Push(RESULT_SUCCESS); |
| 225 | 225 | ||
| 226 | NGLOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled); | 226 | LOG_WARNING(Service_AM, "(STUBBED) called enabled={}", enabled); |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | void ISelfController::LockExit(Kernel::HLERequestContext& ctx) { | 229 | void ISelfController::LockExit(Kernel::HLERequestContext& ctx) { |
| 230 | IPC::ResponseBuilder rb{ctx, 2}; | 230 | IPC::ResponseBuilder rb{ctx, 2}; |
| 231 | rb.Push(RESULT_SUCCESS); | 231 | rb.Push(RESULT_SUCCESS); |
| 232 | 232 | ||
| 233 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 233 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) { | 236 | void ISelfController::UnlockExit(Kernel::HLERequestContext& ctx) { |
| 237 | IPC::ResponseBuilder rb{ctx, 2}; | 237 | IPC::ResponseBuilder rb{ctx, 2}; |
| 238 | rb.Push(RESULT_SUCCESS); | 238 | rb.Push(RESULT_SUCCESS); |
| 239 | 239 | ||
| 240 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 240 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) { | 243 | void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx) { |
| @@ -247,7 +247,7 @@ void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& | |||
| 247 | rb.Push(RESULT_SUCCESS); | 247 | rb.Push(RESULT_SUCCESS); |
| 248 | rb.PushCopyObjects(launchable_event); | 248 | rb.PushCopyObjects(launchable_event); |
| 249 | 249 | ||
| 250 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 250 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) { | 253 | void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) { |
| @@ -260,14 +260,14 @@ void ISelfController::CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx) | |||
| 260 | rb.Push(RESULT_SUCCESS); | 260 | rb.Push(RESULT_SUCCESS); |
| 261 | rb.Push(layer_id); | 261 | rb.Push(layer_id); |
| 262 | 262 | ||
| 263 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 263 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) { | 266 | void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx) { |
| 267 | IPC::ResponseBuilder rb{ctx, 2}; | 267 | IPC::ResponseBuilder rb{ctx, 2}; |
| 268 | rb.Push(RESULT_SUCCESS); | 268 | rb.Push(RESULT_SUCCESS); |
| 269 | 269 | ||
| 270 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 270 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter") { | 273 | ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter") { |
| @@ -311,7 +311,7 @@ void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { | |||
| 311 | rb.Push(RESULT_SUCCESS); | 311 | rb.Push(RESULT_SUCCESS); |
| 312 | rb.PushCopyObjects(event); | 312 | rb.PushCopyObjects(event); |
| 313 | 313 | ||
| 314 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 314 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) { | 317 | void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) { |
| @@ -319,7 +319,7 @@ void ICommonStateGetter::ReceiveMessage(Kernel::HLERequestContext& ctx) { | |||
| 319 | rb.Push(RESULT_SUCCESS); | 319 | rb.Push(RESULT_SUCCESS); |
| 320 | rb.Push<u32>(15); | 320 | rb.Push<u32>(15); |
| 321 | 321 | ||
| 322 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 322 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { | 325 | void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { |
| @@ -327,7 +327,7 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { | |||
| 327 | rb.Push(RESULT_SUCCESS); | 327 | rb.Push(RESULT_SUCCESS); |
| 328 | rb.Push(static_cast<u8>(FocusState::InFocus)); | 328 | rb.Push(static_cast<u8>(FocusState::InFocus)); |
| 329 | 329 | ||
| 330 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 330 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) { | 333 | void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) { |
| @@ -336,7 +336,7 @@ void ICommonStateGetter::GetOperationMode(Kernel::HLERequestContext& ctx) { | |||
| 336 | rb.Push(RESULT_SUCCESS); | 336 | rb.Push(RESULT_SUCCESS); |
| 337 | rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld)); | 337 | rb.Push(static_cast<u8>(use_docked_mode ? OperationMode::Docked : OperationMode::Handheld)); |
| 338 | 338 | ||
| 339 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 339 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) { | 342 | void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) { |
| @@ -346,7 +346,7 @@ void ICommonStateGetter::GetPerformanceMode(Kernel::HLERequestContext& ctx) { | |||
| 346 | rb.Push(static_cast<u32>(use_docked_mode ? APM::PerformanceMode::Docked | 346 | rb.Push(static_cast<u32>(use_docked_mode ? APM::PerformanceMode::Docked |
| 347 | : APM::PerformanceMode::Handheld)); | 347 | : APM::PerformanceMode::Handheld)); |
| 348 | 348 | ||
| 349 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 349 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | class IStorageAccessor final : public ServiceFramework<IStorageAccessor> { | 352 | class IStorageAccessor final : public ServiceFramework<IStorageAccessor> { |
| @@ -370,7 +370,7 @@ private: | |||
| 370 | rb.Push(RESULT_SUCCESS); | 370 | rb.Push(RESULT_SUCCESS); |
| 371 | rb.Push(static_cast<u64>(buffer.size())); | 371 | rb.Push(static_cast<u64>(buffer.size())); |
| 372 | 372 | ||
| 373 | NGLOG_DEBUG(Service_AM, "called"); | 373 | LOG_DEBUG(Service_AM, "called"); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | void Write(Kernel::HLERequestContext& ctx) { | 376 | void Write(Kernel::HLERequestContext& ctx) { |
| @@ -386,7 +386,7 @@ private: | |||
| 386 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 386 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; |
| 387 | rb.Push(RESULT_SUCCESS); | 387 | rb.Push(RESULT_SUCCESS); |
| 388 | 388 | ||
| 389 | NGLOG_DEBUG(Service_AM, "called, offset={}", offset); | 389 | LOG_DEBUG(Service_AM, "called, offset={}", offset); |
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | void Read(Kernel::HLERequestContext& ctx) { | 392 | void Read(Kernel::HLERequestContext& ctx) { |
| @@ -402,7 +402,7 @@ private: | |||
| 402 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 402 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; |
| 403 | rb.Push(RESULT_SUCCESS); | 403 | rb.Push(RESULT_SUCCESS); |
| 404 | 404 | ||
| 405 | NGLOG_DEBUG(Service_AM, "called, offset={}", offset); | 405 | LOG_DEBUG(Service_AM, "called, offset={}", offset); |
| 406 | } | 406 | } |
| 407 | }; | 407 | }; |
| 408 | 408 | ||
| @@ -426,7 +426,7 @@ private: | |||
| 426 | rb.Push(RESULT_SUCCESS); | 426 | rb.Push(RESULT_SUCCESS); |
| 427 | rb.PushIpcInterface<AM::IStorageAccessor>(buffer); | 427 | rb.PushIpcInterface<AM::IStorageAccessor>(buffer); |
| 428 | 428 | ||
| 429 | NGLOG_DEBUG(Service_AM, "called"); | 429 | LOG_DEBUG(Service_AM, "called"); |
| 430 | } | 430 | } |
| 431 | }; | 431 | }; |
| 432 | 432 | ||
| @@ -467,21 +467,21 @@ private: | |||
| 467 | rb.Push(RESULT_SUCCESS); | 467 | rb.Push(RESULT_SUCCESS); |
| 468 | rb.PushCopyObjects(state_changed_event); | 468 | rb.PushCopyObjects(state_changed_event); |
| 469 | 469 | ||
| 470 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 470 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | void GetResult(Kernel::HLERequestContext& ctx) { | 473 | void GetResult(Kernel::HLERequestContext& ctx) { |
| 474 | IPC::ResponseBuilder rb{ctx, 2}; | 474 | IPC::ResponseBuilder rb{ctx, 2}; |
| 475 | rb.Push(RESULT_SUCCESS); | 475 | rb.Push(RESULT_SUCCESS); |
| 476 | 476 | ||
| 477 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 477 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | void Start(Kernel::HLERequestContext& ctx) { | 480 | void Start(Kernel::HLERequestContext& ctx) { |
| 481 | IPC::ResponseBuilder rb{ctx, 2}; | 481 | IPC::ResponseBuilder rb{ctx, 2}; |
| 482 | rb.Push(RESULT_SUCCESS); | 482 | rb.Push(RESULT_SUCCESS); |
| 483 | 483 | ||
| 484 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 484 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | void PushInData(Kernel::HLERequestContext& ctx) { | 487 | void PushInData(Kernel::HLERequestContext& ctx) { |
| @@ -491,7 +491,7 @@ private: | |||
| 491 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; | 491 | IPC::ResponseBuilder rb{rp.MakeBuilder(2, 0, 0)}; |
| 492 | rb.Push(RESULT_SUCCESS); | 492 | rb.Push(RESULT_SUCCESS); |
| 493 | 493 | ||
| 494 | NGLOG_DEBUG(Service_AM, "called"); | 494 | LOG_DEBUG(Service_AM, "called"); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | void PopOutData(Kernel::HLERequestContext& ctx) { | 497 | void PopOutData(Kernel::HLERequestContext& ctx) { |
| @@ -501,7 +501,7 @@ private: | |||
| 501 | 501 | ||
| 502 | storage_stack.pop(); | 502 | storage_stack.pop(); |
| 503 | 503 | ||
| 504 | NGLOG_DEBUG(Service_AM, "called"); | 504 | LOG_DEBUG(Service_AM, "called"); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | std::stack<std::shared_ptr<AM::IStorage>> storage_stack; | 507 | std::stack<std::shared_ptr<AM::IStorage>> storage_stack; |
| @@ -526,7 +526,7 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) | |||
| 526 | rb.Push(RESULT_SUCCESS); | 526 | rb.Push(RESULT_SUCCESS); |
| 527 | rb.PushIpcInterface<AM::ILibraryAppletAccessor>(); | 527 | rb.PushIpcInterface<AM::ILibraryAppletAccessor>(); |
| 528 | 528 | ||
| 529 | NGLOG_DEBUG(Service_AM, "called"); | 529 | LOG_DEBUG(Service_AM, "called"); |
| 530 | } | 530 | } |
| 531 | 531 | ||
| 532 | void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { | 532 | void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { |
| @@ -538,7 +538,7 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { | |||
| 538 | rb.Push(RESULT_SUCCESS); | 538 | rb.Push(RESULT_SUCCESS); |
| 539 | rb.PushIpcInterface<AM::IStorage>(std::move(buffer)); | 539 | rb.PushIpcInterface<AM::IStorage>(std::move(buffer)); |
| 540 | 540 | ||
| 541 | NGLOG_DEBUG(Service_AM, "called, size={}", size); | 541 | LOG_DEBUG(Service_AM, "called, size={}", size); |
| 542 | } | 542 | } |
| 543 | 543 | ||
| 544 | IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") { | 544 | IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") { |
| @@ -602,21 +602,21 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { | |||
| 602 | rb.Push(RESULT_SUCCESS); | 602 | rb.Push(RESULT_SUCCESS); |
| 603 | rb.PushIpcInterface<AM::IStorage>(buffer); | 603 | rb.PushIpcInterface<AM::IStorage>(buffer); |
| 604 | 604 | ||
| 605 | NGLOG_DEBUG(Service_AM, "called"); | 605 | LOG_DEBUG(Service_AM, "called"); |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest( | 608 | void IApplicationFunctions::CreateApplicationAndRequestToStartForQuest( |
| 609 | Kernel::HLERequestContext& ctx) { | 609 | Kernel::HLERequestContext& ctx) { |
| 610 | IPC::ResponseBuilder rb{ctx, 2}; | 610 | IPC::ResponseBuilder rb{ctx, 2}; |
| 611 | rb.Push(RESULT_SUCCESS); | 611 | rb.Push(RESULT_SUCCESS); |
| 612 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 612 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 613 | } | 613 | } |
| 614 | 614 | ||
| 615 | void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) { | 615 | void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) { |
| 616 | IPC::RequestParser rp{ctx}; | 616 | IPC::RequestParser rp{ctx}; |
| 617 | u128 uid = rp.PopRaw<u128>(); | 617 | u128 uid = rp.PopRaw<u128>(); |
| 618 | 618 | ||
| 619 | NGLOG_WARNING(Service, "(STUBBED) called uid = {:016X}{:016X}", uid[1], uid[0]); | 619 | LOG_WARNING(Service, "(STUBBED) called uid = {:016X}{:016X}", uid[1], uid[0]); |
| 620 | 620 | ||
| 621 | IPC::ResponseBuilder rb{ctx, 4}; | 621 | IPC::ResponseBuilder rb{ctx, 4}; |
| 622 | 622 | ||
| @@ -644,7 +644,7 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) { | |||
| 644 | IPC::ResponseBuilder rb{ctx, 2}; | 644 | IPC::ResponseBuilder rb{ctx, 2}; |
| 645 | rb.Push(RESULT_SUCCESS); | 645 | rb.Push(RESULT_SUCCESS); |
| 646 | 646 | ||
| 647 | NGLOG_WARNING(Service_AM, "(STUBBED) called, result=0x{:08X}", result); | 647 | LOG_WARNING(Service_AM, "(STUBBED) called, result=0x{:08X}", result); |
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | 650 | void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { |
| @@ -652,7 +652,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | |||
| 652 | rb.Push(RESULT_SUCCESS); | 652 | rb.Push(RESULT_SUCCESS); |
| 653 | rb.Push<u64>(1); | 653 | rb.Push<u64>(1); |
| 654 | rb.Push<u64>(0); | 654 | rb.Push<u64>(0); |
| 655 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 655 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { | 658 | void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { |
| @@ -660,20 +660,20 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { | |||
| 660 | IPC::ResponseBuilder rb{ctx, 4}; | 660 | IPC::ResponseBuilder rb{ctx, 4}; |
| 661 | rb.Push(RESULT_SUCCESS); | 661 | rb.Push(RESULT_SUCCESS); |
| 662 | rb.Push(static_cast<u64>(Service::Set::LanguageCode::EN_US)); | 662 | rb.Push(static_cast<u64>(Service::Set::LanguageCode::EN_US)); |
| 663 | NGLOG_DEBUG(Service_AM, "called"); | 663 | LOG_DEBUG(Service_AM, "called"); |
| 664 | } | 664 | } |
| 665 | 665 | ||
| 666 | void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { | 666 | void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { |
| 667 | IPC::ResponseBuilder rb{ctx, 2}; | 667 | IPC::ResponseBuilder rb{ctx, 2}; |
| 668 | rb.Push(RESULT_SUCCESS); | 668 | rb.Push(RESULT_SUCCESS); |
| 669 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 669 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) { | 672 | void IApplicationFunctions::SetGamePlayRecordingState(Kernel::HLERequestContext& ctx) { |
| 673 | IPC::ResponseBuilder rb{ctx, 2}; | 673 | IPC::ResponseBuilder rb{ctx, 2}; |
| 674 | rb.Push(RESULT_SUCCESS); | 674 | rb.Push(RESULT_SUCCESS); |
| 675 | 675 | ||
| 676 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 676 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 677 | } | 677 | } |
| 678 | 678 | ||
| 679 | void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) { | 679 | void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) { |
| @@ -681,7 +681,7 @@ void IApplicationFunctions::NotifyRunning(Kernel::HLERequestContext& ctx) { | |||
| 681 | rb.Push(RESULT_SUCCESS); | 681 | rb.Push(RESULT_SUCCESS); |
| 682 | rb.Push<u8>(0); // Unknown, seems to be ignored by official processes | 682 | rb.Push<u8>(0); // Unknown, seems to be ignored by official processes |
| 683 | 683 | ||
| 684 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 684 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { | 687 | void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { |
| @@ -692,7 +692,7 @@ void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { | |||
| 692 | rb.Push<u64>(0); | 692 | rb.Push<u64>(0); |
| 693 | rb.Push<u64>(0); | 693 | rb.Push<u64>(0); |
| 694 | 694 | ||
| 695 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 695 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | void InstallInterfaces(SM::ServiceManager& service_manager, | 698 | void InstallInterfaces(SM::ServiceManager& service_manager, |
| @@ -717,7 +717,7 @@ IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions" | |||
| 717 | void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) { | 717 | void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) { |
| 718 | IPC::ResponseBuilder rb{ctx, 2}; | 718 | IPC::ResponseBuilder rb{ctx, 2}; |
| 719 | rb.Push(RESULT_SUCCESS); | 719 | rb.Push(RESULT_SUCCESS); |
| 720 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 720 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 721 | } | 721 | } |
| 722 | 722 | ||
| 723 | IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { | 723 | IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { |
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index 7ce551de3..180057ec2 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp | |||
| @@ -33,63 +33,63 @@ private: | |||
| 33 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 33 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 34 | rb.Push(RESULT_SUCCESS); | 34 | rb.Push(RESULT_SUCCESS); |
| 35 | rb.PushIpcInterface<ICommonStateGetter>(); | 35 | rb.PushIpcInterface<ICommonStateGetter>(); |
| 36 | NGLOG_DEBUG(Service_AM, "called"); | 36 | LOG_DEBUG(Service_AM, "called"); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 39 | void GetSelfController(Kernel::HLERequestContext& ctx) { |
| 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 41 | rb.Push(RESULT_SUCCESS); | 41 | rb.Push(RESULT_SUCCESS); |
| 42 | rb.PushIpcInterface<ISelfController>(nvflinger); | 42 | rb.PushIpcInterface<ISelfController>(nvflinger); |
| 43 | NGLOG_DEBUG(Service_AM, "called"); | 43 | LOG_DEBUG(Service_AM, "called"); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 46 | void GetWindowController(Kernel::HLERequestContext& ctx) { |
| 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 48 | rb.Push(RESULT_SUCCESS); | 48 | rb.Push(RESULT_SUCCESS); |
| 49 | rb.PushIpcInterface<IWindowController>(); | 49 | rb.PushIpcInterface<IWindowController>(); |
| 50 | NGLOG_DEBUG(Service_AM, "called"); | 50 | LOG_DEBUG(Service_AM, "called"); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void GetAudioController(Kernel::HLERequestContext& ctx) { | 53 | void GetAudioController(Kernel::HLERequestContext& ctx) { |
| 54 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 54 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 55 | rb.Push(RESULT_SUCCESS); | 55 | rb.Push(RESULT_SUCCESS); |
| 56 | rb.PushIpcInterface<IAudioController>(); | 56 | rb.PushIpcInterface<IAudioController>(); |
| 57 | NGLOG_DEBUG(Service_AM, "called"); | 57 | LOG_DEBUG(Service_AM, "called"); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 60 | void GetDisplayController(Kernel::HLERequestContext& ctx) { |
| 61 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 61 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 62 | rb.Push(RESULT_SUCCESS); | 62 | rb.Push(RESULT_SUCCESS); |
| 63 | rb.PushIpcInterface<IDisplayController>(); | 63 | rb.PushIpcInterface<IDisplayController>(); |
| 64 | NGLOG_DEBUG(Service_AM, "called"); | 64 | LOG_DEBUG(Service_AM, "called"); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void GetProcessWindingController(Kernel::HLERequestContext& ctx) { | 67 | void GetProcessWindingController(Kernel::HLERequestContext& ctx) { |
| 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 69 | rb.Push(RESULT_SUCCESS); | 69 | rb.Push(RESULT_SUCCESS); |
| 70 | rb.PushIpcInterface<IProcessWindingController>(); | 70 | rb.PushIpcInterface<IProcessWindingController>(); |
| 71 | NGLOG_DEBUG(Service_AM, "called"); | 71 | LOG_DEBUG(Service_AM, "called"); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 74 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { |
| 75 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 75 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 76 | rb.Push(RESULT_SUCCESS); | 76 | rb.Push(RESULT_SUCCESS); |
| 77 | rb.PushIpcInterface<IDebugFunctions>(); | 77 | rb.PushIpcInterface<IDebugFunctions>(); |
| 78 | NGLOG_DEBUG(Service_AM, "called"); | 78 | LOG_DEBUG(Service_AM, "called"); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 81 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { |
| 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 83 | rb.Push(RESULT_SUCCESS); | 83 | rb.Push(RESULT_SUCCESS); |
| 84 | rb.PushIpcInterface<ILibraryAppletCreator>(); | 84 | rb.PushIpcInterface<ILibraryAppletCreator>(); |
| 85 | NGLOG_DEBUG(Service_AM, "called"); | 85 | LOG_DEBUG(Service_AM, "called"); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { | 88 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { |
| 89 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 89 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 90 | rb.Push(RESULT_SUCCESS); | 90 | rb.Push(RESULT_SUCCESS); |
| 91 | rb.PushIpcInterface<IApplicationFunctions>(); | 91 | rb.PushIpcInterface<IApplicationFunctions>(); |
| 92 | NGLOG_DEBUG(Service_AM, "called"); | 92 | LOG_DEBUG(Service_AM, "called"); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 95 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
| @@ -120,70 +120,70 @@ private: | |||
| 120 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 120 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 121 | rb.Push(RESULT_SUCCESS); | 121 | rb.Push(RESULT_SUCCESS); |
| 122 | rb.PushIpcInterface<ICommonStateGetter>(); | 122 | rb.PushIpcInterface<ICommonStateGetter>(); |
| 123 | NGLOG_DEBUG(Service_AM, "called"); | 123 | LOG_DEBUG(Service_AM, "called"); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 126 | void GetSelfController(Kernel::HLERequestContext& ctx) { |
| 127 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 127 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 128 | rb.Push(RESULT_SUCCESS); | 128 | rb.Push(RESULT_SUCCESS); |
| 129 | rb.PushIpcInterface<ISelfController>(nvflinger); | 129 | rb.PushIpcInterface<ISelfController>(nvflinger); |
| 130 | NGLOG_DEBUG(Service_AM, "called"); | 130 | LOG_DEBUG(Service_AM, "called"); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 133 | void GetWindowController(Kernel::HLERequestContext& ctx) { |
| 134 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 134 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 135 | rb.Push(RESULT_SUCCESS); | 135 | rb.Push(RESULT_SUCCESS); |
| 136 | rb.PushIpcInterface<IWindowController>(); | 136 | rb.PushIpcInterface<IWindowController>(); |
| 137 | NGLOG_DEBUG(Service_AM, "called"); | 137 | LOG_DEBUG(Service_AM, "called"); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | void GetAudioController(Kernel::HLERequestContext& ctx) { | 140 | void GetAudioController(Kernel::HLERequestContext& ctx) { |
| 141 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 141 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 142 | rb.Push(RESULT_SUCCESS); | 142 | rb.Push(RESULT_SUCCESS); |
| 143 | rb.PushIpcInterface<IAudioController>(); | 143 | rb.PushIpcInterface<IAudioController>(); |
| 144 | NGLOG_DEBUG(Service_AM, "called"); | 144 | LOG_DEBUG(Service_AM, "called"); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 147 | void GetDisplayController(Kernel::HLERequestContext& ctx) { |
| 148 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 148 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 149 | rb.Push(RESULT_SUCCESS); | 149 | rb.Push(RESULT_SUCCESS); |
| 150 | rb.PushIpcInterface<IDisplayController>(); | 150 | rb.PushIpcInterface<IDisplayController>(); |
| 151 | NGLOG_DEBUG(Service_AM, "called"); | 151 | LOG_DEBUG(Service_AM, "called"); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 154 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { |
| 155 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 155 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 156 | rb.Push(RESULT_SUCCESS); | 156 | rb.Push(RESULT_SUCCESS); |
| 157 | rb.PushIpcInterface<IDebugFunctions>(); | 157 | rb.PushIpcInterface<IDebugFunctions>(); |
| 158 | NGLOG_DEBUG(Service_AM, "called"); | 158 | LOG_DEBUG(Service_AM, "called"); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 161 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { |
| 162 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 162 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 163 | rb.Push(RESULT_SUCCESS); | 163 | rb.Push(RESULT_SUCCESS); |
| 164 | rb.PushIpcInterface<ILibraryAppletCreator>(); | 164 | rb.PushIpcInterface<ILibraryAppletCreator>(); |
| 165 | NGLOG_DEBUG(Service_AM, "called"); | 165 | LOG_DEBUG(Service_AM, "called"); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void GetHomeMenuFunctions(Kernel::HLERequestContext& ctx) { | 168 | void GetHomeMenuFunctions(Kernel::HLERequestContext& ctx) { |
| 169 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 169 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 170 | rb.Push(RESULT_SUCCESS); | 170 | rb.Push(RESULT_SUCCESS); |
| 171 | rb.PushIpcInterface<IHomeMenuFunctions>(); | 171 | rb.PushIpcInterface<IHomeMenuFunctions>(); |
| 172 | NGLOG_DEBUG(Service_AM, "called"); | 172 | LOG_DEBUG(Service_AM, "called"); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void GetGlobalStateController(Kernel::HLERequestContext& ctx) { | 175 | void GetGlobalStateController(Kernel::HLERequestContext& ctx) { |
| 176 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 176 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 177 | rb.Push(RESULT_SUCCESS); | 177 | rb.Push(RESULT_SUCCESS); |
| 178 | rb.PushIpcInterface<IGlobalStateController>(); | 178 | rb.PushIpcInterface<IGlobalStateController>(); |
| 179 | NGLOG_DEBUG(Service_AM, "called"); | 179 | LOG_DEBUG(Service_AM, "called"); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | void GetApplicationCreator(Kernel::HLERequestContext& ctx) { | 182 | void GetApplicationCreator(Kernel::HLERequestContext& ctx) { |
| 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 184 | rb.Push(RESULT_SUCCESS); | 184 | rb.Push(RESULT_SUCCESS); |
| 185 | rb.PushIpcInterface<IApplicationCreator>(); | 185 | rb.PushIpcInterface<IApplicationCreator>(); |
| 186 | NGLOG_DEBUG(Service_AM, "called"); | 186 | LOG_DEBUG(Service_AM, "called"); |
| 187 | } | 187 | } |
| 188 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 188 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
| 189 | }; | 189 | }; |
| @@ -192,21 +192,21 @@ void AppletAE::OpenSystemAppletProxy(Kernel::HLERequestContext& ctx) { | |||
| 192 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 192 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 193 | rb.Push(RESULT_SUCCESS); | 193 | rb.Push(RESULT_SUCCESS); |
| 194 | rb.PushIpcInterface<ISystemAppletProxy>(nvflinger); | 194 | rb.PushIpcInterface<ISystemAppletProxy>(nvflinger); |
| 195 | NGLOG_DEBUG(Service_AM, "called"); | 195 | LOG_DEBUG(Service_AM, "called"); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) { | 198 | void AppletAE::OpenLibraryAppletProxy(Kernel::HLERequestContext& ctx) { |
| 199 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 199 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 200 | rb.Push(RESULT_SUCCESS); | 200 | rb.Push(RESULT_SUCCESS); |
| 201 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger); | 201 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger); |
| 202 | NGLOG_DEBUG(Service_AM, "called"); | 202 | LOG_DEBUG(Service_AM, "called"); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | void AppletAE::OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx) { | 205 | void AppletAE::OpenLibraryAppletProxyOld(Kernel::HLERequestContext& ctx) { |
| 206 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 206 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 207 | rb.Push(RESULT_SUCCESS); | 207 | rb.Push(RESULT_SUCCESS); |
| 208 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger); | 208 | rb.PushIpcInterface<ILibraryAppletProxy>(nvflinger); |
| 209 | NGLOG_DEBUG(Service_AM, "called"); | 209 | LOG_DEBUG(Service_AM, "called"); |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | AppletAE::AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) | 212 | AppletAE::AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) |
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index 587a922fe..278259eda 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp | |||
| @@ -33,56 +33,56 @@ private: | |||
| 33 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 33 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 34 | rb.Push(RESULT_SUCCESS); | 34 | rb.Push(RESULT_SUCCESS); |
| 35 | rb.PushIpcInterface<IAudioController>(); | 35 | rb.PushIpcInterface<IAudioController>(); |
| 36 | NGLOG_DEBUG(Service_AM, "called"); | 36 | LOG_DEBUG(Service_AM, "called"); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void GetDisplayController(Kernel::HLERequestContext& ctx) { | 39 | void GetDisplayController(Kernel::HLERequestContext& ctx) { |
| 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 40 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 41 | rb.Push(RESULT_SUCCESS); | 41 | rb.Push(RESULT_SUCCESS); |
| 42 | rb.PushIpcInterface<IDisplayController>(); | 42 | rb.PushIpcInterface<IDisplayController>(); |
| 43 | NGLOG_DEBUG(Service_AM, "called"); | 43 | LOG_DEBUG(Service_AM, "called"); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { | 46 | void GetDebugFunctions(Kernel::HLERequestContext& ctx) { |
| 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 48 | rb.Push(RESULT_SUCCESS); | 48 | rb.Push(RESULT_SUCCESS); |
| 49 | rb.PushIpcInterface<IDebugFunctions>(); | 49 | rb.PushIpcInterface<IDebugFunctions>(); |
| 50 | NGLOG_DEBUG(Service_AM, "called"); | 50 | LOG_DEBUG(Service_AM, "called"); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | void GetWindowController(Kernel::HLERequestContext& ctx) { | 53 | void GetWindowController(Kernel::HLERequestContext& ctx) { |
| 54 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 54 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 55 | rb.Push(RESULT_SUCCESS); | 55 | rb.Push(RESULT_SUCCESS); |
| 56 | rb.PushIpcInterface<IWindowController>(); | 56 | rb.PushIpcInterface<IWindowController>(); |
| 57 | NGLOG_DEBUG(Service_AM, "called"); | 57 | LOG_DEBUG(Service_AM, "called"); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void GetSelfController(Kernel::HLERequestContext& ctx) { | 60 | void GetSelfController(Kernel::HLERequestContext& ctx) { |
| 61 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 61 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 62 | rb.Push(RESULT_SUCCESS); | 62 | rb.Push(RESULT_SUCCESS); |
| 63 | rb.PushIpcInterface<ISelfController>(nvflinger); | 63 | rb.PushIpcInterface<ISelfController>(nvflinger); |
| 64 | NGLOG_DEBUG(Service_AM, "called"); | 64 | LOG_DEBUG(Service_AM, "called"); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { | 67 | void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { |
| 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 68 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 69 | rb.Push(RESULT_SUCCESS); | 69 | rb.Push(RESULT_SUCCESS); |
| 70 | rb.PushIpcInterface<ICommonStateGetter>(); | 70 | rb.PushIpcInterface<ICommonStateGetter>(); |
| 71 | NGLOG_DEBUG(Service_AM, "called"); | 71 | LOG_DEBUG(Service_AM, "called"); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { | 74 | void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { |
| 75 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 75 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 76 | rb.Push(RESULT_SUCCESS); | 76 | rb.Push(RESULT_SUCCESS); |
| 77 | rb.PushIpcInterface<ILibraryAppletCreator>(); | 77 | rb.PushIpcInterface<ILibraryAppletCreator>(); |
| 78 | NGLOG_DEBUG(Service_AM, "called"); | 78 | LOG_DEBUG(Service_AM, "called"); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { | 81 | void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { |
| 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 82 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 83 | rb.Push(RESULT_SUCCESS); | 83 | rb.Push(RESULT_SUCCESS); |
| 84 | rb.PushIpcInterface<IApplicationFunctions>(); | 84 | rb.PushIpcInterface<IApplicationFunctions>(); |
| 85 | NGLOG_DEBUG(Service_AM, "called"); | 85 | LOG_DEBUG(Service_AM, "called"); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; | 88 | std::shared_ptr<NVFlinger::NVFlinger> nvflinger; |
| @@ -92,7 +92,7 @@ void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) { | |||
| 92 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 92 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 93 | rb.Push(RESULT_SUCCESS); | 93 | rb.Push(RESULT_SUCCESS); |
| 94 | rb.PushIpcInterface<IApplicationProxy>(nvflinger); | 94 | rb.PushIpcInterface<IApplicationProxy>(nvflinger); |
| 95 | NGLOG_DEBUG(Service_AM, "called"); | 95 | LOG_DEBUG(Service_AM, "called"); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | AppletOE::AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) | 98 | AppletOE::AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) |
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 5b6dfb48f..6e7438580 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -27,14 +27,14 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) { | |||
| 27 | IPC::ResponseBuilder rb{ctx, 4}; | 27 | IPC::ResponseBuilder rb{ctx, 4}; |
| 28 | rb.Push(RESULT_SUCCESS); | 28 | rb.Push(RESULT_SUCCESS); |
| 29 | rb.Push<u64>(0); | 29 | rb.Push<u64>(0); |
| 30 | NGLOG_WARNING(Service_AOC, "(STUBBED) called"); | 30 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { | 33 | void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { |
| 34 | IPC::ResponseBuilder rb{ctx, 4}; | 34 | IPC::ResponseBuilder rb{ctx, 4}; |
| 35 | rb.Push(RESULT_SUCCESS); | 35 | rb.Push(RESULT_SUCCESS); |
| 36 | rb.Push<u64>(0); | 36 | rb.Push<u64>(0); |
| 37 | NGLOG_WARNING(Service_AOC, "(STUBBED) called"); | 37 | LOG_WARNING(Service_AOC, "(STUBBED) called"); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 40 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
diff --git a/src/core/hle/service/apm/interface.cpp b/src/core/hle/service/apm/interface.cpp index 3a03188ce..cf43949ec 100644 --- a/src/core/hle/service/apm/interface.cpp +++ b/src/core/hle/service/apm/interface.cpp | |||
| @@ -29,7 +29,7 @@ private: | |||
| 29 | IPC::ResponseBuilder rb{ctx, 2}; | 29 | IPC::ResponseBuilder rb{ctx, 2}; |
| 30 | rb.Push(RESULT_SUCCESS); | 30 | rb.Push(RESULT_SUCCESS); |
| 31 | 31 | ||
| 32 | NGLOG_WARNING(Service_APM, "(STUBBED) called mode={} config={}", static_cast<u32>(mode), | 32 | LOG_WARNING(Service_APM, "(STUBBED) called mode={} config={}", static_cast<u32>(mode), |
| 33 | config); | 33 | config); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| @@ -42,7 +42,7 @@ private: | |||
| 42 | rb.Push(RESULT_SUCCESS); | 42 | rb.Push(RESULT_SUCCESS); |
| 43 | rb.Push<u32>(0); // Performance configuration | 43 | rb.Push<u32>(0); // Performance configuration |
| 44 | 44 | ||
| 45 | NGLOG_WARNING(Service_APM, "(STUBBED) called mode={}", static_cast<u32>(mode)); | 45 | LOG_WARNING(Service_APM, "(STUBBED) called mode={}", static_cast<u32>(mode)); |
| 46 | } | 46 | } |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 402eaa306..1b4b649d8 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -60,14 +60,14 @@ public: | |||
| 60 | 60 | ||
| 61 | private: | 61 | private: |
| 62 | void GetAudioOutState(Kernel::HLERequestContext& ctx) { | 62 | void GetAudioOutState(Kernel::HLERequestContext& ctx) { |
| 63 | NGLOG_DEBUG(Service_Audio, "called"); | 63 | LOG_DEBUG(Service_Audio, "called"); |
| 64 | IPC::ResponseBuilder rb{ctx, 3}; | 64 | IPC::ResponseBuilder rb{ctx, 3}; |
| 65 | rb.Push(RESULT_SUCCESS); | 65 | rb.Push(RESULT_SUCCESS); |
| 66 | rb.Push(static_cast<u32>(audio_out_state)); | 66 | rb.Push(static_cast<u32>(audio_out_state)); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void StartAudioOut(Kernel::HLERequestContext& ctx) { | 69 | void StartAudioOut(Kernel::HLERequestContext& ctx) { |
| 70 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 70 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 71 | 71 | ||
| 72 | // Start audio | 72 | // Start audio |
| 73 | audio_out_state = AudioState::Started; | 73 | audio_out_state = AudioState::Started; |
| @@ -77,7 +77,7 @@ private: | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void StopAudioOut(Kernel::HLERequestContext& ctx) { | 79 | void StopAudioOut(Kernel::HLERequestContext& ctx) { |
| 80 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 80 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 81 | 81 | ||
| 82 | // Stop audio | 82 | // Stop audio |
| 83 | audio_out_state = AudioState::Stopped; | 83 | audio_out_state = AudioState::Stopped; |
| @@ -89,7 +89,7 @@ private: | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { | 91 | void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { |
| 92 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 92 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 93 | 93 | ||
| 94 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 94 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 95 | rb.Push(RESULT_SUCCESS); | 95 | rb.Push(RESULT_SUCCESS); |
| @@ -97,7 +97,7 @@ private: | |||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) { | 99 | void AppendAudioOutBuffer(Kernel::HLERequestContext& ctx) { |
| 100 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 100 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 101 | IPC::RequestParser rp{ctx}; | 101 | IPC::RequestParser rp{ctx}; |
| 102 | 102 | ||
| 103 | const u64 key{rp.Pop<u64>()}; | 103 | const u64 key{rp.Pop<u64>()}; |
| @@ -108,7 +108,7 @@ private: | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void GetReleasedAudioOutBuffer(Kernel::HLERequestContext& ctx) { | 110 | void GetReleasedAudioOutBuffer(Kernel::HLERequestContext& ctx) { |
| 111 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 111 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 112 | 112 | ||
| 113 | // TODO(st4rk): This is how libtransistor currently implements the | 113 | // TODO(st4rk): This is how libtransistor currently implements the |
| 114 | // GetReleasedAudioOutBuffer, it should return the key (a VAddr) to the app and this address | 114 | // GetReleasedAudioOutBuffer, it should return the key (a VAddr) to the app and this address |
| @@ -164,7 +164,7 @@ private: | |||
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { | 166 | void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { |
| 167 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 167 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 168 | IPC::RequestParser rp{ctx}; | 168 | IPC::RequestParser rp{ctx}; |
| 169 | 169 | ||
| 170 | const std::string audio_interface = "AudioInterface"; | 170 | const std::string audio_interface = "AudioInterface"; |
| @@ -180,7 +180,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) { | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { | 182 | void AudOutU::OpenAudioOut(Kernel::HLERequestContext& ctx) { |
| 183 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 183 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 184 | 184 | ||
| 185 | if (!audio_out_interface) { | 185 | if (!audio_out_interface) { |
| 186 | audio_out_interface = std::make_shared<IAudioOut>(); | 186 | audio_out_interface = std::make_shared<IAudioOut>(); |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 3dfb3fb52..e62372cb4 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -91,7 +91,7 @@ private: | |||
| 91 | IPC::ResponseBuilder rb{ctx, 2}; | 91 | IPC::ResponseBuilder rb{ctx, 2}; |
| 92 | rb.Push(RESULT_SUCCESS); | 92 | rb.Push(RESULT_SUCCESS); |
| 93 | 93 | ||
| 94 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 94 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | void StartAudioRenderer(Kernel::HLERequestContext& ctx) { | 97 | void StartAudioRenderer(Kernel::HLERequestContext& ctx) { |
| @@ -99,7 +99,7 @@ private: | |||
| 99 | 99 | ||
| 100 | rb.Push(RESULT_SUCCESS); | 100 | rb.Push(RESULT_SUCCESS); |
| 101 | 101 | ||
| 102 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 102 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | void StopAudioRenderer(Kernel::HLERequestContext& ctx) { | 105 | void StopAudioRenderer(Kernel::HLERequestContext& ctx) { |
| @@ -107,7 +107,7 @@ private: | |||
| 107 | 107 | ||
| 108 | rb.Push(RESULT_SUCCESS); | 108 | rb.Push(RESULT_SUCCESS); |
| 109 | 109 | ||
| 110 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 110 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | void QuerySystemEvent(Kernel::HLERequestContext& ctx) { | 113 | void QuerySystemEvent(Kernel::HLERequestContext& ctx) { |
| @@ -117,7 +117,7 @@ private: | |||
| 117 | rb.Push(RESULT_SUCCESS); | 117 | rb.Push(RESULT_SUCCESS); |
| 118 | rb.PushCopyObjects(system_event); | 118 | rb.PushCopyObjects(system_event); |
| 119 | 119 | ||
| 120 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 120 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | enum class MemoryPoolStates : u32 { // Should be LE | 123 | enum class MemoryPoolStates : u32 { // Should be LE |
| @@ -208,7 +208,7 @@ public: | |||
| 208 | 208 | ||
| 209 | private: | 209 | private: |
| 210 | void ListAudioDeviceName(Kernel::HLERequestContext& ctx) { | 210 | void ListAudioDeviceName(Kernel::HLERequestContext& ctx) { |
| 211 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 211 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 212 | IPC::RequestParser rp{ctx}; | 212 | IPC::RequestParser rp{ctx}; |
| 213 | 213 | ||
| 214 | const std::string audio_interface = "AudioInterface"; | 214 | const std::string audio_interface = "AudioInterface"; |
| @@ -220,7 +220,7 @@ private: | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | void SetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { | 222 | void SetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { |
| 223 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 223 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 224 | 224 | ||
| 225 | IPC::RequestParser rp{ctx}; | 225 | IPC::RequestParser rp{ctx}; |
| 226 | f32 volume = static_cast<f32>(rp.Pop<u32>()); | 226 | f32 volume = static_cast<f32>(rp.Pop<u32>()); |
| @@ -233,7 +233,7 @@ private: | |||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) { | 235 | void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) { |
| 236 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 236 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 237 | IPC::RequestParser rp{ctx}; | 237 | IPC::RequestParser rp{ctx}; |
| 238 | 238 | ||
| 239 | const std::string audio_interface = "AudioDevice"; | 239 | const std::string audio_interface = "AudioDevice"; |
| @@ -245,7 +245,7 @@ private: | |||
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { | 247 | void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { |
| 248 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 248 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 249 | 249 | ||
| 250 | buffer_event->Signal(); | 250 | buffer_event->Signal(); |
| 251 | 251 | ||
| @@ -255,7 +255,7 @@ private: | |||
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { | 257 | void GetActiveChannelCount(Kernel::HLERequestContext& ctx) { |
| 258 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 258 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 259 | IPC::ResponseBuilder rb{ctx, 3}; | 259 | IPC::ResponseBuilder rb{ctx, 3}; |
| 260 | rb.Push(RESULT_SUCCESS); | 260 | rb.Push(RESULT_SUCCESS); |
| 261 | rb.Push<u32>(1); | 261 | rb.Push<u32>(1); |
| @@ -284,7 +284,7 @@ void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) { | |||
| 284 | rb.Push(RESULT_SUCCESS); | 284 | rb.Push(RESULT_SUCCESS); |
| 285 | rb.PushIpcInterface<Audio::IAudioRenderer>(std::move(params)); | 285 | rb.PushIpcInterface<Audio::IAudioRenderer>(std::move(params)); |
| 286 | 286 | ||
| 287 | NGLOG_DEBUG(Service_Audio, "called"); | 287 | LOG_DEBUG(Service_Audio, "called"); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) { | 290 | void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) { |
| @@ -343,7 +343,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) { | |||
| 343 | rb.Push(RESULT_SUCCESS); | 343 | rb.Push(RESULT_SUCCESS); |
| 344 | rb.Push<u64>(output_sz); | 344 | rb.Push<u64>(output_sz); |
| 345 | 345 | ||
| 346 | NGLOG_DEBUG(Service_Audio, "called, buffer_size=0x{:X}", output_sz); | 346 | LOG_DEBUG(Service_Audio, "called, buffer_size=0x{:X}", output_sz); |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) { | 349 | void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) { |
| @@ -352,7 +352,7 @@ void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) { | |||
| 352 | rb.Push(RESULT_SUCCESS); | 352 | rb.Push(RESULT_SUCCESS); |
| 353 | rb.PushIpcInterface<Audio::IAudioDevice>(); | 353 | rb.PushIpcInterface<Audio::IAudioDevice>(); |
| 354 | 354 | ||
| 355 | NGLOG_DEBUG(Service_Audio, "called"); | 355 | LOG_DEBUG(Service_Audio, "called"); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | bool AudRenU::IsFeatureSupported(AudioFeatures feature, u32_le revision) const { | 358 | bool AudRenU::IsFeatureSupported(AudioFeatures feature, u32_le revision) const { |
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 7790359e9..844df382c 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | namespace Service::Audio { | 10 | namespace Service::Audio { |
| 11 | 11 | ||
| 12 | void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { | 12 | void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { |
| 13 | NGLOG_WARNING(Service_Audio, "(STUBBED) called"); | 13 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 14 | IPC::ResponseBuilder rb{ctx, 3}; | 14 | IPC::ResponseBuilder rb{ctx, 3}; |
| 15 | rb.Push(RESULT_SUCCESS); | 15 | rb.Push(RESULT_SUCCESS); |
| 16 | rb.Push<u32>(0x4000); | 16 | rb.Push<u32>(0x4000); |
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index 52be9db22..35e024c3d 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp | |||
| @@ -36,7 +36,7 @@ void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) { | |||
| 36 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 36 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 37 | rb.Push(RESULT_SUCCESS); | 37 | rb.Push(RESULT_SUCCESS); |
| 38 | rb.PushIpcInterface<IBcatService>(); | 38 | rb.PushIpcInterface<IBcatService>(); |
| 39 | NGLOG_DEBUG(Service_BCAT, "called"); | 39 | LOG_DEBUG(Service_BCAT, "called"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | 42 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp index 2d4282209..299b9474f 100644 --- a/src/core/hle/service/fatal/fatal.cpp +++ b/src/core/hle/service/fatal/fatal.cpp | |||
| @@ -16,13 +16,13 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | |||
| 16 | void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { | 16 | void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { |
| 17 | IPC::RequestParser rp(ctx); | 17 | IPC::RequestParser rp(ctx); |
| 18 | u32 error_code = rp.Pop<u32>(); | 18 | u32 error_code = rp.Pop<u32>(); |
| 19 | NGLOG_WARNING(Service_Fatal, "(STUBBED) called, error_code=0x{:X}", error_code); | 19 | LOG_WARNING(Service_Fatal, "(STUBBED) called, error_code=0x{:X}", error_code); |
| 20 | IPC::ResponseBuilder rb{ctx, 2}; | 20 | IPC::ResponseBuilder rb{ctx, 2}; |
| 21 | rb.Push(RESULT_SUCCESS); | 21 | rb.Push(RESULT_SUCCESS); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { | 24 | void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { |
| 25 | NGLOG_WARNING(Service_Fatal, "(STUBBED) called"); | 25 | LOG_WARNING(Service_Fatal, "(STUBBED) called"); |
| 26 | IPC::ResponseBuilder rb{ctx, 2}; | 26 | IPC::ResponseBuilder rb{ctx, 2}; |
| 27 | rb.Push(RESULT_SUCCESS); | 27 | rb.Push(RESULT_SUCCESS); |
| 28 | } | 28 | } |
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 68d1c90a5..8046aa5de 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp | |||
| @@ -25,14 +25,14 @@ ResultCode RegisterFileSystem(std::unique_ptr<FileSys::FileSystemFactory>&& fact | |||
| 25 | ASSERT_MSG(inserted, "Tried to register more than one system with same id code"); | 25 | ASSERT_MSG(inserted, "Tried to register more than one system with same id code"); |
| 26 | 26 | ||
| 27 | auto& filesystem = result.first->second; | 27 | auto& filesystem = result.first->second; |
| 28 | NGLOG_DEBUG(Service_FS, "Registered file system {} with id code 0x{:08X}", | 28 | LOG_DEBUG(Service_FS, "Registered file system {} with id code 0x{:08X}", |
| 29 | filesystem->GetName(), static_cast<u32>(type)); | 29 | filesystem->GetName(), static_cast<u32>(type)); |
| 30 | return RESULT_SUCCESS; | 30 | return RESULT_SUCCESS; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenFileSystem(Type type, | 33 | ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenFileSystem(Type type, |
| 34 | FileSys::Path& path) { | 34 | FileSys::Path& path) { |
| 35 | NGLOG_TRACE(Service_FS, "Opening FileSystem with type={}", static_cast<u32>(type)); | 35 | LOG_TRACE(Service_FS, "Opening FileSystem with type={}", static_cast<u32>(type)); |
| 36 | 36 | ||
| 37 | auto itr = filesystem_map.find(type); | 37 | auto itr = filesystem_map.find(type); |
| 38 | if (itr == filesystem_map.end()) { | 38 | if (itr == filesystem_map.end()) { |
| @@ -44,7 +44,7 @@ ResultVal<std::unique_ptr<FileSys::FileSystemBackend>> OpenFileSystem(Type type, | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | ResultCode FormatFileSystem(Type type) { | 46 | ResultCode FormatFileSystem(Type type) { |
| 47 | NGLOG_TRACE(Service_FS, "Formatting FileSystem with type={}", static_cast<u32>(type)); | 47 | LOG_TRACE(Service_FS, "Formatting FileSystem with type={}", static_cast<u32>(type)); |
| 48 | 48 | ||
| 49 | auto itr = filesystem_map.find(type); | 49 | auto itr = filesystem_map.find(type); |
| 50 | if (itr == filesystem_map.end()) { | 50 | if (itr == filesystem_map.end()) { |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 1cf97e876..216bfea0a 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -36,7 +36,7 @@ private: | |||
| 36 | const s64 offset = rp.Pop<s64>(); | 36 | const s64 offset = rp.Pop<s64>(); |
| 37 | const s64 length = rp.Pop<s64>(); | 37 | const s64 length = rp.Pop<s64>(); |
| 38 | 38 | ||
| 39 | NGLOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); | 39 | LOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); |
| 40 | 40 | ||
| 41 | // Error checking | 41 | // Error checking |
| 42 | if (length < 0) { | 42 | if (length < 0) { |
| @@ -88,7 +88,7 @@ private: | |||
| 88 | const s64 offset = rp.Pop<s64>(); | 88 | const s64 offset = rp.Pop<s64>(); |
| 89 | const s64 length = rp.Pop<s64>(); | 89 | const s64 length = rp.Pop<s64>(); |
| 90 | 90 | ||
| 91 | NGLOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); | 91 | LOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); |
| 92 | 92 | ||
| 93 | // Error checking | 93 | // Error checking |
| 94 | if (length < 0) { | 94 | if (length < 0) { |
| @@ -125,7 +125,7 @@ private: | |||
| 125 | const s64 offset = rp.Pop<s64>(); | 125 | const s64 offset = rp.Pop<s64>(); |
| 126 | const s64 length = rp.Pop<s64>(); | 126 | const s64 length = rp.Pop<s64>(); |
| 127 | 127 | ||
| 128 | NGLOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); | 128 | LOG_DEBUG(Service_FS, "called, offset=0x{:X}, length={}", offset, length); |
| 129 | 129 | ||
| 130 | // Error checking | 130 | // Error checking |
| 131 | if (length < 0) { | 131 | if (length < 0) { |
| @@ -153,7 +153,7 @@ private: | |||
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | void Flush(Kernel::HLERequestContext& ctx) { | 155 | void Flush(Kernel::HLERequestContext& ctx) { |
| 156 | NGLOG_DEBUG(Service_FS, "called"); | 156 | LOG_DEBUG(Service_FS, "called"); |
| 157 | backend->Flush(); | 157 | backend->Flush(); |
| 158 | 158 | ||
| 159 | IPC::ResponseBuilder rb{ctx, 2}; | 159 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -164,7 +164,7 @@ private: | |||
| 164 | IPC::RequestParser rp{ctx}; | 164 | IPC::RequestParser rp{ctx}; |
| 165 | const u64 size = rp.Pop<u64>(); | 165 | const u64 size = rp.Pop<u64>(); |
| 166 | backend->SetSize(size); | 166 | backend->SetSize(size); |
| 167 | NGLOG_DEBUG(Service_FS, "called, size={}", size); | 167 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 168 | 168 | ||
| 169 | IPC::ResponseBuilder rb{ctx, 2}; | 169 | IPC::ResponseBuilder rb{ctx, 2}; |
| 170 | rb.Push(RESULT_SUCCESS); | 170 | rb.Push(RESULT_SUCCESS); |
| @@ -172,7 +172,7 @@ private: | |||
| 172 | 172 | ||
| 173 | void GetSize(Kernel::HLERequestContext& ctx) { | 173 | void GetSize(Kernel::HLERequestContext& ctx) { |
| 174 | const u64 size = backend->GetSize(); | 174 | const u64 size = backend->GetSize(); |
| 175 | NGLOG_DEBUG(Service_FS, "called, size={}", size); | 175 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 176 | 176 | ||
| 177 | IPC::ResponseBuilder rb{ctx, 4}; | 177 | IPC::ResponseBuilder rb{ctx, 4}; |
| 178 | rb.Push(RESULT_SUCCESS); | 178 | rb.Push(RESULT_SUCCESS); |
| @@ -198,7 +198,7 @@ private: | |||
| 198 | IPC::RequestParser rp{ctx}; | 198 | IPC::RequestParser rp{ctx}; |
| 199 | const u64 unk = rp.Pop<u64>(); | 199 | const u64 unk = rp.Pop<u64>(); |
| 200 | 200 | ||
| 201 | NGLOG_DEBUG(Service_FS, "called, unk=0x{:X}", unk); | 201 | LOG_DEBUG(Service_FS, "called, unk=0x{:X}", unk); |
| 202 | 202 | ||
| 203 | // Calculate how many entries we can fit in the output buffer | 203 | // Calculate how many entries we can fit in the output buffer |
| 204 | u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry); | 204 | u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry); |
| @@ -220,7 +220,7 @@ private: | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | void GetEntryCount(Kernel::HLERequestContext& ctx) { | 222 | void GetEntryCount(Kernel::HLERequestContext& ctx) { |
| 223 | NGLOG_DEBUG(Service_FS, "called"); | 223 | LOG_DEBUG(Service_FS, "called"); |
| 224 | 224 | ||
| 225 | u64 count = backend->GetEntryCount(); | 225 | u64 count = backend->GetEntryCount(); |
| 226 | 226 | ||
| @@ -264,7 +264,7 @@ public: | |||
| 264 | u64 mode = rp.Pop<u64>(); | 264 | u64 mode = rp.Pop<u64>(); |
| 265 | u32 size = rp.Pop<u32>(); | 265 | u32 size = rp.Pop<u32>(); |
| 266 | 266 | ||
| 267 | NGLOG_DEBUG(Service_FS, "called file {} mode 0x{:X} size 0x{:08X}", name, mode, size); | 267 | LOG_DEBUG(Service_FS, "called file {} mode 0x{:X} size 0x{:08X}", name, mode, size); |
| 268 | 268 | ||
| 269 | IPC::ResponseBuilder rb{ctx, 2}; | 269 | IPC::ResponseBuilder rb{ctx, 2}; |
| 270 | rb.Push(backend->CreateFile(name, size)); | 270 | rb.Push(backend->CreateFile(name, size)); |
| @@ -276,7 +276,7 @@ public: | |||
| 276 | auto file_buffer = ctx.ReadBuffer(); | 276 | auto file_buffer = ctx.ReadBuffer(); |
| 277 | std::string name = Common::StringFromBuffer(file_buffer); | 277 | std::string name = Common::StringFromBuffer(file_buffer); |
| 278 | 278 | ||
| 279 | NGLOG_DEBUG(Service_FS, "called file {}", name); | 279 | LOG_DEBUG(Service_FS, "called file {}", name); |
| 280 | 280 | ||
| 281 | IPC::ResponseBuilder rb{ctx, 2}; | 281 | IPC::ResponseBuilder rb{ctx, 2}; |
| 282 | rb.Push(backend->DeleteFile(name)); | 282 | rb.Push(backend->DeleteFile(name)); |
| @@ -288,7 +288,7 @@ public: | |||
| 288 | auto file_buffer = ctx.ReadBuffer(); | 288 | auto file_buffer = ctx.ReadBuffer(); |
| 289 | std::string name = Common::StringFromBuffer(file_buffer); | 289 | std::string name = Common::StringFromBuffer(file_buffer); |
| 290 | 290 | ||
| 291 | NGLOG_DEBUG(Service_FS, "called directory {}", name); | 291 | LOG_DEBUG(Service_FS, "called directory {}", name); |
| 292 | 292 | ||
| 293 | IPC::ResponseBuilder rb{ctx, 2}; | 293 | IPC::ResponseBuilder rb{ctx, 2}; |
| 294 | rb.Push(backend->CreateDirectory(name)); | 294 | rb.Push(backend->CreateDirectory(name)); |
| @@ -306,7 +306,7 @@ public: | |||
| 306 | Memory::ReadBlock(ctx.BufferDescriptorX()[1].Address(), buffer.data(), buffer.size()); | 306 | Memory::ReadBlock(ctx.BufferDescriptorX()[1].Address(), buffer.data(), buffer.size()); |
| 307 | std::string dst_name = Common::StringFromBuffer(buffer); | 307 | std::string dst_name = Common::StringFromBuffer(buffer); |
| 308 | 308 | ||
| 309 | NGLOG_DEBUG(Service_FS, "called file '{}' to file '{}'", src_name, dst_name); | 309 | LOG_DEBUG(Service_FS, "called file '{}' to file '{}'", src_name, dst_name); |
| 310 | 310 | ||
| 311 | IPC::ResponseBuilder rb{ctx, 2}; | 311 | IPC::ResponseBuilder rb{ctx, 2}; |
| 312 | rb.Push(backend->RenameFile(src_name, dst_name)); | 312 | rb.Push(backend->RenameFile(src_name, dst_name)); |
| @@ -320,7 +320,7 @@ public: | |||
| 320 | 320 | ||
| 321 | auto mode = static_cast<FileSys::Mode>(rp.Pop<u32>()); | 321 | auto mode = static_cast<FileSys::Mode>(rp.Pop<u32>()); |
| 322 | 322 | ||
| 323 | NGLOG_DEBUG(Service_FS, "called file {} mode {}", name, static_cast<u32>(mode)); | 323 | LOG_DEBUG(Service_FS, "called file {} mode {}", name, static_cast<u32>(mode)); |
| 324 | 324 | ||
| 325 | auto result = backend->OpenFile(name, mode); | 325 | auto result = backend->OpenFile(name, mode); |
| 326 | if (result.Failed()) { | 326 | if (result.Failed()) { |
| @@ -345,7 +345,7 @@ public: | |||
| 345 | // TODO(Subv): Implement this filter. | 345 | // TODO(Subv): Implement this filter. |
| 346 | u32 filter_flags = rp.Pop<u32>(); | 346 | u32 filter_flags = rp.Pop<u32>(); |
| 347 | 347 | ||
| 348 | NGLOG_DEBUG(Service_FS, "called directory {} filter {}", name, filter_flags); | 348 | LOG_DEBUG(Service_FS, "called directory {} filter {}", name, filter_flags); |
| 349 | 349 | ||
| 350 | auto result = backend->OpenDirectory(name); | 350 | auto result = backend->OpenDirectory(name); |
| 351 | if (result.Failed()) { | 351 | if (result.Failed()) { |
| @@ -367,7 +367,7 @@ public: | |||
| 367 | auto file_buffer = ctx.ReadBuffer(); | 367 | auto file_buffer = ctx.ReadBuffer(); |
| 368 | std::string name = Common::StringFromBuffer(file_buffer); | 368 | std::string name = Common::StringFromBuffer(file_buffer); |
| 369 | 369 | ||
| 370 | NGLOG_DEBUG(Service_FS, "called file {}", name); | 370 | LOG_DEBUG(Service_FS, "called file {}", name); |
| 371 | 371 | ||
| 372 | auto result = backend->GetEntryType(name); | 372 | auto result = backend->GetEntryType(name); |
| 373 | if (result.Failed()) { | 373 | if (result.Failed()) { |
| @@ -382,7 +382,7 @@ public: | |||
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | void Commit(Kernel::HLERequestContext& ctx) { | 384 | void Commit(Kernel::HLERequestContext& ctx) { |
| 385 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 385 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 386 | 386 | ||
| 387 | IPC::ResponseBuilder rb{ctx, 2}; | 387 | IPC::ResponseBuilder rb{ctx, 2}; |
| 388 | rb.Push(RESULT_SUCCESS); | 388 | rb.Push(RESULT_SUCCESS); |
| @@ -498,14 +498,14 @@ void FSP_SRV::TryLoadRomFS() { | |||
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | void FSP_SRV::Initialize(Kernel::HLERequestContext& ctx) { | 500 | void FSP_SRV::Initialize(Kernel::HLERequestContext& ctx) { |
| 501 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 501 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 502 | 502 | ||
| 503 | IPC::ResponseBuilder rb{ctx, 2}; | 503 | IPC::ResponseBuilder rb{ctx, 2}; |
| 504 | rb.Push(RESULT_SUCCESS); | 504 | rb.Push(RESULT_SUCCESS); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | void FSP_SRV::MountSdCard(Kernel::HLERequestContext& ctx) { | 507 | void FSP_SRV::MountSdCard(Kernel::HLERequestContext& ctx) { |
| 508 | NGLOG_DEBUG(Service_FS, "called"); | 508 | LOG_DEBUG(Service_FS, "called"); |
| 509 | 509 | ||
| 510 | FileSys::Path unused; | 510 | FileSys::Path unused; |
| 511 | auto filesystem = OpenFileSystem(Type::SDMC, unused).Unwrap(); | 511 | auto filesystem = OpenFileSystem(Type::SDMC, unused).Unwrap(); |
| @@ -522,14 +522,14 @@ void FSP_SRV::CreateSaveData(Kernel::HLERequestContext& ctx) { | |||
| 522 | auto save_create_struct = rp.PopRaw<std::array<u8, 0x40>>(); | 522 | auto save_create_struct = rp.PopRaw<std::array<u8, 0x40>>(); |
| 523 | u128 uid = rp.PopRaw<u128>(); | 523 | u128 uid = rp.PopRaw<u128>(); |
| 524 | 524 | ||
| 525 | NGLOG_WARNING(Service_FS, "(STUBBED) called uid = {:016X}{:016X}", uid[1], uid[0]); | 525 | LOG_WARNING(Service_FS, "(STUBBED) called uid = {:016X}{:016X}", uid[1], uid[0]); |
| 526 | 526 | ||
| 527 | IPC::ResponseBuilder rb{ctx, 2}; | 527 | IPC::ResponseBuilder rb{ctx, 2}; |
| 528 | rb.Push(RESULT_SUCCESS); | 528 | rb.Push(RESULT_SUCCESS); |
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) { | 531 | void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) { |
| 532 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 532 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 533 | 533 | ||
| 534 | FileSys::Path unused; | 534 | FileSys::Path unused; |
| 535 | auto filesystem = OpenFileSystem(Type::SaveData, unused).Unwrap(); | 535 | auto filesystem = OpenFileSystem(Type::SaveData, unused).Unwrap(); |
| @@ -540,7 +540,7 @@ void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) { | |||
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 542 | void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { |
| 543 | NGLOG_WARNING(Service_FS, "(STUBBED) called"); | 543 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 544 | 544 | ||
| 545 | IPC::ResponseBuilder rb{ctx, 3}; | 545 | IPC::ResponseBuilder rb{ctx, 3}; |
| 546 | rb.Push(RESULT_SUCCESS); | 546 | rb.Push(RESULT_SUCCESS); |
| @@ -548,12 +548,12 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | 550 | void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { |
| 551 | NGLOG_DEBUG(Service_FS, "called"); | 551 | LOG_DEBUG(Service_FS, "called"); |
| 552 | 552 | ||
| 553 | TryLoadRomFS(); | 553 | TryLoadRomFS(); |
| 554 | if (!romfs) { | 554 | if (!romfs) { |
| 555 | // TODO (bunnei): Find the right error code to use here | 555 | // TODO (bunnei): Find the right error code to use here |
| 556 | NGLOG_CRITICAL(Service_FS, "no file system interface available!"); | 556 | LOG_CRITICAL(Service_FS, "no file system interface available!"); |
| 557 | IPC::ResponseBuilder rb{ctx, 2}; | 557 | IPC::ResponseBuilder rb{ctx, 2}; |
| 558 | rb.Push(ResultCode(-1)); | 558 | rb.Push(ResultCode(-1)); |
| 559 | return; | 559 | return; |
| @@ -562,7 +562,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 562 | // Attempt to open a StorageBackend interface to the RomFS | 562 | // Attempt to open a StorageBackend interface to the RomFS |
| 563 | auto storage = romfs->OpenFile({}, {}); | 563 | auto storage = romfs->OpenFile({}, {}); |
| 564 | if (storage.Failed()) { | 564 | if (storage.Failed()) { |
| 565 | NGLOG_CRITICAL(Service_FS, "no storage interface available!"); | 565 | LOG_CRITICAL(Service_FS, "no storage interface available!"); |
| 566 | IPC::ResponseBuilder rb{ctx, 2}; | 566 | IPC::ResponseBuilder rb{ctx, 2}; |
| 567 | rb.Push(storage.Code()); | 567 | rb.Push(storage.Code()); |
| 568 | return; | 568 | return; |
| @@ -574,7 +574,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | void FSP_SRV::OpenRomStorage(Kernel::HLERequestContext& ctx) { | 576 | void FSP_SRV::OpenRomStorage(Kernel::HLERequestContext& ctx) { |
| 577 | NGLOG_WARNING(Service_FS, "(STUBBED) called, using OpenDataStorageByCurrentProcess"); | 577 | LOG_WARNING(Service_FS, "(STUBBED) called, using OpenDataStorageByCurrentProcess"); |
| 578 | OpenDataStorageByCurrentProcess(ctx); | 578 | OpenDataStorageByCurrentProcess(ctx); |
| 579 | } | 579 | } |
| 580 | 580 | ||
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index 94d9fbf25..c98a46e05 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -13,7 +13,7 @@ namespace Service::Friend { | |||
| 13 | void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { | 13 | void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { |
| 14 | IPC::ResponseBuilder rb{ctx, 2}; | 14 | IPC::ResponseBuilder rb{ctx, 2}; |
| 15 | rb.Push(RESULT_SUCCESS); | 15 | rb.Push(RESULT_SUCCESS); |
| 16 | NGLOG_WARNING(Service_Friend, "(STUBBED) called"); | 16 | LOG_WARNING(Service_Friend, "(STUBBED) called"); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | 19 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 2696a8bf0..ebb8d13e6 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -53,7 +53,7 @@ private: | |||
| 53 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 53 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 54 | rb.Push(RESULT_SUCCESS); | 54 | rb.Push(RESULT_SUCCESS); |
| 55 | rb.PushCopyObjects(shared_mem); | 55 | rb.PushCopyObjects(shared_mem); |
| 56 | NGLOG_DEBUG(Service_HID, "called"); | 56 | LOG_DEBUG(Service_HID, "called"); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void LoadInputDevices() { | 59 | void LoadInputDevices() { |
| @@ -267,7 +267,7 @@ private: | |||
| 267 | void ActivateVibrationDevice(Kernel::HLERequestContext& ctx) { | 267 | void ActivateVibrationDevice(Kernel::HLERequestContext& ctx) { |
| 268 | IPC::ResponseBuilder rb{ctx, 2}; | 268 | IPC::ResponseBuilder rb{ctx, 2}; |
| 269 | rb.Push(RESULT_SUCCESS); | 269 | rb.Push(RESULT_SUCCESS); |
| 270 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 270 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 271 | } | 271 | } |
| 272 | }; | 272 | }; |
| 273 | 273 | ||
| @@ -399,144 +399,144 @@ private: | |||
| 399 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 399 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 400 | rb.Push(RESULT_SUCCESS); | 400 | rb.Push(RESULT_SUCCESS); |
| 401 | rb.PushIpcInterface<IAppletResource>(applet_resource); | 401 | rb.PushIpcInterface<IAppletResource>(applet_resource); |
| 402 | NGLOG_DEBUG(Service_HID, "called"); | 402 | LOG_DEBUG(Service_HID, "called"); |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | void ActivateDebugPad(Kernel::HLERequestContext& ctx) { | 405 | void ActivateDebugPad(Kernel::HLERequestContext& ctx) { |
| 406 | IPC::ResponseBuilder rb{ctx, 2}; | 406 | IPC::ResponseBuilder rb{ctx, 2}; |
| 407 | rb.Push(RESULT_SUCCESS); | 407 | rb.Push(RESULT_SUCCESS); |
| 408 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 408 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | void ActivateTouchScreen(Kernel::HLERequestContext& ctx) { | 411 | void ActivateTouchScreen(Kernel::HLERequestContext& ctx) { |
| 412 | IPC::ResponseBuilder rb{ctx, 2}; | 412 | IPC::ResponseBuilder rb{ctx, 2}; |
| 413 | rb.Push(RESULT_SUCCESS); | 413 | rb.Push(RESULT_SUCCESS); |
| 414 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 414 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | void ActivateMouse(Kernel::HLERequestContext& ctx) { | 417 | void ActivateMouse(Kernel::HLERequestContext& ctx) { |
| 418 | IPC::ResponseBuilder rb{ctx, 2}; | 418 | IPC::ResponseBuilder rb{ctx, 2}; |
| 419 | rb.Push(RESULT_SUCCESS); | 419 | rb.Push(RESULT_SUCCESS); |
| 420 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 420 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | void ActivateKeyboard(Kernel::HLERequestContext& ctx) { | 423 | void ActivateKeyboard(Kernel::HLERequestContext& ctx) { |
| 424 | IPC::ResponseBuilder rb{ctx, 2}; | 424 | IPC::ResponseBuilder rb{ctx, 2}; |
| 425 | rb.Push(RESULT_SUCCESS); | 425 | rb.Push(RESULT_SUCCESS); |
| 426 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 426 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | void StartSixAxisSensor(Kernel::HLERequestContext& ctx) { | 429 | void StartSixAxisSensor(Kernel::HLERequestContext& ctx) { |
| 430 | IPC::ResponseBuilder rb{ctx, 2}; | 430 | IPC::ResponseBuilder rb{ctx, 2}; |
| 431 | rb.Push(RESULT_SUCCESS); | 431 | rb.Push(RESULT_SUCCESS); |
| 432 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 432 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { | 435 | void SetGyroscopeZeroDriftMode(Kernel::HLERequestContext& ctx) { |
| 436 | IPC::ResponseBuilder rb{ctx, 2}; | 436 | IPC::ResponseBuilder rb{ctx, 2}; |
| 437 | rb.Push(RESULT_SUCCESS); | 437 | rb.Push(RESULT_SUCCESS); |
| 438 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 438 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 441 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { |
| 442 | IPC::ResponseBuilder rb{ctx, 2}; | 442 | IPC::ResponseBuilder rb{ctx, 2}; |
| 443 | rb.Push(RESULT_SUCCESS); | 443 | rb.Push(RESULT_SUCCESS); |
| 444 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 444 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | void GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 447 | void GetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { |
| 448 | IPC::ResponseBuilder rb{ctx, 3}; | 448 | IPC::ResponseBuilder rb{ctx, 3}; |
| 449 | rb.Push(RESULT_SUCCESS); | 449 | rb.Push(RESULT_SUCCESS); |
| 450 | rb.Push<u32>(0); | 450 | rb.Push<u32>(0); |
| 451 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 451 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | void SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) { | 454 | void SetSupportedNpadIdType(Kernel::HLERequestContext& ctx) { |
| 455 | IPC::ResponseBuilder rb{ctx, 2}; | 455 | IPC::ResponseBuilder rb{ctx, 2}; |
| 456 | rb.Push(RESULT_SUCCESS); | 456 | rb.Push(RESULT_SUCCESS); |
| 457 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 457 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | void ActivateNpad(Kernel::HLERequestContext& ctx) { | 460 | void ActivateNpad(Kernel::HLERequestContext& ctx) { |
| 461 | IPC::ResponseBuilder rb{ctx, 2}; | 461 | IPC::ResponseBuilder rb{ctx, 2}; |
| 462 | rb.Push(RESULT_SUCCESS); | 462 | rb.Push(RESULT_SUCCESS); |
| 463 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 463 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) { | 466 | void AcquireNpadStyleSetUpdateEventHandle(Kernel::HLERequestContext& ctx) { |
| 467 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 467 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 468 | rb.Push(RESULT_SUCCESS); | 468 | rb.Push(RESULT_SUCCESS); |
| 469 | rb.PushCopyObjects(event); | 469 | rb.PushCopyObjects(event); |
| 470 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 470 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | void GetPlayerLedPattern(Kernel::HLERequestContext& ctx) { | 473 | void GetPlayerLedPattern(Kernel::HLERequestContext& ctx) { |
| 474 | IPC::ResponseBuilder rb{ctx, 2}; | 474 | IPC::ResponseBuilder rb{ctx, 2}; |
| 475 | rb.Push(RESULT_SUCCESS); | 475 | rb.Push(RESULT_SUCCESS); |
| 476 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 476 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | 479 | void SetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { |
| 480 | IPC::ResponseBuilder rb{ctx, 2}; | 480 | IPC::ResponseBuilder rb{ctx, 2}; |
| 481 | rb.Push(RESULT_SUCCESS); | 481 | rb.Push(RESULT_SUCCESS); |
| 482 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 482 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | void GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { | 485 | void GetNpadJoyHoldType(Kernel::HLERequestContext& ctx) { |
| 486 | IPC::ResponseBuilder rb{ctx, 3}; | 486 | IPC::ResponseBuilder rb{ctx, 3}; |
| 487 | rb.Push(RESULT_SUCCESS); | 487 | rb.Push(RESULT_SUCCESS); |
| 488 | rb.Push(joy_hold_type); | 488 | rb.Push(joy_hold_type); |
| 489 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 489 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | void SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx) { | 492 | void SetNpadJoyAssignmentModeSingleByDefault(Kernel::HLERequestContext& ctx) { |
| 493 | IPC::ResponseBuilder rb{ctx, 2}; | 493 | IPC::ResponseBuilder rb{ctx, 2}; |
| 494 | rb.Push(RESULT_SUCCESS); | 494 | rb.Push(RESULT_SUCCESS); |
| 495 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 495 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | void SendVibrationValue(Kernel::HLERequestContext& ctx) { | 498 | void SendVibrationValue(Kernel::HLERequestContext& ctx) { |
| 499 | IPC::ResponseBuilder rb{ctx, 2}; | 499 | IPC::ResponseBuilder rb{ctx, 2}; |
| 500 | rb.Push(RESULT_SUCCESS); | 500 | rb.Push(RESULT_SUCCESS); |
| 501 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 501 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | void GetActualVibrationValue(Kernel::HLERequestContext& ctx) { | 504 | void GetActualVibrationValue(Kernel::HLERequestContext& ctx) { |
| 505 | IPC::ResponseBuilder rb{ctx, 2}; | 505 | IPC::ResponseBuilder rb{ctx, 2}; |
| 506 | rb.Push(RESULT_SUCCESS); | 506 | rb.Push(RESULT_SUCCESS); |
| 507 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 507 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 508 | } | 508 | } |
| 509 | 509 | ||
| 510 | void SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) { | 510 | void SetNpadJoyAssignmentModeDual(Kernel::HLERequestContext& ctx) { |
| 511 | IPC::ResponseBuilder rb{ctx, 2}; | 511 | IPC::ResponseBuilder rb{ctx, 2}; |
| 512 | rb.Push(RESULT_SUCCESS); | 512 | rb.Push(RESULT_SUCCESS); |
| 513 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 513 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 514 | } | 514 | } |
| 515 | 515 | ||
| 516 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | 516 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { |
| 517 | IPC::ResponseBuilder rb{ctx, 2}; | 517 | IPC::ResponseBuilder rb{ctx, 2}; |
| 518 | rb.Push(RESULT_SUCCESS); | 518 | rb.Push(RESULT_SUCCESS); |
| 519 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 519 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { | 522 | void GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { |
| 523 | IPC::ResponseBuilder rb{ctx, 4}; | 523 | IPC::ResponseBuilder rb{ctx, 4}; |
| 524 | rb.Push(RESULT_SUCCESS); | 524 | rb.Push(RESULT_SUCCESS); |
| 525 | rb.Push<u64>(0); | 525 | rb.Push<u64>(0); |
| 526 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 526 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { | 529 | void CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { |
| 530 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 530 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 531 | rb.Push(RESULT_SUCCESS); | 531 | rb.Push(RESULT_SUCCESS); |
| 532 | rb.PushIpcInterface<IActiveVibrationDeviceList>(); | 532 | rb.PushIpcInterface<IActiveVibrationDeviceList>(); |
| 533 | NGLOG_DEBUG(Service_HID, "called"); | 533 | LOG_DEBUG(Service_HID, "called"); |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | void SendVibrationValues(Kernel::HLERequestContext& ctx) { | 536 | void SendVibrationValues(Kernel::HLERequestContext& ctx) { |
| 537 | IPC::ResponseBuilder rb{ctx, 2}; | 537 | IPC::ResponseBuilder rb{ctx, 2}; |
| 538 | rb.Push(RESULT_SUCCESS); | 538 | rb.Push(RESULT_SUCCESS); |
| 539 | NGLOG_WARNING(Service_HID, "(STUBBED) called"); | 539 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 540 | } | 540 | } |
| 541 | }; | 541 | }; |
| 542 | 542 | ||
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 46194643e..e85a8bdb9 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp | |||
| @@ -141,19 +141,19 @@ private: | |||
| 141 | if (header.IsTailLog()) { | 141 | if (header.IsTailLog()) { |
| 142 | switch (header.severity) { | 142 | switch (header.severity) { |
| 143 | case MessageHeader::Severity::Trace: | 143 | case MessageHeader::Severity::Trace: |
| 144 | NGLOG_TRACE(Debug_Emulated, "{}", log_stream.str()); | 144 | LOG_TRACE(Debug_Emulated, "{}", log_stream.str()); |
| 145 | break; | 145 | break; |
| 146 | case MessageHeader::Severity::Info: | 146 | case MessageHeader::Severity::Info: |
| 147 | NGLOG_INFO(Debug_Emulated, "{}", log_stream.str()); | 147 | LOG_INFO(Debug_Emulated, "{}", log_stream.str()); |
| 148 | break; | 148 | break; |
| 149 | case MessageHeader::Severity::Warning: | 149 | case MessageHeader::Severity::Warning: |
| 150 | NGLOG_WARNING(Debug_Emulated, "{}", log_stream.str()); | 150 | LOG_WARNING(Debug_Emulated, "{}", log_stream.str()); |
| 151 | break; | 151 | break; |
| 152 | case MessageHeader::Severity::Error: | 152 | case MessageHeader::Severity::Error: |
| 153 | NGLOG_ERROR(Debug_Emulated, "{}", log_stream.str()); | 153 | LOG_ERROR(Debug_Emulated, "{}", log_stream.str()); |
| 154 | break; | 154 | break; |
| 155 | case MessageHeader::Severity::Critical: | 155 | case MessageHeader::Severity::Critical: |
| 156 | NGLOG_CRITICAL(Debug_Emulated, "{}", log_stream.str()); | 156 | LOG_CRITICAL(Debug_Emulated, "{}", log_stream.str()); |
| 157 | break; | 157 | break; |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
| @@ -178,7 +178,7 @@ void LM::Initialize(Kernel::HLERequestContext& ctx) { | |||
| 178 | rb.Push(RESULT_SUCCESS); | 178 | rb.Push(RESULT_SUCCESS); |
| 179 | rb.PushIpcInterface<Logger>(); | 179 | rb.PushIpcInterface<Logger>(); |
| 180 | 180 | ||
| 181 | NGLOG_DEBUG(Service_LM, "called"); | 181 | LOG_DEBUG(Service_LM, "called"); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | LM::LM() : ServiceFramework("lm") { | 184 | LM::LM() : ServiceFramework("lm") { |
diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp index b3a85b818..08f45b78a 100644 --- a/src/core/hle/service/mm/mm_u.cpp +++ b/src/core/hle/service/mm/mm_u.cpp | |||
| @@ -14,7 +14,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager) { | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | void MM_U::Initialize(Kernel::HLERequestContext& ctx) { | 16 | void MM_U::Initialize(Kernel::HLERequestContext& ctx) { |
| 17 | NGLOG_WARNING(Service_MM, "(STUBBED) called"); | 17 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 18 | IPC::ResponseBuilder rb{ctx, 2}; | 18 | IPC::ResponseBuilder rb{ctx, 2}; |
| 19 | rb.Push(RESULT_SUCCESS); | 19 | rb.Push(RESULT_SUCCESS); |
| 20 | } | 20 | } |
| @@ -25,13 +25,13 @@ void MM_U::SetAndWait(Kernel::HLERequestContext& ctx) { | |||
| 25 | max = rp.Pop<u32>(); | 25 | max = rp.Pop<u32>(); |
| 26 | current = min; | 26 | current = min; |
| 27 | 27 | ||
| 28 | NGLOG_WARNING(Service_MM, "(STUBBED) called, min=0x{:X}, max=0x{:X}", min, max); | 28 | LOG_WARNING(Service_MM, "(STUBBED) called, min=0x{:X}, max=0x{:X}", min, max); |
| 29 | IPC::ResponseBuilder rb{ctx, 2}; | 29 | IPC::ResponseBuilder rb{ctx, 2}; |
| 30 | rb.Push(RESULT_SUCCESS); | 30 | rb.Push(RESULT_SUCCESS); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void MM_U::Get(Kernel::HLERequestContext& ctx) { | 33 | void MM_U::Get(Kernel::HLERequestContext& ctx) { |
| 34 | NGLOG_WARNING(Service_MM, "(STUBBED) called"); | 34 | LOG_WARNING(Service_MM, "(STUBBED) called"); |
| 35 | IPC::ResponseBuilder rb{ctx, 3}; | 35 | IPC::ResponseBuilder rb{ctx, 3}; |
| 36 | rb.Push(RESULT_SUCCESS); | 36 | rb.Push(RESULT_SUCCESS); |
| 37 | rb.Push(current); | 37 | rb.Push(current); |
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 2a9f84037..56b05e9e8 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp | |||
| @@ -64,7 +64,7 @@ private: | |||
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | void Initialize(Kernel::HLERequestContext& ctx) { | 66 | void Initialize(Kernel::HLERequestContext& ctx) { |
| 67 | NGLOG_WARNING(Service_NFP, "(STUBBED) called"); | 67 | LOG_WARNING(Service_NFP, "(STUBBED) called"); |
| 68 | 68 | ||
| 69 | state = State::Initialized; | 69 | state = State::Initialized; |
| 70 | 70 | ||
| @@ -78,7 +78,7 @@ private: | |||
| 78 | 78 | ||
| 79 | ctx.WriteBuffer(&device_handle, sizeof(device_handle)); | 79 | ctx.WriteBuffer(&device_handle, sizeof(device_handle)); |
| 80 | 80 | ||
| 81 | NGLOG_WARNING(Service_NFP, "(STUBBED) called, array_size={}", array_size); | 81 | LOG_WARNING(Service_NFP, "(STUBBED) called, array_size={}", array_size); |
| 82 | 82 | ||
| 83 | IPC::ResponseBuilder rb{ctx, 3}; | 83 | IPC::ResponseBuilder rb{ctx, 3}; |
| 84 | rb.Push(RESULT_SUCCESS); | 84 | rb.Push(RESULT_SUCCESS); |
| @@ -88,7 +88,7 @@ private: | |||
| 88 | void AttachActivateEvent(Kernel::HLERequestContext& ctx) { | 88 | void AttachActivateEvent(Kernel::HLERequestContext& ctx) { |
| 89 | IPC::RequestParser rp{ctx}; | 89 | IPC::RequestParser rp{ctx}; |
| 90 | const u64 dev_handle = rp.Pop<u64>(); | 90 | const u64 dev_handle = rp.Pop<u64>(); |
| 91 | NGLOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); | 91 | LOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); |
| 92 | 92 | ||
| 93 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 93 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 94 | rb.Push(RESULT_SUCCESS); | 94 | rb.Push(RESULT_SUCCESS); |
| @@ -98,7 +98,7 @@ private: | |||
| 98 | void AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { | 98 | void AttachDeactivateEvent(Kernel::HLERequestContext& ctx) { |
| 99 | IPC::RequestParser rp{ctx}; | 99 | IPC::RequestParser rp{ctx}; |
| 100 | const u64 dev_handle = rp.Pop<u64>(); | 100 | const u64 dev_handle = rp.Pop<u64>(); |
| 101 | NGLOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); | 101 | LOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); |
| 102 | 102 | ||
| 103 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 103 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 104 | rb.Push(RESULT_SUCCESS); | 104 | rb.Push(RESULT_SUCCESS); |
| @@ -106,14 +106,14 @@ private: | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | void GetState(Kernel::HLERequestContext& ctx) { | 108 | void GetState(Kernel::HLERequestContext& ctx) { |
| 109 | NGLOG_WARNING(Service_NFP, "(STUBBED) called"); | 109 | LOG_WARNING(Service_NFP, "(STUBBED) called"); |
| 110 | IPC::ResponseBuilder rb{ctx, 3}; | 110 | IPC::ResponseBuilder rb{ctx, 3}; |
| 111 | rb.Push(RESULT_SUCCESS); | 111 | rb.Push(RESULT_SUCCESS); |
| 112 | rb.Push<u32>(static_cast<u32>(state)); | 112 | rb.Push<u32>(static_cast<u32>(state)); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | void GetDeviceState(Kernel::HLERequestContext& ctx) { | 115 | void GetDeviceState(Kernel::HLERequestContext& ctx) { |
| 116 | NGLOG_WARNING(Service_NFP, "(STUBBED) called"); | 116 | LOG_WARNING(Service_NFP, "(STUBBED) called"); |
| 117 | IPC::ResponseBuilder rb{ctx, 3}; | 117 | IPC::ResponseBuilder rb{ctx, 3}; |
| 118 | rb.Push(RESULT_SUCCESS); | 118 | rb.Push(RESULT_SUCCESS); |
| 119 | rb.Push<u32>(static_cast<u32>(device_state)); | 119 | rb.Push<u32>(static_cast<u32>(device_state)); |
| @@ -122,7 +122,7 @@ private: | |||
| 122 | void GetNpadId(Kernel::HLERequestContext& ctx) { | 122 | void GetNpadId(Kernel::HLERequestContext& ctx) { |
| 123 | IPC::RequestParser rp{ctx}; | 123 | IPC::RequestParser rp{ctx}; |
| 124 | const u64 dev_handle = rp.Pop<u64>(); | 124 | const u64 dev_handle = rp.Pop<u64>(); |
| 125 | NGLOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); | 125 | LOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); |
| 126 | IPC::ResponseBuilder rb{ctx, 3}; | 126 | IPC::ResponseBuilder rb{ctx, 3}; |
| 127 | rb.Push(RESULT_SUCCESS); | 127 | rb.Push(RESULT_SUCCESS); |
| 128 | rb.Push<u32>(npad_id); | 128 | rb.Push<u32>(npad_id); |
| @@ -131,7 +131,7 @@ private: | |||
| 131 | void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { | 131 | void AttachAvailabilityChangeEvent(Kernel::HLERequestContext& ctx) { |
| 132 | IPC::RequestParser rp{ctx}; | 132 | IPC::RequestParser rp{ctx}; |
| 133 | const u64 dev_handle = rp.Pop<u64>(); | 133 | const u64 dev_handle = rp.Pop<u64>(); |
| 134 | NGLOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); | 134 | LOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); |
| 135 | 135 | ||
| 136 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 136 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 137 | rb.Push(RESULT_SUCCESS); | 137 | rb.Push(RESULT_SUCCESS); |
| @@ -148,7 +148,7 @@ private: | |||
| 148 | }; | 148 | }; |
| 149 | 149 | ||
| 150 | void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) { | 150 | void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) { |
| 151 | NGLOG_DEBUG(Service_NFP, "called"); | 151 | LOG_DEBUG(Service_NFP, "called"); |
| 152 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 152 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 153 | rb.Push(RESULT_SUCCESS); | 153 | rb.Push(RESULT_SUCCESS); |
| 154 | rb.PushIpcInterface<IUser>(); | 154 | rb.PushIpcInterface<IUser>(); |
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 62489c7fe..54a151c26 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -62,33 +62,33 @@ public: | |||
| 62 | 62 | ||
| 63 | private: | 63 | private: |
| 64 | void GetRequestState(Kernel::HLERequestContext& ctx) { | 64 | void GetRequestState(Kernel::HLERequestContext& ctx) { |
| 65 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 65 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 66 | IPC::ResponseBuilder rb{ctx, 3}; | 66 | IPC::ResponseBuilder rb{ctx, 3}; |
| 67 | rb.Push(RESULT_SUCCESS); | 67 | rb.Push(RESULT_SUCCESS); |
| 68 | rb.Push<u32>(0); | 68 | rb.Push<u32>(0); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void GetResult(Kernel::HLERequestContext& ctx) { | 71 | void GetResult(Kernel::HLERequestContext& ctx) { |
| 72 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 72 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 73 | IPC::ResponseBuilder rb{ctx, 2}; | 73 | IPC::ResponseBuilder rb{ctx, 2}; |
| 74 | rb.Push(RESULT_SUCCESS); | 74 | rb.Push(RESULT_SUCCESS); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) { | 77 | void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) { |
| 78 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 78 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 79 | IPC::ResponseBuilder rb{ctx, 2, 2}; | 79 | IPC::ResponseBuilder rb{ctx, 2, 2}; |
| 80 | rb.Push(RESULT_SUCCESS); | 80 | rb.Push(RESULT_SUCCESS); |
| 81 | rb.PushCopyObjects(event1, event2); | 81 | rb.PushCopyObjects(event1, event2); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void Cancel(Kernel::HLERequestContext& ctx) { | 84 | void Cancel(Kernel::HLERequestContext& ctx) { |
| 85 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 85 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 86 | IPC::ResponseBuilder rb{ctx, 2}; | 86 | IPC::ResponseBuilder rb{ctx, 2}; |
| 87 | rb.Push(RESULT_SUCCESS); | 87 | rb.Push(RESULT_SUCCESS); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | void SetConnectionConfirmationOption(Kernel::HLERequestContext& ctx) { | 90 | void SetConnectionConfirmationOption(Kernel::HLERequestContext& ctx) { |
| 91 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 91 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 92 | IPC::ResponseBuilder rb{ctx, 2}; | 92 | IPC::ResponseBuilder rb{ctx, 2}; |
| 93 | rb.Push(RESULT_SUCCESS); | 93 | rb.Push(RESULT_SUCCESS); |
| 94 | } | 94 | } |
| @@ -114,7 +114,7 @@ public: | |||
| 114 | 114 | ||
| 115 | private: | 115 | private: |
| 116 | void GetClientId(Kernel::HLERequestContext& ctx) { | 116 | void GetClientId(Kernel::HLERequestContext& ctx) { |
| 117 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 117 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 118 | IPC::ResponseBuilder rb{ctx, 4}; | 118 | IPC::ResponseBuilder rb{ctx, 4}; |
| 119 | rb.Push(RESULT_SUCCESS); | 119 | rb.Push(RESULT_SUCCESS); |
| 120 | rb.Push<u64>(0); | 120 | rb.Push<u64>(0); |
| @@ -125,7 +125,7 @@ private: | |||
| 125 | rb.Push(RESULT_SUCCESS); | 125 | rb.Push(RESULT_SUCCESS); |
| 126 | rb.PushIpcInterface<IScanRequest>(); | 126 | rb.PushIpcInterface<IScanRequest>(); |
| 127 | 127 | ||
| 128 | NGLOG_DEBUG(Service_NIFM, "called"); | 128 | LOG_DEBUG(Service_NIFM, "called"); |
| 129 | } | 129 | } |
| 130 | void CreateRequest(Kernel::HLERequestContext& ctx) { | 130 | void CreateRequest(Kernel::HLERequestContext& ctx) { |
| 131 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 131 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -133,10 +133,10 @@ private: | |||
| 133 | rb.Push(RESULT_SUCCESS); | 133 | rb.Push(RESULT_SUCCESS); |
| 134 | rb.PushIpcInterface<IRequest>(); | 134 | rb.PushIpcInterface<IRequest>(); |
| 135 | 135 | ||
| 136 | NGLOG_DEBUG(Service_NIFM, "called"); | 136 | LOG_DEBUG(Service_NIFM, "called"); |
| 137 | } | 137 | } |
| 138 | void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { | 138 | void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { |
| 139 | NGLOG_WARNING(Service_NIFM, "(STUBBED) called"); | 139 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 140 | IPC::ResponseBuilder rb{ctx, 2}; | 140 | IPC::ResponseBuilder rb{ctx, 2}; |
| 141 | rb.Push(RESULT_SUCCESS); | 141 | rb.Push(RESULT_SUCCESS); |
| 142 | } | 142 | } |
| @@ -146,7 +146,7 @@ private: | |||
| 146 | rb.Push(RESULT_SUCCESS); | 146 | rb.Push(RESULT_SUCCESS); |
| 147 | rb.PushIpcInterface<INetworkProfile>(); | 147 | rb.PushIpcInterface<INetworkProfile>(); |
| 148 | 148 | ||
| 149 | NGLOG_DEBUG(Service_NIFM, "called"); | 149 | LOG_DEBUG(Service_NIFM, "called"); |
| 150 | } | 150 | } |
| 151 | }; | 151 | }; |
| 152 | 152 | ||
| @@ -196,14 +196,14 @@ void Module::Interface::CreateGeneralServiceOld(Kernel::HLERequestContext& ctx) | |||
| 196 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 196 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 197 | rb.Push(RESULT_SUCCESS); | 197 | rb.Push(RESULT_SUCCESS); |
| 198 | rb.PushIpcInterface<IGeneralService>(); | 198 | rb.PushIpcInterface<IGeneralService>(); |
| 199 | NGLOG_DEBUG(Service_NIFM, "called"); | 199 | LOG_DEBUG(Service_NIFM, "called"); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | void Module::Interface::CreateGeneralService(Kernel::HLERequestContext& ctx) { | 202 | void Module::Interface::CreateGeneralService(Kernel::HLERequestContext& ctx) { |
| 203 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 203 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 204 | rb.Push(RESULT_SUCCESS); | 204 | rb.Push(RESULT_SUCCESS); |
| 205 | rb.PushIpcInterface<IGeneralService>(); | 205 | rb.PushIpcInterface<IGeneralService>(); |
| 206 | NGLOG_DEBUG(Service_NIFM, "called"); | 206 | LOG_DEBUG(Service_NIFM, "called"); |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | 209 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index 636af9a1e..d6a12ede5 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp | |||
| @@ -52,7 +52,7 @@ PL_U::PL_U() : ServiceFramework("pl:u") { | |||
| 52 | ASSERT(file.GetSize() == SHARED_FONT_MEM_SIZE); | 52 | ASSERT(file.GetSize() == SHARED_FONT_MEM_SIZE); |
| 53 | file.ReadBytes(shared_font->data(), shared_font->size()); | 53 | file.ReadBytes(shared_font->data(), shared_font->size()); |
| 54 | } else { | 54 | } else { |
| 55 | NGLOG_WARNING(Service_NS, "Unable to load shared font: {}", filepath); | 55 | LOG_WARNING(Service_NS, "Unable to load shared font: {}", filepath); |
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | 58 | ||
| @@ -60,7 +60,7 @@ void PL_U::RequestLoad(Kernel::HLERequestContext& ctx) { | |||
| 60 | IPC::RequestParser rp{ctx}; | 60 | IPC::RequestParser rp{ctx}; |
| 61 | const u32 shared_font_type{rp.Pop<u32>()}; | 61 | const u32 shared_font_type{rp.Pop<u32>()}; |
| 62 | 62 | ||
| 63 | NGLOG_DEBUG(Service_NS, "called, shared_font_type={}", shared_font_type); | 63 | LOG_DEBUG(Service_NS, "called, shared_font_type={}", shared_font_type); |
| 64 | IPC::ResponseBuilder rb{ctx, 2}; | 64 | IPC::ResponseBuilder rb{ctx, 2}; |
| 65 | rb.Push(RESULT_SUCCESS); | 65 | rb.Push(RESULT_SUCCESS); |
| 66 | } | 66 | } |
| @@ -69,7 +69,7 @@ void PL_U::GetLoadState(Kernel::HLERequestContext& ctx) { | |||
| 69 | IPC::RequestParser rp{ctx}; | 69 | IPC::RequestParser rp{ctx}; |
| 70 | const u32 font_id{rp.Pop<u32>()}; | 70 | const u32 font_id{rp.Pop<u32>()}; |
| 71 | 71 | ||
| 72 | NGLOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 72 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| 73 | IPC::ResponseBuilder rb{ctx, 3}; | 73 | IPC::ResponseBuilder rb{ctx, 3}; |
| 74 | rb.Push(RESULT_SUCCESS); | 74 | rb.Push(RESULT_SUCCESS); |
| 75 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); | 75 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); |
| @@ -79,7 +79,7 @@ void PL_U::GetSize(Kernel::HLERequestContext& ctx) { | |||
| 79 | IPC::RequestParser rp{ctx}; | 79 | IPC::RequestParser rp{ctx}; |
| 80 | const u32 font_id{rp.Pop<u32>()}; | 80 | const u32 font_id{rp.Pop<u32>()}; |
| 81 | 81 | ||
| 82 | NGLOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 82 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| 83 | IPC::ResponseBuilder rb{ctx, 3}; | 83 | IPC::ResponseBuilder rb{ctx, 3}; |
| 84 | rb.Push(RESULT_SUCCESS); | 84 | rb.Push(RESULT_SUCCESS); |
| 85 | rb.Push<u32>(SHARED_FONT_REGIONS[font_id].size); | 85 | rb.Push<u32>(SHARED_FONT_REGIONS[font_id].size); |
| @@ -89,7 +89,7 @@ void PL_U::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { | |||
| 89 | IPC::RequestParser rp{ctx}; | 89 | IPC::RequestParser rp{ctx}; |
| 90 | const u32 font_id{rp.Pop<u32>()}; | 90 | const u32 font_id{rp.Pop<u32>()}; |
| 91 | 91 | ||
| 92 | NGLOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 92 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| 93 | IPC::ResponseBuilder rb{ctx, 3}; | 93 | IPC::ResponseBuilder rb{ctx, 3}; |
| 94 | rb.Push(RESULT_SUCCESS); | 94 | rb.Push(RESULT_SUCCESS); |
| 95 | rb.Push<u32>(SHARED_FONT_REGIONS[font_id].offset); | 95 | rb.Push<u32>(SHARED_FONT_REGIONS[font_id].offset); |
| @@ -110,7 +110,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | |||
| 110 | Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE, | 110 | Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE, |
| 111 | "PL_U:shared_font_mem"); | 111 | "PL_U:shared_font_mem"); |
| 112 | 112 | ||
| 113 | NGLOG_DEBUG(Service_NS, "called"); | 113 | LOG_DEBUG(Service_NS, "called"); |
| 114 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 114 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 115 | rb.Push(RESULT_SUCCESS); | 115 | rb.Push(RESULT_SUCCESS); |
| 116 | rb.PushCopyObjects(shared_font_mem); | 116 | rb.PushCopyObjects(shared_font_mem); |
| @@ -119,7 +119,7 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | |||
| 119 | void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { | 119 | void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { |
| 120 | IPC::RequestParser rp{ctx}; | 120 | IPC::RequestParser rp{ctx}; |
| 121 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for | 121 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for |
| 122 | NGLOG_DEBUG(Service_NS, "called, language_code=%lx", language_code); | 122 | LOG_DEBUG(Service_NS, "called, language_code=%lx", language_code); |
| 123 | IPC::ResponseBuilder rb{ctx, 4}; | 123 | IPC::ResponseBuilder rb{ctx, 4}; |
| 124 | std::vector<u32> font_codes; | 124 | std::vector<u32> font_codes; |
| 125 | std::vector<u32> font_offsets; | 125 | std::vector<u32> font_offsets; |
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index 103e66d0c..af216e521 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | |||
| @@ -20,7 +20,7 @@ u32 nvdisp_disp0::ioctl(Ioctl command, const std::vector<u8>& input, std::vector | |||
| 20 | void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, | 20 | void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, |
| 21 | u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) { | 21 | u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) { |
| 22 | VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); | 22 | VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); |
| 23 | NGLOG_WARNING(Service, | 23 | LOG_WARNING(Service, |
| 24 | "Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}", | 24 | "Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}", |
| 25 | addr, offset, width, height, stride, format); | 25 | addr, offset, width, height, stride, format); |
| 26 | 26 | ||
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 7d8ed6920..6b9a4f7c1 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | namespace Service::Nvidia::Devices { | 14 | namespace Service::Nvidia::Devices { |
| 15 | 15 | ||
| 16 | u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 16 | u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 17 | NGLOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", | 17 | LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", |
| 18 | command.raw, input.size(), output.size()); | 18 | command.raw, input.size(), output.size()); |
| 19 | 19 | ||
| 20 | switch (static_cast<IoctlCommand>(command.raw)) { | 20 | switch (static_cast<IoctlCommand>(command.raw)) { |
| @@ -42,14 +42,14 @@ u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vecto | |||
| 42 | u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& output) { | 42 | u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& output) { |
| 43 | IoctlInitalizeEx params{}; | 43 | IoctlInitalizeEx params{}; |
| 44 | std::memcpy(¶ms, input.data(), input.size()); | 44 | std::memcpy(¶ms, input.data(), input.size()); |
| 45 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size=0x{:X}", params.big_page_size); | 45 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size=0x{:X}", params.big_page_size); |
| 46 | return 0; | 46 | return 0; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | u32 nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<u8>& output) { | 49 | u32 nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<u8>& output) { |
| 50 | IoctlAllocSpace params{}; | 50 | IoctlAllocSpace params{}; |
| 51 | std::memcpy(¶ms, input.data(), input.size()); | 51 | std::memcpy(¶ms, input.data(), input.size()); |
| 52 | NGLOG_DEBUG(Service_NVDRV, "called, pages={:X}, page_size={:X}, flags={:X}", params.pages, | 52 | LOG_DEBUG(Service_NVDRV, "called, pages={:X}, page_size={:X}, flags={:X}", params.pages, |
| 53 | params.page_size, params.flags); | 53 | params.page_size, params.flags); |
| 54 | 54 | ||
| 55 | auto& gpu = Core::System::GetInstance().GPU(); | 55 | auto& gpu = Core::System::GetInstance().GPU(); |
| @@ -67,7 +67,7 @@ u32 nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<u8>& | |||
| 67 | u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output) { | 67 | u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output) { |
| 68 | size_t num_entries = input.size() / sizeof(IoctlRemapEntry); | 68 | size_t num_entries = input.size() / sizeof(IoctlRemapEntry); |
| 69 | 69 | ||
| 70 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, num_entries=0x{:X}", num_entries); | 70 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, num_entries=0x{:X}", num_entries); |
| 71 | 71 | ||
| 72 | std::vector<IoctlRemapEntry> entries(num_entries); | 72 | std::vector<IoctlRemapEntry> entries(num_entries); |
| 73 | std::memcpy(entries.data(), input.data(), input.size()); | 73 | std::memcpy(entries.data(), input.data(), input.size()); |
| @@ -75,7 +75,7 @@ u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 75 | auto& gpu = Core::System::GetInstance().GPU(); | 75 | auto& gpu = Core::System::GetInstance().GPU(); |
| 76 | 76 | ||
| 77 | for (const auto& entry : entries) { | 77 | for (const auto& entry : entries) { |
| 78 | NGLOG_WARNING(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", | 78 | LOG_WARNING(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", |
| 79 | entry.offset, entry.nvmap_handle, entry.pages); | 79 | entry.offset, entry.nvmap_handle, entry.pages); |
| 80 | Tegra::GPUVAddr offset = static_cast<Tegra::GPUVAddr>(entry.offset) << 0x10; | 80 | Tegra::GPUVAddr offset = static_cast<Tegra::GPUVAddr>(entry.offset) << 0x10; |
| 81 | 81 | ||
| @@ -98,7 +98,7 @@ u32 nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 98 | IoctlMapBufferEx params{}; | 98 | IoctlMapBufferEx params{}; |
| 99 | std::memcpy(¶ms, input.data(), input.size()); | 99 | std::memcpy(¶ms, input.data(), input.size()); |
| 100 | 100 | ||
| 101 | NGLOG_DEBUG(Service_NVDRV, | 101 | LOG_DEBUG(Service_NVDRV, |
| 102 | "called, flags={:X}, nvmap_handle={:X}, buffer_offset={}, mapping_size={}" | 102 | "called, flags={:X}, nvmap_handle={:X}, buffer_offset={}, mapping_size={}" |
| 103 | ", offset={}", | 103 | ", offset={}", |
| 104 | params.flags, params.nvmap_handle, params.buffer_offset, params.mapping_size, | 104 | params.flags, params.nvmap_handle, params.buffer_offset, params.mapping_size, |
| @@ -148,7 +148,7 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 148 | IoctlUnmapBuffer params{}; | 148 | IoctlUnmapBuffer params{}; |
| 149 | std::memcpy(¶ms, input.data(), input.size()); | 149 | std::memcpy(¶ms, input.data(), input.size()); |
| 150 | 150 | ||
| 151 | NGLOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); | 151 | LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); |
| 152 | 152 | ||
| 153 | auto& gpu = Core::System::GetInstance().GPU(); | 153 | auto& gpu = Core::System::GetInstance().GPU(); |
| 154 | 154 | ||
| @@ -170,7 +170,7 @@ u32 nvhost_as_gpu::UnmapBuffer(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 170 | u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& output) { | 170 | u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& output) { |
| 171 | IoctlBindChannel params{}; | 171 | IoctlBindChannel params{}; |
| 172 | std::memcpy(¶ms, input.data(), input.size()); | 172 | std::memcpy(¶ms, input.data(), input.size()); |
| 173 | NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); | 173 | LOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); |
| 174 | channel = params.fd; | 174 | channel = params.fd; |
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| @@ -178,7 +178,7 @@ u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 178 | u32 nvhost_as_gpu::GetVARegions(const std::vector<u8>& input, std::vector<u8>& output) { | 178 | u32 nvhost_as_gpu::GetVARegions(const std::vector<u8>& input, std::vector<u8>& output) { |
| 179 | IoctlGetVaRegions params{}; | 179 | IoctlGetVaRegions params{}; |
| 180 | std::memcpy(¶ms, input.data(), input.size()); | 180 | std::memcpy(¶ms, input.data(), input.size()); |
| 181 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr={:X}, buf_size={:X}", params.buf_addr, | 181 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr={:X}, buf_size={:X}", params.buf_addr, |
| 182 | params.buf_size); | 182 | params.buf_size); |
| 183 | 183 | ||
| 184 | params.buf_size = 0x30; | 184 | params.buf_size = 0x30; |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 7872d1e09..b7d8233ad 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | namespace Service::Nvidia::Devices { | 9 | namespace Service::Nvidia::Devices { |
| 10 | 10 | ||
| 11 | u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 11 | u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 12 | NGLOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", | 12 | LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", |
| 13 | command.raw, input.size(), output.size()); | 13 | command.raw, input.size(), output.size()); |
| 14 | 14 | ||
| 15 | switch (static_cast<IoctlCommand>(command.raw)) { | 15 | switch (static_cast<IoctlCommand>(command.raw)) { |
| @@ -29,7 +29,7 @@ u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector< | |||
| 29 | u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output) { | 29 | u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output) { |
| 30 | IocGetConfigParams params{}; | 30 | IocGetConfigParams params{}; |
| 31 | std::memcpy(¶ms, input.data(), sizeof(params)); | 31 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 32 | NGLOG_DEBUG(Service_NVDRV, "called, setting={}!{}", params.domain_str.data(), | 32 | LOG_DEBUG(Service_NVDRV, "called, setting={}!{}", params.domain_str.data(), |
| 33 | params.param_str.data()); | 33 | params.param_str.data()); |
| 34 | 34 | ||
| 35 | if (!strcmp(params.domain_str.data(), "nv")) { | 35 | if (!strcmp(params.domain_str.data(), "nv")) { |
| @@ -53,7 +53,7 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& | |||
| 53 | bool is_async) { | 53 | bool is_async) { |
| 54 | IocCtrlEventWaitParams params{}; | 54 | IocCtrlEventWaitParams params{}; |
| 55 | std::memcpy(¶ms, input.data(), sizeof(params)); | 55 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 56 | NGLOG_WARNING(Service_NVDRV, | 56 | LOG_WARNING(Service_NVDRV, |
| 57 | "(STUBBED) called, syncpt_id={}, threshold={}, timeout={}, is_async={}", | 57 | "(STUBBED) called, syncpt_id={}, threshold={}, timeout={}, is_async={}", |
| 58 | params.syncpt_id, params.threshold, params.timeout, is_async); | 58 | params.syncpt_id, params.threshold, params.timeout, is_async); |
| 59 | 59 | ||
| @@ -64,7 +64,7 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | u32 nvhost_ctrl::IocCtrlEventRegister(const std::vector<u8>& input, std::vector<u8>& output) { | 66 | u32 nvhost_ctrl::IocCtrlEventRegister(const std::vector<u8>& input, std::vector<u8>& output) { |
| 67 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 67 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 68 | // TODO(bunnei): Implement this. | 68 | // TODO(bunnei): Implement this. |
| 69 | return 0; | 69 | return 0; |
| 70 | } | 70 | } |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 0abc0de83..b595d6e83 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | namespace Service::Nvidia::Devices { | 10 | namespace Service::Nvidia::Devices { |
| 11 | 11 | ||
| 12 | u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 12 | u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 13 | NGLOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", | 13 | LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", |
| 14 | command.raw, input.size(), output.size()); | 14 | command.raw, input.size(), output.size()); |
| 15 | 15 | ||
| 16 | switch (static_cast<IoctlCommand>(command.raw)) { | 16 | switch (static_cast<IoctlCommand>(command.raw)) { |
| @@ -36,7 +36,7 @@ u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vec | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output) { | 38 | u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output) { |
| 39 | NGLOG_DEBUG(Service_NVDRV, "called"); | 39 | LOG_DEBUG(Service_NVDRV, "called"); |
| 40 | IoctlCharacteristics params{}; | 40 | IoctlCharacteristics params{}; |
| 41 | std::memcpy(¶ms, input.data(), input.size()); | 41 | std::memcpy(¶ms, input.data(), input.size()); |
| 42 | params.gc.arch = 0x120; | 42 | params.gc.arch = 0x120; |
| @@ -83,7 +83,7 @@ u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vecto | |||
| 83 | u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output) { | 83 | u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output) { |
| 84 | IoctlGpuGetTpcMasksArgs params{}; | 84 | IoctlGpuGetTpcMasksArgs params{}; |
| 85 | std::memcpy(¶ms, input.data(), input.size()); | 85 | std::memcpy(¶ms, input.data(), input.size()); |
| 86 | NGLOG_INFO(Service_NVDRV, "called, mask=0x{:X}, mask_buf_addr=0x{:X}", params.mask_buf_size, | 86 | LOG_INFO(Service_NVDRV, "called, mask=0x{:X}, mask_buf_addr=0x{:X}", params.mask_buf_size, |
| 87 | params.mask_buf_addr); | 87 | params.mask_buf_addr); |
| 88 | // TODO(ogniK): Confirm value on hardware | 88 | // TODO(ogniK): Confirm value on hardware |
| 89 | if (params.mask_buf_size) | 89 | if (params.mask_buf_size) |
| @@ -95,7 +95,7 @@ u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& | |||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) { | 97 | u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) { |
| 98 | NGLOG_DEBUG(Service_NVDRV, "called"); | 98 | LOG_DEBUG(Service_NVDRV, "called"); |
| 99 | IoctlActiveSlotMask params{}; | 99 | IoctlActiveSlotMask params{}; |
| 100 | std::memcpy(¶ms, input.data(), input.size()); | 100 | std::memcpy(¶ms, input.data(), input.size()); |
| 101 | params.slot = 0x07; | 101 | params.slot = 0x07; |
| @@ -105,7 +105,7 @@ u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) { | 107 | u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) { |
| 108 | NGLOG_DEBUG(Service_NVDRV, "called"); | 108 | LOG_DEBUG(Service_NVDRV, "called"); |
| 109 | IoctlZcullGetCtxSize params{}; | 109 | IoctlZcullGetCtxSize params{}; |
| 110 | std::memcpy(¶ms, input.data(), input.size()); | 110 | std::memcpy(¶ms, input.data(), input.size()); |
| 111 | params.size = 0x1; | 111 | params.size = 0x1; |
| @@ -114,7 +114,7 @@ u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) { | 116 | u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) { |
| 117 | NGLOG_DEBUG(Service_NVDRV, "called"); | 117 | LOG_DEBUG(Service_NVDRV, "called"); |
| 118 | IoctlNvgpuGpuZcullGetInfoArgs params{}; | 118 | IoctlNvgpuGpuZcullGetInfoArgs params{}; |
| 119 | std::memcpy(¶ms, input.data(), input.size()); | 119 | std::memcpy(¶ms, input.data(), input.size()); |
| 120 | params.width_align_pixels = 0x20; | 120 | params.width_align_pixels = 0x20; |
| @@ -132,7 +132,7 @@ u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | u32 nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector<u8>& output) { | 134 | u32 nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector<u8>& output) { |
| 135 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 135 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 136 | IoctlZbcSetTable params{}; | 136 | IoctlZbcSetTable params{}; |
| 137 | std::memcpy(¶ms, input.data(), input.size()); | 137 | std::memcpy(¶ms, input.data(), input.size()); |
| 138 | // TODO(ogniK): What does this even actually do? | 138 | // TODO(ogniK): What does this even actually do? |
| @@ -141,7 +141,7 @@ u32 nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector<u8>& | |||
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | u32 nvhost_ctrl_gpu::ZBCQueryTable(const std::vector<u8>& input, std::vector<u8>& output) { | 143 | u32 nvhost_ctrl_gpu::ZBCQueryTable(const std::vector<u8>& input, std::vector<u8>& output) { |
| 144 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 144 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 145 | IoctlZbcQueryTable params{}; | 145 | IoctlZbcQueryTable params{}; |
| 146 | std::memcpy(¶ms, input.data(), input.size()); | 146 | std::memcpy(¶ms, input.data(), input.size()); |
| 147 | // TODO : To implement properly | 147 | // TODO : To implement properly |
| @@ -150,7 +150,7 @@ u32 nvhost_ctrl_gpu::ZBCQueryTable(const std::vector<u8>& input, std::vector<u8> | |||
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | u32 nvhost_ctrl_gpu::FlushL2(const std::vector<u8>& input, std::vector<u8>& output) { | 152 | u32 nvhost_ctrl_gpu::FlushL2(const std::vector<u8>& input, std::vector<u8>& output) { |
| 153 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 153 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 154 | IoctlFlushL2 params{}; | 154 | IoctlFlushL2 params{}; |
| 155 | std::memcpy(¶ms, input.data(), input.size()); | 155 | std::memcpy(¶ms, input.data(), input.size()); |
| 156 | // TODO : To implement properly | 156 | // TODO : To implement properly |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index ed7b6dc03..2812e029e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | namespace Service::Nvidia::Devices { | 12 | namespace Service::Nvidia::Devices { |
| 13 | 13 | ||
| 14 | u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 14 | u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 15 | NGLOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", | 15 | LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", |
| 16 | command.raw, input.size(), output.size()); | 16 | command.raw, input.size(), output.size()); |
| 17 | 17 | ||
| 18 | switch (static_cast<IoctlCommand>(command.raw)) { | 18 | switch (static_cast<IoctlCommand>(command.raw)) { |
| @@ -51,13 +51,13 @@ u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u | |||
| 51 | u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { | 51 | u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { |
| 52 | IoctlSetNvmapFD params{}; | 52 | IoctlSetNvmapFD params{}; |
| 53 | std::memcpy(¶ms, input.data(), input.size()); | 53 | std::memcpy(¶ms, input.data(), input.size()); |
| 54 | NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); | 54 | LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); |
| 55 | nvmap_fd = params.nvmap_fd; | 55 | nvmap_fd = params.nvmap_fd; |
| 56 | return 0; | 56 | return 0; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& output) { | 59 | u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& output) { |
| 60 | NGLOG_DEBUG(Service_NVDRV, "called"); | 60 | LOG_DEBUG(Service_NVDRV, "called"); |
| 61 | IoctlClientData params{}; | 61 | IoctlClientData params{}; |
| 62 | std::memcpy(¶ms, input.data(), input.size()); | 62 | std::memcpy(¶ms, input.data(), input.size()); |
| 63 | user_data = params.data; | 63 | user_data = params.data; |
| @@ -65,7 +65,7 @@ u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& out | |||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& output) { | 67 | u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& output) { |
| 68 | NGLOG_DEBUG(Service_NVDRV, "called"); | 68 | LOG_DEBUG(Service_NVDRV, "called"); |
| 69 | IoctlClientData params{}; | 69 | IoctlClientData params{}; |
| 70 | std::memcpy(¶ms, input.data(), input.size()); | 70 | std::memcpy(¶ms, input.data(), input.size()); |
| 71 | params.data = user_data; | 71 | params.data = user_data; |
| @@ -75,7 +75,7 @@ u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& out | |||
| 75 | 75 | ||
| 76 | u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) { | 76 | u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) { |
| 77 | std::memcpy(&zcull_params, input.data(), input.size()); | 77 | std::memcpy(&zcull_params, input.data(), input.size()); |
| 78 | NGLOG_DEBUG(Service_NVDRV, "called, gpu_va={:X}, mode={:X}", zcull_params.gpu_va, | 78 | LOG_DEBUG(Service_NVDRV, "called, gpu_va={:X}, mode={:X}", zcull_params.gpu_va, |
| 79 | zcull_params.mode); | 79 | zcull_params.mode); |
| 80 | std::memcpy(output.data(), &zcull_params, output.size()); | 80 | std::memcpy(output.data(), &zcull_params, output.size()); |
| 81 | return 0; | 81 | return 0; |
| @@ -84,7 +84,7 @@ u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 84 | u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& output) { | 84 | u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& output) { |
| 85 | IoctlSetErrorNotifier params{}; | 85 | IoctlSetErrorNotifier params{}; |
| 86 | std::memcpy(¶ms, input.data(), input.size()); | 86 | std::memcpy(¶ms, input.data(), input.size()); |
| 87 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, offset={:X}, size={:X}, mem={:X}", | 87 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset={:X}, size={:X}, mem={:X}", |
| 88 | params.offset, params.size, params.mem); | 88 | params.offset, params.size, params.mem); |
| 89 | std::memcpy(output.data(), ¶ms, output.size()); | 89 | std::memcpy(output.data(), ¶ms, output.size()); |
| 90 | return 0; | 90 | return 0; |
| @@ -92,14 +92,14 @@ u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& | |||
| 92 | 92 | ||
| 93 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { | 93 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { |
| 94 | std::memcpy(&channel_priority, input.data(), input.size()); | 94 | std::memcpy(&channel_priority, input.data(), input.size()); |
| 95 | NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); | 95 | LOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); |
| 96 | return 0; | 96 | return 0; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output) { | 99 | u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output) { |
| 100 | IoctlAllocGpfifoEx2 params{}; | 100 | IoctlAllocGpfifoEx2 params{}; |
| 101 | std::memcpy(¶ms, input.data(), input.size()); | 101 | std::memcpy(¶ms, input.data(), input.size()); |
| 102 | NGLOG_WARNING(Service_NVDRV, | 102 | LOG_WARNING(Service_NVDRV, |
| 103 | "(STUBBED) called, num_entries={:X}, flags={:X}, unk0={:X}, " | 103 | "(STUBBED) called, num_entries={:X}, flags={:X}, unk0={:X}, " |
| 104 | "unk1={:X}, unk2={:X}, unk3={:X}", | 104 | "unk1={:X}, unk2={:X}, unk3={:X}", |
| 105 | params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, | 105 | params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, |
| @@ -113,7 +113,7 @@ u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 113 | u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output) { | 113 | u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output) { |
| 114 | IoctlAllocObjCtx params{}; | 114 | IoctlAllocObjCtx params{}; |
| 115 | std::memcpy(¶ms, input.data(), input.size()); | 115 | std::memcpy(¶ms, input.data(), input.size()); |
| 116 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num={:X}, flags={:X}", params.class_num, | 116 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num={:X}, flags={:X}", params.class_num, |
| 117 | params.flags); | 117 | params.flags); |
| 118 | params.obj_id = 0x0; | 118 | params.obj_id = 0x0; |
| 119 | std::memcpy(output.data(), ¶ms, output.size()); | 119 | std::memcpy(output.data(), ¶ms, output.size()); |
| @@ -126,7 +126,7 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp | |||
| 126 | } | 126 | } |
| 127 | IoctlSubmitGpfifo params{}; | 127 | IoctlSubmitGpfifo params{}; |
| 128 | std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); | 128 | std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); |
| 129 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", | 129 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", |
| 130 | params.gpfifo, params.num_entries, params.flags); | 130 | params.gpfifo, params.num_entries, params.flags); |
| 131 | 131 | ||
| 132 | auto entries = std::vector<IoctlGpfifoEntry>(); | 132 | auto entries = std::vector<IoctlGpfifoEntry>(); |
| @@ -146,7 +146,7 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp | |||
| 146 | u32 nvhost_gpu::GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output) { | 146 | u32 nvhost_gpu::GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output) { |
| 147 | IoctlGetWaitbase params{}; | 147 | IoctlGetWaitbase params{}; |
| 148 | std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); | 148 | std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); |
| 149 | NGLOG_INFO(Service_NVDRV, "called, unknown=0x{:X}", params.unknown); | 149 | LOG_INFO(Service_NVDRV, "called, unknown=0x{:X}", params.unknown); |
| 150 | params.value = 0; // Seems to be hard coded at 0 | 150 | params.value = 0; // Seems to be hard coded at 0 |
| 151 | std::memcpy(output.data(), ¶ms, output.size()); | 151 | std::memcpy(output.data(), ¶ms, output.size()); |
| 152 | return 0; | 152 | return 0; |
| @@ -155,7 +155,7 @@ u32 nvhost_gpu::GetWaitbase(const std::vector<u8>& input, std::vector<u8>& outpu | |||
| 155 | u32 nvhost_gpu::ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output) { | 155 | u32 nvhost_gpu::ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output) { |
| 156 | IoctlChannelSetTimeout params{}; | 156 | IoctlChannelSetTimeout params{}; |
| 157 | std::memcpy(¶ms, input.data(), sizeof(IoctlChannelSetTimeout)); | 157 | std::memcpy(¶ms, input.data(), sizeof(IoctlChannelSetTimeout)); |
| 158 | NGLOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout); | 158 | LOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout); |
| 159 | return 0; | 159 | return 0; |
| 160 | } | 160 | } |
| 161 | 161 | ||
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 0b6c22898..313c50ef5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | namespace Service::Nvidia::Devices { | 9 | namespace Service::Nvidia::Devices { |
| 10 | 10 | ||
| 11 | u32 nvhost_nvdec::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 11 | u32 nvhost_nvdec::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 12 | NGLOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", | 12 | LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}", |
| 13 | command.raw, input.size(), output.size()); | 13 | command.raw, input.size(), output.size()); |
| 14 | 14 | ||
| 15 | switch (static_cast<IoctlCommand>(command.raw)) { | 15 | switch (static_cast<IoctlCommand>(command.raw)) { |
| @@ -24,7 +24,7 @@ u32 nvhost_nvdec::ioctl(Ioctl command, const std::vector<u8>& input, std::vector | |||
| 24 | u32 nvhost_nvdec::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { | 24 | u32 nvhost_nvdec::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { |
| 25 | IoctlSetNvmapFD params{}; | 25 | IoctlSetNvmapFD params{}; |
| 26 | std::memcpy(¶ms, input.data(), input.size()); | 26 | std::memcpy(¶ms, input.data(), input.size()); |
| 27 | NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); | 27 | LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); |
| 28 | nvmap_fd = params.nvmap_fd; | 28 | nvmap_fd = params.nvmap_fd; |
| 29 | return 0; | 29 | return 0; |
| 30 | } | 30 | } |
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 2fc7c87e0..724eeb139 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp | |||
| @@ -52,7 +52,7 @@ u32 nvmap::IocCreate(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 52 | u32 handle = next_handle++; | 52 | u32 handle = next_handle++; |
| 53 | handles[handle] = std::move(object); | 53 | handles[handle] = std::move(object); |
| 54 | 54 | ||
| 55 | NGLOG_DEBUG(Service_NVDRV, "size=0x{:08X}", params.size); | 55 | LOG_DEBUG(Service_NVDRV, "size=0x{:08X}", params.size); |
| 56 | 56 | ||
| 57 | params.handle = handle; | 57 | params.handle = handle; |
| 58 | 58 | ||
| @@ -73,7 +73,7 @@ u32 nvmap::IocAlloc(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 73 | object->addr = params.addr; | 73 | object->addr = params.addr; |
| 74 | object->status = Object::Status::Allocated; | 74 | object->status = Object::Status::Allocated; |
| 75 | 75 | ||
| 76 | NGLOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.addr); | 76 | LOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.addr); |
| 77 | 77 | ||
| 78 | std::memcpy(output.data(), ¶ms, sizeof(params)); | 78 | std::memcpy(output.data(), ¶ms, sizeof(params)); |
| 79 | return 0; | 79 | return 0; |
| @@ -83,7 +83,7 @@ u32 nvmap::IocGetId(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 83 | IocGetIdParams params; | 83 | IocGetIdParams params; |
| 84 | std::memcpy(¶ms, input.data(), sizeof(params)); | 84 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 85 | 85 | ||
| 86 | NGLOG_WARNING(Service_NVDRV, "called"); | 86 | LOG_WARNING(Service_NVDRV, "called"); |
| 87 | 87 | ||
| 88 | auto object = GetObject(params.handle); | 88 | auto object = GetObject(params.handle); |
| 89 | ASSERT(object); | 89 | ASSERT(object); |
| @@ -98,7 +98,7 @@ u32 nvmap::IocFromId(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 98 | IocFromIdParams params; | 98 | IocFromIdParams params; |
| 99 | std::memcpy(¶ms, input.data(), sizeof(params)); | 99 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 100 | 100 | ||
| 101 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 101 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 102 | 102 | ||
| 103 | auto itr = std::find_if(handles.begin(), handles.end(), | 103 | auto itr = std::find_if(handles.begin(), handles.end(), |
| 104 | [&](const auto& entry) { return entry.second->id == params.id; }); | 104 | [&](const auto& entry) { return entry.second->id == params.id; }); |
| @@ -119,7 +119,7 @@ u32 nvmap::IocParam(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 119 | IocParamParams params; | 119 | IocParamParams params; |
| 120 | std::memcpy(¶ms, input.data(), sizeof(params)); | 120 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 121 | 121 | ||
| 122 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called type={}", params.param); | 122 | LOG_WARNING(Service_NVDRV, "(STUBBED) called type={}", params.param); |
| 123 | 123 | ||
| 124 | auto object = GetObject(params.handle); | 124 | auto object = GetObject(params.handle); |
| 125 | ASSERT(object); | 125 | ASSERT(object); |
| @@ -157,7 +157,7 @@ u32 nvmap::IocFree(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 157 | IocFreeParams params; | 157 | IocFreeParams params; |
| 158 | std::memcpy(¶ms, input.data(), sizeof(params)); | 158 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 159 | 159 | ||
| 160 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 160 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 161 | 161 | ||
| 162 | auto itr = handles.find(params.handle); | 162 | auto itr = handles.find(params.handle); |
| 163 | ASSERT(itr != handles.end()); | 163 | ASSERT(itr != handles.end()); |
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 45d2862ef..b10efd5c9 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | namespace Service::Nvidia { | 12 | namespace Service::Nvidia { |
| 13 | 13 | ||
| 14 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { | 14 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { |
| 15 | NGLOG_DEBUG(Service_NVDRV, "called"); | 15 | LOG_DEBUG(Service_NVDRV, "called"); |
| 16 | 16 | ||
| 17 | const auto& buffer = ctx.ReadBuffer(); | 17 | const auto& buffer = ctx.ReadBuffer(); |
| 18 | std::string device_name(buffer.begin(), buffer.end()); | 18 | std::string device_name(buffer.begin(), buffer.end()); |
| @@ -25,7 +25,7 @@ void NVDRV::Open(Kernel::HLERequestContext& ctx) { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { | 27 | void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { |
| 28 | NGLOG_DEBUG(Service_NVDRV, "called"); | 28 | LOG_DEBUG(Service_NVDRV, "called"); |
| 29 | 29 | ||
| 30 | IPC::RequestParser rp{ctx}; | 30 | IPC::RequestParser rp{ctx}; |
| 31 | u32 fd = rp.Pop<u32>(); | 31 | u32 fd = rp.Pop<u32>(); |
| @@ -41,7 +41,7 @@ void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | void NVDRV::Close(Kernel::HLERequestContext& ctx) { | 43 | void NVDRV::Close(Kernel::HLERequestContext& ctx) { |
| 44 | NGLOG_DEBUG(Service_NVDRV, "called"); | 44 | LOG_DEBUG(Service_NVDRV, "called"); |
| 45 | 45 | ||
| 46 | IPC::RequestParser rp{ctx}; | 46 | IPC::RequestParser rp{ctx}; |
| 47 | u32 fd = rp.Pop<u32>(); | 47 | u32 fd = rp.Pop<u32>(); |
| @@ -53,7 +53,7 @@ void NVDRV::Close(Kernel::HLERequestContext& ctx) { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { | 55 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { |
| 56 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 56 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 57 | IPC::ResponseBuilder rb{ctx, 3}; | 57 | IPC::ResponseBuilder rb{ctx, 3}; |
| 58 | rb.Push(RESULT_SUCCESS); | 58 | rb.Push(RESULT_SUCCESS); |
| 59 | rb.Push<u32>(0); | 59 | rb.Push<u32>(0); |
| @@ -63,7 +63,7 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { | |||
| 63 | IPC::RequestParser rp{ctx}; | 63 | IPC::RequestParser rp{ctx}; |
| 64 | u32 fd = rp.Pop<u32>(); | 64 | u32 fd = rp.Pop<u32>(); |
| 65 | u32 event_id = rp.Pop<u32>(); | 65 | u32 event_id = rp.Pop<u32>(); |
| 66 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, fd={:X}, event_id={:X}", fd, event_id); | 66 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd={:X}, event_id={:X}", fd, event_id); |
| 67 | 67 | ||
| 68 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 68 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| 69 | rb.Push(RESULT_SUCCESS); | 69 | rb.Push(RESULT_SUCCESS); |
| @@ -75,14 +75,14 @@ void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { | |||
| 75 | IPC::RequestParser rp{ctx}; | 75 | IPC::RequestParser rp{ctx}; |
| 76 | pid = rp.Pop<u64>(); | 76 | pid = rp.Pop<u64>(); |
| 77 | 77 | ||
| 78 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid); | 78 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x{:X}", pid); |
| 79 | IPC::ResponseBuilder rb{ctx, 3}; | 79 | IPC::ResponseBuilder rb{ctx, 3}; |
| 80 | rb.Push(RESULT_SUCCESS); | 80 | rb.Push(RESULT_SUCCESS); |
| 81 | rb.Push<u32>(0); | 81 | rb.Push<u32>(0); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void NVDRV::FinishInitialize(Kernel::HLERequestContext& ctx) { | 84 | void NVDRV::FinishInitialize(Kernel::HLERequestContext& ctx) { |
| 85 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 85 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 86 | IPC::ResponseBuilder rb{ctx, 2}; | 86 | IPC::ResponseBuilder rb{ctx, 2}; |
| 87 | rb.Push(RESULT_SUCCESS); | 87 | rb.Push(RESULT_SUCCESS); |
| 88 | } | 88 | } |
diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp index 49e88b394..f7f2fe1b2 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue.cpp | |||
| @@ -23,7 +23,7 @@ void BufferQueue::SetPreallocatedBuffer(u32 slot, IGBPBuffer& igbp_buffer) { | |||
| 23 | buffer.igbp_buffer = igbp_buffer; | 23 | buffer.igbp_buffer = igbp_buffer; |
| 24 | buffer.status = Buffer::Status::Free; | 24 | buffer.status = Buffer::Status::Free; |
| 25 | 25 | ||
| 26 | NGLOG_WARNING(Service, "Adding graphics buffer {}", slot); | 26 | LOG_WARNING(Service, "Adding graphics buffer {}", slot); |
| 27 | 27 | ||
| 28 | queue.emplace_back(buffer); | 28 | queue.emplace_back(buffer); |
| 29 | 29 | ||
| @@ -94,7 +94,7 @@ void BufferQueue::ReleaseBuffer(u32 slot) { | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | u32 BufferQueue::Query(QueryType type) { | 96 | u32 BufferQueue::Query(QueryType type) { |
| 97 | NGLOG_WARNING(Service, "(STUBBED) called type={}", static_cast<u32>(type)); | 97 | LOG_WARNING(Service, "(STUBBED) called type={}", static_cast<u32>(type)); |
| 98 | switch (type) { | 98 | switch (type) { |
| 99 | case QueryType::NativeWindowFormat: | 99 | case QueryType::NativeWindowFormat: |
| 100 | // TODO(Subv): Use an enum for this | 100 | // TODO(Subv): Use an enum for this |
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 5c50ed601..ef3c2cc98 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp | |||
| @@ -48,7 +48,7 @@ NVFlinger::~NVFlinger() { | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | u64 NVFlinger::OpenDisplay(const std::string& name) { | 50 | u64 NVFlinger::OpenDisplay(const std::string& name) { |
| 51 | NGLOG_WARNING(Service, "Opening display {}", name); | 51 | LOG_WARNING(Service, "Opening display {}", name); |
| 52 | 52 | ||
| 53 | // TODO(Subv): Currently we only support the Default display. | 53 | // TODO(Subv): Currently we only support the Default display. |
| 54 | ASSERT(name == "Default"); | 54 | ASSERT(name == "Default"); |
diff --git a/src/core/hle/service/pctl/module.cpp b/src/core/hle/service/pctl/module.cpp index dd20d5ae7..fcf1f3da3 100644 --- a/src/core/hle/service/pctl/module.cpp +++ b/src/core/hle/service/pctl/module.cpp | |||
| @@ -112,7 +112,7 @@ public: | |||
| 112 | 112 | ||
| 113 | private: | 113 | private: |
| 114 | void Initialize(Kernel::HLERequestContext& ctx) { | 114 | void Initialize(Kernel::HLERequestContext& ctx) { |
| 115 | NGLOG_WARNING(Service_PCTL, "(STUBBED) called"); | 115 | LOG_WARNING(Service_PCTL, "(STUBBED) called"); |
| 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 0}; | 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 0}; |
| 117 | rb.Push(RESULT_SUCCESS); | 117 | rb.Push(RESULT_SUCCESS); |
| 118 | } | 118 | } |
| @@ -122,14 +122,14 @@ void Module::Interface::CreateService(Kernel::HLERequestContext& ctx) { | |||
| 122 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 122 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 123 | rb.Push(RESULT_SUCCESS); | 123 | rb.Push(RESULT_SUCCESS); |
| 124 | rb.PushIpcInterface<IParentalControlService>(); | 124 | rb.PushIpcInterface<IParentalControlService>(); |
| 125 | NGLOG_DEBUG(Service_PCTL, "called"); | 125 | LOG_DEBUG(Service_PCTL, "called"); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx) { | 128 | void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx) { |
| 129 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 129 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 130 | rb.Push(RESULT_SUCCESS); | 130 | rb.Push(RESULT_SUCCESS); |
| 131 | rb.PushIpcInterface<IParentalControlService>(); | 131 | rb.PushIpcInterface<IParentalControlService>(); |
| 132 | NGLOG_DEBUG(Service_PCTL, "called"); | 132 | LOG_DEBUG(Service_PCTL, "called"); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) | 135 | Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) |
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index eaf30ee6b..3c43b8d8c 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp | |||
| @@ -27,7 +27,7 @@ PlayReport::PlayReport(const char* name) : ServiceFramework(name) { | |||
| 27 | 27 | ||
| 28 | void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) { | 28 | void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) { |
| 29 | // TODO(ogniK): Do we want to add play report? | 29 | // TODO(ogniK): Do we want to add play report? |
| 30 | NGLOG_WARNING(Service_PREPO, "(STUBBED) called"); | 30 | LOG_WARNING(Service_PREPO, "(STUBBED) called"); |
| 31 | 31 | ||
| 32 | IPC::ResponseBuilder rb{ctx, 2}; | 32 | IPC::ResponseBuilder rb{ctx, 2}; |
| 33 | rb.Push(RESULT_SUCCESS); | 33 | rb.Push(RESULT_SUCCESS); |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index bdd9eb5a5..0d036bfaa 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -122,7 +122,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext | |||
| 122 | } | 122 | } |
| 123 | buf.push_back('}'); | 123 | buf.push_back('}'); |
| 124 | 124 | ||
| 125 | NGLOG_ERROR(Service, "unknown / unimplemented {}", fmt::to_string(buf)); | 125 | LOG_ERROR(Service, "unknown / unimplemented {}", fmt::to_string(buf)); |
| 126 | UNIMPLEMENTED(); | 126 | UNIMPLEMENTED(); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| @@ -133,7 +133,7 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { | |||
| 133 | return ReportUnimplementedFunction(ctx, info); | 133 | return ReportUnimplementedFunction(ctx, info); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | NGLOG_TRACE( | 136 | LOG_TRACE( |
| 137 | Service, "{}", | 137 | Service, "{}", |
| 138 | MakeFunctionString(info->name, GetServiceName().c_str(), ctx.CommandBuffer()).c_str()); | 138 | MakeFunctionString(info->name, GetServiceName().c_str(), ctx.CommandBuffer()).c_str()); |
| 139 | handler_invoker(this, info->handler_callback, ctx); | 139 | handler_invoker(this, info->handler_callback, ctx); |
| @@ -206,12 +206,12 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 206 | VI::InstallInterfaces(*sm, nv_flinger); | 206 | VI::InstallInterfaces(*sm, nv_flinger); |
| 207 | Set::InstallInterfaces(*sm); | 207 | Set::InstallInterfaces(*sm); |
| 208 | 208 | ||
| 209 | NGLOG_DEBUG(Service, "initialized OK"); | 209 | LOG_DEBUG(Service, "initialized OK"); |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | /// Shutdown ServiceManager | 212 | /// Shutdown ServiceManager |
| 213 | void Shutdown() { | 213 | void Shutdown() { |
| 214 | g_kernel_named_ports.clear(); | 214 | g_kernel_named_ports.clear(); |
| 215 | NGLOG_DEBUG(Service, "shutdown OK"); | 215 | LOG_DEBUG(Service, "shutdown OK"); |
| 216 | } | 216 | } |
| 217 | } // namespace Service | 217 | } // namespace Service |
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index baeecb0ec..bd295cdf6 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -37,7 +37,7 @@ void SET::GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx) { | |||
| 37 | rb.Push(RESULT_SUCCESS); | 37 | rb.Push(RESULT_SUCCESS); |
| 38 | rb.Push(static_cast<u64>(available_language_codes.size())); | 38 | rb.Push(static_cast<u64>(available_language_codes.size())); |
| 39 | 39 | ||
| 40 | NGLOG_DEBUG(Service_SET, "called"); | 40 | LOG_DEBUG(Service_SET, "called"); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | SET::SET() : ServiceFramework("set") { | 43 | SET::SET() : ServiceFramework("set") { |
diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp index 762a664c5..fa85277fe 100644 --- a/src/core/hle/service/set/set_sys.cpp +++ b/src/core/hle/service/set/set_sys.cpp | |||
| @@ -16,7 +16,7 @@ void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { | |||
| 16 | rb.Push(RESULT_SUCCESS); | 16 | rb.Push(RESULT_SUCCESS); |
| 17 | rb.Push<u32>(0); | 17 | rb.Push<u32>(0); |
| 18 | 18 | ||
| 19 | NGLOG_WARNING(Service_SET, "(STUBBED) called"); | 19 | LOG_WARNING(Service_SET, "(STUBBED) called"); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | SET_SYS::SET_SYS() : ServiceFramework("set:sys") { | 22 | SET_SYS::SET_SYS() : ServiceFramework("set:sys") { |
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index fe5097cdc..518a0cc46 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp | |||
| @@ -17,7 +17,7 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) { | |||
| 17 | rb.Push(RESULT_SUCCESS); | 17 | rb.Push(RESULT_SUCCESS); |
| 18 | rb.Push<u32>(1); // Converted sessions start with 1 request handler | 18 | rb.Push<u32>(1); // Converted sessions start with 1 request handler |
| 19 | 19 | ||
| 20 | NGLOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetObjectId()); | 20 | LOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetObjectId()); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { | 23 | void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { |
| @@ -29,11 +29,11 @@ void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { | |||
| 29 | Kernel::SharedPtr<Kernel::ClientSession> session{ctx.Session()->parent->client}; | 29 | Kernel::SharedPtr<Kernel::ClientSession> session{ctx.Session()->parent->client}; |
| 30 | rb.PushMoveObjects(session); | 30 | rb.PushMoveObjects(session); |
| 31 | 31 | ||
| 32 | NGLOG_DEBUG(Service, "called, session={}", session->GetObjectId()); | 32 | LOG_DEBUG(Service, "called, session={}", session->GetObjectId()); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) { | 35 | void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) { |
| 36 | NGLOG_WARNING(Service, "(STUBBED) called, using DuplicateSession"); | 36 | LOG_WARNING(Service, "(STUBBED) called, using DuplicateSession"); |
| 37 | 37 | ||
| 38 | DuplicateSession(ctx); | 38 | DuplicateSession(ctx); |
| 39 | } | 39 | } |
| @@ -43,7 +43,7 @@ void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { | |||
| 43 | rb.Push(RESULT_SUCCESS); | 43 | rb.Push(RESULT_SUCCESS); |
| 44 | rb.Push<u32>(0x500); | 44 | rb.Push<u32>(0x500); |
| 45 | 45 | ||
| 46 | NGLOG_WARNING(Service, "(STUBBED) called"); | 46 | LOG_WARNING(Service, "(STUBBED) called"); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | Controller::Controller() : ServiceFramework("IpcController") { | 49 | Controller::Controller() : ServiceFramework("IpcController") { |
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index bded8421f..ae4d4d32c 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp | |||
| @@ -86,7 +86,7 @@ SM::~SM() = default; | |||
| 86 | void SM::Initialize(Kernel::HLERequestContext& ctx) { | 86 | void SM::Initialize(Kernel::HLERequestContext& ctx) { |
| 87 | IPC::ResponseBuilder rb{ctx, 2}; | 87 | IPC::ResponseBuilder rb{ctx, 2}; |
| 88 | rb.Push(RESULT_SUCCESS); | 88 | rb.Push(RESULT_SUCCESS); |
| 89 | NGLOG_DEBUG(Service_SM, "called"); | 89 | LOG_DEBUG(Service_SM, "called"); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void SM::GetService(Kernel::HLERequestContext& ctx) { | 92 | void SM::GetService(Kernel::HLERequestContext& ctx) { |
| @@ -102,7 +102,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 102 | if (client_port.Failed()) { | 102 | if (client_port.Failed()) { |
| 103 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 103 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); |
| 104 | rb.Push(client_port.Code()); | 104 | rb.Push(client_port.Code()); |
| 105 | NGLOG_ERROR(Service_SM, "called service={} -> error 0x{:08X}", name, | 105 | LOG_ERROR(Service_SM, "called service={} -> error 0x{:08X}", name, |
| 106 | client_port.Code().raw); | 106 | client_port.Code().raw); |
| 107 | if (name.length() == 0) | 107 | if (name.length() == 0) |
| 108 | return; // LibNX Fix | 108 | return; // LibNX Fix |
| @@ -113,7 +113,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) { | |||
| 113 | auto session = client_port.Unwrap()->Connect(); | 113 | auto session = client_port.Unwrap()->Connect(); |
| 114 | ASSERT(session.Succeeded()); | 114 | ASSERT(session.Succeeded()); |
| 115 | if (session.Succeeded()) { | 115 | if (session.Succeeded()) { |
| 116 | NGLOG_DEBUG(Service_SM, "called service={} -> session={}", name, (*session)->GetObjectId()); | 116 | LOG_DEBUG(Service_SM, "called service={} -> session={}", name, (*session)->GetObjectId()); |
| 117 | IPC::ResponseBuilder rb = | 117 | IPC::ResponseBuilder rb = |
| 118 | rp.MakeBuilder(2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles); | 118 | rp.MakeBuilder(2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles); |
| 119 | rb.Push(session.Code()); | 119 | rb.Push(session.Code()); |
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index ab909fdaa..f03666089 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | namespace Service::Sockets { | 8 | namespace Service::Sockets { |
| 9 | 9 | ||
| 10 | void BSD::RegisterClient(Kernel::HLERequestContext& ctx) { | 10 | void BSD::RegisterClient(Kernel::HLERequestContext& ctx) { |
| 11 | NGLOG_WARNING(Service, "(STUBBED) called"); | 11 | LOG_WARNING(Service, "(STUBBED) called"); |
| 12 | 12 | ||
| 13 | IPC::ResponseBuilder rb{ctx, 3}; | 13 | IPC::ResponseBuilder rb{ctx, 3}; |
| 14 | 14 | ||
| @@ -17,7 +17,7 @@ void BSD::RegisterClient(Kernel::HLERequestContext& ctx) { | |||
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) { | 19 | void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) { |
| 20 | NGLOG_WARNING(Service, "(STUBBED) called"); | 20 | LOG_WARNING(Service, "(STUBBED) called"); |
| 21 | 21 | ||
| 22 | IPC::ResponseBuilder rb{ctx, 3}; | 22 | IPC::ResponseBuilder rb{ctx, 3}; |
| 23 | 23 | ||
| @@ -32,7 +32,7 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) { | |||
| 32 | u32 type = rp.Pop<u32>(); | 32 | u32 type = rp.Pop<u32>(); |
| 33 | u32 protocol = rp.Pop<u32>(); | 33 | u32 protocol = rp.Pop<u32>(); |
| 34 | 34 | ||
| 35 | NGLOG_WARNING(Service, "(STUBBED) called domain={} type={} protocol={}", domain, type, | 35 | LOG_WARNING(Service, "(STUBBED) called domain={} type={} protocol={}", domain, type, |
| 36 | protocol); | 36 | protocol); |
| 37 | 37 | ||
| 38 | u32 fd = next_fd++; | 38 | u32 fd = next_fd++; |
| @@ -45,7 +45,7 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) { | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void BSD::Connect(Kernel::HLERequestContext& ctx) { | 47 | void BSD::Connect(Kernel::HLERequestContext& ctx) { |
| 48 | NGLOG_WARNING(Service, "(STUBBED) called"); | 48 | LOG_WARNING(Service, "(STUBBED) called"); |
| 49 | 49 | ||
| 50 | IPC::ResponseBuilder rb{ctx, 4}; | 50 | IPC::ResponseBuilder rb{ctx, 4}; |
| 51 | 51 | ||
| @@ -55,7 +55,7 @@ void BSD::Connect(Kernel::HLERequestContext& ctx) { | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | void BSD::SendTo(Kernel::HLERequestContext& ctx) { | 57 | void BSD::SendTo(Kernel::HLERequestContext& ctx) { |
| 58 | NGLOG_WARNING(Service, "(STUBBED) called"); | 58 | LOG_WARNING(Service, "(STUBBED) called"); |
| 59 | 59 | ||
| 60 | IPC::ResponseBuilder rb{ctx, 4}; | 60 | IPC::ResponseBuilder rb{ctx, 4}; |
| 61 | 61 | ||
| @@ -65,7 +65,7 @@ void BSD::SendTo(Kernel::HLERequestContext& ctx) { | |||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void BSD::Close(Kernel::HLERequestContext& ctx) { | 67 | void BSD::Close(Kernel::HLERequestContext& ctx) { |
| 68 | NGLOG_WARNING(Service, "(STUBBED) called"); | 68 | LOG_WARNING(Service, "(STUBBED) called"); |
| 69 | 69 | ||
| 70 | IPC::ResponseBuilder rb{ctx, 4}; | 70 | IPC::ResponseBuilder rb{ctx, 4}; |
| 71 | 71 | ||
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index f377e59f2..d235c4cfd 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp | |||
| @@ -10,7 +10,7 @@ namespace Service::Sockets { | |||
| 10 | void SFDNSRES::GetAddrInfo(Kernel::HLERequestContext& ctx) { | 10 | void SFDNSRES::GetAddrInfo(Kernel::HLERequestContext& ctx) { |
| 11 | IPC::RequestParser rp{ctx}; | 11 | IPC::RequestParser rp{ctx}; |
| 12 | 12 | ||
| 13 | NGLOG_WARNING(Service, "(STUBBED) called"); | 13 | LOG_WARNING(Service, "(STUBBED) called"); |
| 14 | 14 | ||
| 15 | IPC::ResponseBuilder rb{ctx, 2}; | 15 | IPC::ResponseBuilder rb{ctx, 2}; |
| 16 | 16 | ||
diff --git a/src/core/hle/service/spl/module.cpp b/src/core/hle/service/spl/module.cpp index 76ba97156..3f5a342a7 100644 --- a/src/core/hle/service/spl/module.cpp +++ b/src/core/hle/service/spl/module.cpp | |||
| @@ -28,7 +28,7 @@ void Module::Interface::GetRandomBytes(Kernel::HLERequestContext& ctx) { | |||
| 28 | 28 | ||
| 29 | IPC::ResponseBuilder rb{ctx, 2}; | 29 | IPC::ResponseBuilder rb{ctx, 2}; |
| 30 | rb.Push(RESULT_SUCCESS); | 30 | rb.Push(RESULT_SUCCESS); |
| 31 | NGLOG_DEBUG(Service_SPL, "called"); | 31 | LOG_DEBUG(Service_SPL, "called"); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 34 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index b3dad8b06..40aea6090 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp | |||
| @@ -65,7 +65,7 @@ public: | |||
| 65 | 65 | ||
| 66 | private: | 66 | private: |
| 67 | void SetOption(Kernel::HLERequestContext& ctx) { | 67 | void SetOption(Kernel::HLERequestContext& ctx) { |
| 68 | NGLOG_WARNING(Service_SSL, "(STUBBED) called"); | 68 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 69 | IPC::RequestParser rp{ctx}; | 69 | IPC::RequestParser rp{ctx}; |
| 70 | 70 | ||
| 71 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 71 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); |
| @@ -73,7 +73,7 @@ private: | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | void CreateConnection(Kernel::HLERequestContext& ctx) { | 75 | void CreateConnection(Kernel::HLERequestContext& ctx) { |
| 76 | NGLOG_WARNING(Service_SSL, "(STUBBED) called"); | 76 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 77 | 77 | ||
| 78 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 78 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 79 | rb.Push(RESULT_SUCCESS); | 79 | rb.Push(RESULT_SUCCESS); |
| @@ -82,7 +82,7 @@ private: | |||
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | void SSL::CreateContext(Kernel::HLERequestContext& ctx) { | 84 | void SSL::CreateContext(Kernel::HLERequestContext& ctx) { |
| 85 | NGLOG_WARNING(Service_SSL, "(STUBBED) called"); | 85 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 86 | 86 | ||
| 87 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 87 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 88 | rb.Push(RESULT_SUCCESS); | 88 | rb.Push(RESULT_SUCCESS); |
| @@ -103,7 +103,7 @@ SSL::SSL() : ServiceFramework("ssl") { | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) { | 105 | void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) { |
| 106 | NGLOG_WARNING(Service_SSL, "(STUBBED) called"); | 106 | LOG_WARNING(Service_SSL, "(STUBBED) called"); |
| 107 | IPC::RequestParser rp{ctx}; | 107 | IPC::RequestParser rp{ctx}; |
| 108 | u32 unk1 = rp.Pop<u32>(); // Probably minor/major? | 108 | u32 unk1 = rp.Pop<u32>(); // Probably minor/major? |
| 109 | u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does | 109 | u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does |
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 654012189..507ae95f4 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -33,14 +33,14 @@ private: | |||
| 33 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( | 33 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( |
| 34 | std::chrono::system_clock::now().time_since_epoch()) | 34 | std::chrono::system_clock::now().time_since_epoch()) |
| 35 | .count()}; | 35 | .count()}; |
| 36 | NGLOG_DEBUG(Service_Time, "called"); | 36 | LOG_DEBUG(Service_Time, "called"); |
| 37 | IPC::ResponseBuilder rb{ctx, 4}; | 37 | IPC::ResponseBuilder rb{ctx, 4}; |
| 38 | rb.Push(RESULT_SUCCESS); | 38 | rb.Push(RESULT_SUCCESS); |
| 39 | rb.Push<u64>(time_since_epoch); | 39 | rb.Push<u64>(time_since_epoch); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { | 42 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { |
| 43 | NGLOG_WARNING(Service_Time, "(STUBBED) called"); | 43 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 44 | SystemClockContext system_clock_ontext{}; | 44 | SystemClockContext system_clock_ontext{}; |
| 45 | IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; | 45 | IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; |
| 46 | rb.Push(RESULT_SUCCESS); | 46 | rb.Push(RESULT_SUCCESS); |
| @@ -59,7 +59,7 @@ public: | |||
| 59 | 59 | ||
| 60 | private: | 60 | private: |
| 61 | void GetCurrentTimePoint(Kernel::HLERequestContext& ctx) { | 61 | void GetCurrentTimePoint(Kernel::HLERequestContext& ctx) { |
| 62 | NGLOG_DEBUG(Service_Time, "called"); | 62 | LOG_DEBUG(Service_Time, "called"); |
| 63 | SteadyClockTimePoint steady_clock_time_point{ | 63 | SteadyClockTimePoint steady_clock_time_point{ |
| 64 | CoreTiming::cyclesToMs(CoreTiming::GetTicks()) / 1000}; | 64 | CoreTiming::cyclesToMs(CoreTiming::GetTicks()) / 1000}; |
| 65 | IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2}; | 65 | IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2}; |
| @@ -91,21 +91,21 @@ private: | |||
| 91 | TimeZoneRule my_time_zone_rule{}; | 91 | TimeZoneRule my_time_zone_rule{}; |
| 92 | 92 | ||
| 93 | void GetDeviceLocationName(Kernel::HLERequestContext& ctx) { | 93 | void GetDeviceLocationName(Kernel::HLERequestContext& ctx) { |
| 94 | NGLOG_DEBUG(Service_Time, "called"); | 94 | LOG_DEBUG(Service_Time, "called"); |
| 95 | IPC::ResponseBuilder rb{ctx, (sizeof(LocationName) / 4) + 2}; | 95 | IPC::ResponseBuilder rb{ctx, (sizeof(LocationName) / 4) + 2}; |
| 96 | rb.Push(RESULT_SUCCESS); | 96 | rb.Push(RESULT_SUCCESS); |
| 97 | rb.PushRaw(location_name); | 97 | rb.PushRaw(location_name); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void GetTotalLocationNameCount(Kernel::HLERequestContext& ctx) { | 100 | void GetTotalLocationNameCount(Kernel::HLERequestContext& ctx) { |
| 101 | NGLOG_WARNING(Service_Time, "(STUBBED) called"); | 101 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 102 | IPC::ResponseBuilder rb{ctx, 3}; | 102 | IPC::ResponseBuilder rb{ctx, 3}; |
| 103 | rb.Push(RESULT_SUCCESS); | 103 | rb.Push(RESULT_SUCCESS); |
| 104 | rb.Push<u32>(0); | 104 | rb.Push<u32>(0); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | void LoadTimeZoneRule(Kernel::HLERequestContext& ctx) { | 107 | void LoadTimeZoneRule(Kernel::HLERequestContext& ctx) { |
| 108 | NGLOG_WARNING(Service_Time, "(STUBBED) called"); | 108 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 109 | 109 | ||
| 110 | ctx.WriteBuffer(&my_time_zone_rule, sizeof(TimeZoneRule)); | 110 | ctx.WriteBuffer(&my_time_zone_rule, sizeof(TimeZoneRule)); |
| 111 | 111 | ||
| @@ -117,7 +117,7 @@ private: | |||
| 117 | IPC::RequestParser rp{ctx}; | 117 | IPC::RequestParser rp{ctx}; |
| 118 | const u64 posix_time = rp.Pop<u64>(); | 118 | const u64 posix_time = rp.Pop<u64>(); |
| 119 | 119 | ||
| 120 | NGLOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x{:016X}", posix_time); | 120 | LOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x{:016X}", posix_time); |
| 121 | 121 | ||
| 122 | TimeZoneRule time_zone_rule{}; | 122 | TimeZoneRule time_zone_rule{}; |
| 123 | auto buffer = ctx.ReadBuffer(); | 123 | auto buffer = ctx.ReadBuffer(); |
| @@ -138,7 +138,7 @@ private: | |||
| 138 | IPC::RequestParser rp{ctx}; | 138 | IPC::RequestParser rp{ctx}; |
| 139 | const u64 posix_time = rp.Pop<u64>(); | 139 | const u64 posix_time = rp.Pop<u64>(); |
| 140 | 140 | ||
| 141 | NGLOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x{:016X}", posix_time); | 141 | LOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x{:016X}", posix_time); |
| 142 | 142 | ||
| 143 | CalendarTime calendar_time{2018, 1, 1, 0, 0, 0}; | 143 | CalendarTime calendar_time{2018, 1, 1, 0, 0, 0}; |
| 144 | CalendarAdditionalInfo additional_info{}; | 144 | CalendarAdditionalInfo additional_info{}; |
| @@ -176,35 +176,35 @@ void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ct | |||
| 176 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 176 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 177 | rb.Push(RESULT_SUCCESS); | 177 | rb.Push(RESULT_SUCCESS); |
| 178 | rb.PushIpcInterface<ISystemClock>(); | 178 | rb.PushIpcInterface<ISystemClock>(); |
| 179 | NGLOG_DEBUG(Service_Time, "called"); | 179 | LOG_DEBUG(Service_Time, "called"); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { | 182 | void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { |
| 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 183 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 184 | rb.Push(RESULT_SUCCESS); | 184 | rb.Push(RESULT_SUCCESS); |
| 185 | rb.PushIpcInterface<ISystemClock>(); | 185 | rb.PushIpcInterface<ISystemClock>(); |
| 186 | NGLOG_DEBUG(Service_Time, "called"); | 186 | LOG_DEBUG(Service_Time, "called"); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { | 189 | void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { |
| 190 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 190 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 191 | rb.Push(RESULT_SUCCESS); | 191 | rb.Push(RESULT_SUCCESS); |
| 192 | rb.PushIpcInterface<ISteadyClock>(); | 192 | rb.PushIpcInterface<ISteadyClock>(); |
| 193 | NGLOG_DEBUG(Service_Time, "called"); | 193 | LOG_DEBUG(Service_Time, "called"); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { | 196 | void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { |
| 197 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 197 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 198 | rb.Push(RESULT_SUCCESS); | 198 | rb.Push(RESULT_SUCCESS); |
| 199 | rb.PushIpcInterface<ITimeZoneService>(); | 199 | rb.PushIpcInterface<ITimeZoneService>(); |
| 200 | NGLOG_DEBUG(Service_Time, "called"); | 200 | LOG_DEBUG(Service_Time, "called"); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) { | 203 | void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) { |
| 204 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 204 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 205 | rb.Push(RESULT_SUCCESS); | 205 | rb.Push(RESULT_SUCCESS); |
| 206 | rb.PushIpcInterface<ISystemClock>(); | 206 | rb.PushIpcInterface<ISystemClock>(); |
| 207 | NGLOG_DEBUG(Service_Time, "called"); | 207 | LOG_DEBUG(Service_Time, "called"); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) | 210 | Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index e86556671..dbd09d07d 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -470,7 +470,7 @@ private: | |||
| 470 | u32 flags = rp.Pop<u32>(); | 470 | u32 flags = rp.Pop<u32>(); |
| 471 | auto buffer_queue = nv_flinger->GetBufferQueue(id); | 471 | auto buffer_queue = nv_flinger->GetBufferQueue(id); |
| 472 | 472 | ||
| 473 | NGLOG_DEBUG(Service_VI, "called, transaction={:X}", static_cast<u32>(transaction)); | 473 | LOG_DEBUG(Service_VI, "called, transaction={:X}", static_cast<u32>(transaction)); |
| 474 | 474 | ||
| 475 | if (transaction == TransactionId::Connect) { | 475 | if (transaction == TransactionId::Connect) { |
| 476 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; | 476 | IGBPConnectRequestParcel request{ctx.ReadBuffer()}; |
| @@ -532,7 +532,7 @@ private: | |||
| 532 | IGBPQueryResponseParcel response{value}; | 532 | IGBPQueryResponseParcel response{value}; |
| 533 | ctx.WriteBuffer(response.Serialize()); | 533 | ctx.WriteBuffer(response.Serialize()); |
| 534 | } else if (transaction == TransactionId::CancelBuffer) { | 534 | } else if (transaction == TransactionId::CancelBuffer) { |
| 535 | NGLOG_WARNING(Service_VI, "(STUBBED) called, transaction=CancelBuffer"); | 535 | LOG_WARNING(Service_VI, "(STUBBED) called, transaction=CancelBuffer"); |
| 536 | } else { | 536 | } else { |
| 537 | ASSERT_MSG(false, "Unimplemented"); | 537 | ASSERT_MSG(false, "Unimplemented"); |
| 538 | } | 538 | } |
| @@ -547,7 +547,7 @@ private: | |||
| 547 | s32 addval = rp.PopRaw<s32>(); | 547 | s32 addval = rp.PopRaw<s32>(); |
| 548 | u32 type = rp.Pop<u32>(); | 548 | u32 type = rp.Pop<u32>(); |
| 549 | 549 | ||
| 550 | NGLOG_WARNING(Service_VI, "(STUBBED) called id={}, addval={:08X}, type={:08X}", id, addval, | 550 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, addval={:08X}, type={:08X}", id, addval, |
| 551 | type); | 551 | type); |
| 552 | IPC::ResponseBuilder rb{ctx, 2}; | 552 | IPC::ResponseBuilder rb{ctx, 2}; |
| 553 | rb.Push(RESULT_SUCCESS); | 553 | rb.Push(RESULT_SUCCESS); |
| @@ -562,7 +562,7 @@ private: | |||
| 562 | 562 | ||
| 563 | // TODO(Subv): Find out what this actually is. | 563 | // TODO(Subv): Find out what this actually is. |
| 564 | 564 | ||
| 565 | NGLOG_WARNING(Service_VI, "(STUBBED) called id={}, unknown={:08X}", id, unknown); | 565 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, unknown={:08X}", id, unknown); |
| 566 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 566 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 567 | rb.Push(RESULT_SUCCESS); | 567 | rb.Push(RESULT_SUCCESS); |
| 568 | rb.PushCopyObjects(buffer_queue->GetNativeHandle()); | 568 | rb.PushCopyObjects(buffer_queue->GetNativeHandle()); |
| @@ -625,7 +625,7 @@ public: | |||
| 625 | 625 | ||
| 626 | private: | 626 | private: |
| 627 | void SetLayerZ(Kernel::HLERequestContext& ctx) { | 627 | void SetLayerZ(Kernel::HLERequestContext& ctx) { |
| 628 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 628 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 629 | IPC::RequestParser rp{ctx}; | 629 | IPC::RequestParser rp{ctx}; |
| 630 | u64 layer_id = rp.Pop<u64>(); | 630 | u64 layer_id = rp.Pop<u64>(); |
| 631 | u64 z_value = rp.Pop<u64>(); | 631 | u64 z_value = rp.Pop<u64>(); |
| @@ -640,7 +640,7 @@ private: | |||
| 640 | bool visibility = rp.Pop<bool>(); | 640 | bool visibility = rp.Pop<bool>(); |
| 641 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 641 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); |
| 642 | rb.Push(RESULT_SUCCESS); | 642 | rb.Push(RESULT_SUCCESS); |
| 643 | NGLOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, | 643 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, |
| 644 | visibility); | 644 | visibility); |
| 645 | } | 645 | } |
| 646 | }; | 646 | }; |
| @@ -723,7 +723,7 @@ public: | |||
| 723 | 723 | ||
| 724 | private: | 724 | private: |
| 725 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 725 | void CloseDisplay(Kernel::HLERequestContext& ctx) { |
| 726 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 726 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 727 | IPC::RequestParser rp{ctx}; | 727 | IPC::RequestParser rp{ctx}; |
| 728 | u64 display = rp.Pop<u64>(); | 728 | u64 display = rp.Pop<u64>(); |
| 729 | 729 | ||
| @@ -732,7 +732,7 @@ private: | |||
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | void CreateManagedLayer(Kernel::HLERequestContext& ctx) { | 734 | void CreateManagedLayer(Kernel::HLERequestContext& ctx) { |
| 735 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 735 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 736 | IPC::RequestParser rp{ctx}; | 736 | IPC::RequestParser rp{ctx}; |
| 737 | u32 unknown = rp.Pop<u32>(); | 737 | u32 unknown = rp.Pop<u32>(); |
| 738 | rp.Skip(1, false); | 738 | rp.Skip(1, false); |
| @@ -747,7 +747,7 @@ private: | |||
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | void AddToLayerStack(Kernel::HLERequestContext& ctx) { | 749 | void AddToLayerStack(Kernel::HLERequestContext& ctx) { |
| 750 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 750 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 751 | IPC::RequestParser rp{ctx}; | 751 | IPC::RequestParser rp{ctx}; |
| 752 | u32 stack = rp.Pop<u32>(); | 752 | u32 stack = rp.Pop<u32>(); |
| 753 | u64 layer_id = rp.Pop<u64>(); | 753 | u64 layer_id = rp.Pop<u64>(); |
| @@ -762,7 +762,7 @@ private: | |||
| 762 | bool visibility = rp.Pop<bool>(); | 762 | bool visibility = rp.Pop<bool>(); |
| 763 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); | 763 | IPC::ResponseBuilder rb = rp.MakeBuilder(2, 0, 0); |
| 764 | rb.Push(RESULT_SUCCESS); | 764 | rb.Push(RESULT_SUCCESS); |
| 765 | NGLOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, | 765 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, |
| 766 | visibility); | 766 | visibility); |
| 767 | } | 767 | } |
| 768 | 768 | ||
| @@ -776,7 +776,7 @@ public: | |||
| 776 | 776 | ||
| 777 | private: | 777 | private: |
| 778 | void GetRelayService(Kernel::HLERequestContext& ctx) { | 778 | void GetRelayService(Kernel::HLERequestContext& ctx) { |
| 779 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 779 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 780 | 780 | ||
| 781 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 781 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 782 | rb.Push(RESULT_SUCCESS); | 782 | rb.Push(RESULT_SUCCESS); |
| @@ -784,7 +784,7 @@ private: | |||
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | void GetSystemDisplayService(Kernel::HLERequestContext& ctx) { | 786 | void GetSystemDisplayService(Kernel::HLERequestContext& ctx) { |
| 787 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 787 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 788 | 788 | ||
| 789 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 789 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 790 | rb.Push(RESULT_SUCCESS); | 790 | rb.Push(RESULT_SUCCESS); |
| @@ -792,7 +792,7 @@ private: | |||
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | void GetManagerDisplayService(Kernel::HLERequestContext& ctx) { | 794 | void GetManagerDisplayService(Kernel::HLERequestContext& ctx) { |
| 795 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 795 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 796 | 796 | ||
| 797 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 797 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 798 | rb.Push(RESULT_SUCCESS); | 798 | rb.Push(RESULT_SUCCESS); |
| @@ -800,7 +800,7 @@ private: | |||
| 800 | } | 800 | } |
| 801 | 801 | ||
| 802 | void GetIndirectDisplayTransactionService(Kernel::HLERequestContext& ctx) { | 802 | void GetIndirectDisplayTransactionService(Kernel::HLERequestContext& ctx) { |
| 803 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 803 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 804 | 804 | ||
| 805 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 805 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 806 | rb.Push(RESULT_SUCCESS); | 806 | rb.Push(RESULT_SUCCESS); |
| @@ -808,7 +808,7 @@ private: | |||
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | void OpenDisplay(Kernel::HLERequestContext& ctx) { | 810 | void OpenDisplay(Kernel::HLERequestContext& ctx) { |
| 811 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 811 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 812 | IPC::RequestParser rp{ctx}; | 812 | IPC::RequestParser rp{ctx}; |
| 813 | auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); | 813 | auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); |
| 814 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); | 814 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); |
| @@ -823,7 +823,7 @@ private: | |||
| 823 | } | 823 | } |
| 824 | 824 | ||
| 825 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 825 | void CloseDisplay(Kernel::HLERequestContext& ctx) { |
| 826 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 826 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 827 | IPC::RequestParser rp{ctx}; | 827 | IPC::RequestParser rp{ctx}; |
| 828 | u64 display_id = rp.Pop<u64>(); | 828 | u64 display_id = rp.Pop<u64>(); |
| 829 | 829 | ||
| @@ -832,7 +832,7 @@ private: | |||
| 832 | } | 832 | } |
| 833 | 833 | ||
| 834 | void GetDisplayResolution(Kernel::HLERequestContext& ctx) { | 834 | void GetDisplayResolution(Kernel::HLERequestContext& ctx) { |
| 835 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 835 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 836 | IPC::RequestParser rp{ctx}; | 836 | IPC::RequestParser rp{ctx}; |
| 837 | u64 display_id = rp.Pop<u64>(); | 837 | u64 display_id = rp.Pop<u64>(); |
| 838 | 838 | ||
| @@ -849,7 +849,7 @@ private: | |||
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { | 851 | void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { |
| 852 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 852 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 853 | IPC::RequestParser rp{ctx}; | 853 | IPC::RequestParser rp{ctx}; |
| 854 | u32 scaling_mode = rp.Pop<u32>(); | 854 | u32 scaling_mode = rp.Pop<u32>(); |
| 855 | u64 unknown = rp.Pop<u64>(); | 855 | u64 unknown = rp.Pop<u64>(); |
| @@ -865,11 +865,11 @@ private: | |||
| 865 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); | 865 | IPC::ResponseBuilder rb = rp.MakeBuilder(4, 0, 0); |
| 866 | rb.Push(RESULT_SUCCESS); | 866 | rb.Push(RESULT_SUCCESS); |
| 867 | rb.Push<u64>(1); | 867 | rb.Push<u64>(1); |
| 868 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 868 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 869 | } | 869 | } |
| 870 | 870 | ||
| 871 | void OpenLayer(Kernel::HLERequestContext& ctx) { | 871 | void OpenLayer(Kernel::HLERequestContext& ctx) { |
| 872 | NGLOG_DEBUG(Service_VI, "called"); | 872 | LOG_DEBUG(Service_VI, "called"); |
| 873 | IPC::RequestParser rp{ctx}; | 873 | IPC::RequestParser rp{ctx}; |
| 874 | auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); | 874 | auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); |
| 875 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); | 875 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); |
| @@ -889,7 +889,7 @@ private: | |||
| 889 | } | 889 | } |
| 890 | 890 | ||
| 891 | void CreateStrayLayer(Kernel::HLERequestContext& ctx) { | 891 | void CreateStrayLayer(Kernel::HLERequestContext& ctx) { |
| 892 | NGLOG_DEBUG(Service_VI, "called"); | 892 | LOG_DEBUG(Service_VI, "called"); |
| 893 | 893 | ||
| 894 | IPC::RequestParser rp{ctx}; | 894 | IPC::RequestParser rp{ctx}; |
| 895 | u32 flags = rp.Pop<u32>(); | 895 | u32 flags = rp.Pop<u32>(); |
| @@ -909,7 +909,7 @@ private: | |||
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { | 911 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { |
| 912 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 912 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 913 | 913 | ||
| 914 | IPC::RequestParser rp{ctx}; | 914 | IPC::RequestParser rp{ctx}; |
| 915 | u64 layer_id = rp.Pop<u64>(); | 915 | u64 layer_id = rp.Pop<u64>(); |
| @@ -919,7 +919,7 @@ private: | |||
| 919 | } | 919 | } |
| 920 | 920 | ||
| 921 | void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { | 921 | void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { |
| 922 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 922 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 923 | IPC::RequestParser rp{ctx}; | 923 | IPC::RequestParser rp{ctx}; |
| 924 | u64 display_id = rp.Pop<u64>(); | 924 | u64 display_id = rp.Pop<u64>(); |
| 925 | 925 | ||
| @@ -968,7 +968,7 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name, | |||
| 968 | : ServiceFramework(name), module(std::move(module)), nv_flinger(std::move(nv_flinger)) {} | 968 | : ServiceFramework(name), module(std::move(module)), nv_flinger(std::move(nv_flinger)) {} |
| 969 | 969 | ||
| 970 | void Module::Interface::GetDisplayService(Kernel::HLERequestContext& ctx) { | 970 | void Module::Interface::GetDisplayService(Kernel::HLERequestContext& ctx) { |
| 971 | NGLOG_WARNING(Service_VI, "(STUBBED) called"); | 971 | LOG_WARNING(Service_VI, "(STUBBED) called"); |
| 972 | 972 | ||
| 973 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 973 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 974 | rb.Push(RESULT_SUCCESS); | 974 | rb.Push(RESULT_SUCCESS); |
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 8fc91dc9c..2f48068c1 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp | |||
| @@ -33,7 +33,7 @@ inline void Read(T& var, const u32 addr) { | |||
| 33 | LCD::Read(var, addr); | 33 | LCD::Read(var, addr); |
| 34 | break; | 34 | break; |
| 35 | default: | 35 | default: |
| 36 | NGLOG_ERROR(HW_Memory, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr); | 36 | LOG_ERROR(HW_Memory, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr); |
| 37 | break; | 37 | break; |
| 38 | } | 38 | } |
| 39 | } | 39 | } |
| @@ -62,7 +62,7 @@ inline void Write(u32 addr, const T data) { | |||
| 62 | LCD::Write(addr, data); | 62 | LCD::Write(addr, data); |
| 63 | break; | 63 | break; |
| 64 | default: | 64 | default: |
| 65 | NGLOG_ERROR(HW_Memory, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr); | 65 | LOG_ERROR(HW_Memory, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr); |
| 66 | break; | 66 | break; |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
| @@ -85,12 +85,12 @@ void Update() {} | |||
| 85 | /// Initialize hardware | 85 | /// Initialize hardware |
| 86 | void Init() { | 86 | void Init() { |
| 87 | LCD::Init(); | 87 | LCD::Init(); |
| 88 | NGLOG_DEBUG(HW, "Initialized OK"); | 88 | LOG_DEBUG(HW, "Initialized OK"); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | /// Shutdown hardware | 91 | /// Shutdown hardware |
| 92 | void Shutdown() { | 92 | void Shutdown() { |
| 93 | LCD::Shutdown(); | 93 | LCD::Shutdown(); |
| 94 | NGLOG_DEBUG(HW, "Shutdown OK"); | 94 | LOG_DEBUG(HW, "Shutdown OK"); |
| 95 | } | 95 | } |
| 96 | } // namespace HW | 96 | } // namespace HW |
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp index e8525efde..0b62174d5 100644 --- a/src/core/hw/lcd.cpp +++ b/src/core/hw/lcd.cpp | |||
| @@ -20,7 +20,7 @@ inline void Read(T& var, const u32 raw_addr) { | |||
| 20 | 20 | ||
| 21 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail | 21 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail |
| 22 | if (index >= 0x400 || !std::is_same<T, u32>::value) { | 22 | if (index >= 0x400 || !std::is_same<T, u32>::value) { |
| 23 | NGLOG_ERROR(HW_LCD, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr); | 23 | LOG_ERROR(HW_LCD, "Unknown Read{} @ 0x{:08X}", sizeof(var) * 8, addr); |
| 24 | return; | 24 | return; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| @@ -34,7 +34,7 @@ inline void Write(u32 addr, const T data) { | |||
| 34 | 34 | ||
| 35 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail | 35 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail |
| 36 | if (index >= 0x400 || !std::is_same<T, u32>::value) { | 36 | if (index >= 0x400 || !std::is_same<T, u32>::value) { |
| 37 | NGLOG_ERROR(HW_LCD, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr); | 37 | LOG_ERROR(HW_LCD, "Unknown Write{} 0x{:08X} @ 0x{:08X}", sizeof(data) * 8, data, addr); |
| 38 | return; | 38 | return; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| @@ -56,12 +56,12 @@ template void Write<u8>(u32 addr, const u8 data); | |||
| 56 | /// Initialize hardware | 56 | /// Initialize hardware |
| 57 | void Init() { | 57 | void Init() { |
| 58 | memset(&g_regs, 0, sizeof(g_regs)); | 58 | memset(&g_regs, 0, sizeof(g_regs)); |
| 59 | NGLOG_DEBUG(HW_LCD, "Initialized OK"); | 59 | LOG_DEBUG(HW_LCD, "Initialized OK"); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | /// Shutdown hardware | 62 | /// Shutdown hardware |
| 63 | void Shutdown() { | 63 | void Shutdown() { |
| 64 | NGLOG_DEBUG(HW_LCD, "Shutdown OK"); | 64 | LOG_DEBUG(HW_LCD, "Shutdown OK"); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | } // namespace LCD | 67 | } // namespace LCD |
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index b01b2caf6..eb7feb617 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp | |||
| @@ -132,7 +132,7 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load( | |||
| 132 | const VAddr load_addr = next_load_addr; | 132 | const VAddr load_addr = next_load_addr; |
| 133 | next_load_addr = AppLoader_NSO::LoadModule(path, load_addr); | 133 | next_load_addr = AppLoader_NSO::LoadModule(path, load_addr); |
| 134 | if (next_load_addr) { | 134 | if (next_load_addr) { |
| 135 | NGLOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", module, load_addr); | 135 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", module, load_addr); |
| 136 | } else { | 136 | } else { |
| 137 | next_load_addr = load_addr; | 137 | next_load_addr = load_addr; |
| 138 | } | 138 | } |
| @@ -163,7 +163,7 @@ ResultStatus AppLoader_DeconstructedRomDirectory::ReadRomFS( | |||
| 163 | std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, u64& size) { | 163 | std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, u64& size) { |
| 164 | 164 | ||
| 165 | if (filepath_romfs.empty()) { | 165 | if (filepath_romfs.empty()) { |
| 166 | NGLOG_DEBUG(Loader, "No RomFS available"); | 166 | LOG_DEBUG(Loader, "No RomFS available"); |
| 167 | return ResultStatus::ErrorNotUsed; | 167 | return ResultStatus::ErrorNotUsed; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| @@ -176,8 +176,8 @@ ResultStatus AppLoader_DeconstructedRomDirectory::ReadRomFS( | |||
| 176 | offset = 0; | 176 | offset = 0; |
| 177 | size = romfs_file->GetSize(); | 177 | size = romfs_file->GetSize(); |
| 178 | 178 | ||
| 179 | NGLOG_DEBUG(Loader, "RomFS offset: 0x{:016X}", offset); | 179 | LOG_DEBUG(Loader, "RomFS offset: 0x{:016X}", offset); |
| 180 | NGLOG_DEBUG(Loader, "RomFS size: 0x{:016X}", size); | 180 | LOG_DEBUG(Loader, "RomFS size: 0x{:016X}", size); |
| 181 | 181 | ||
| 182 | // Reset read pointer | 182 | // Reset read pointer |
| 183 | file.Seek(0, SEEK_SET); | 183 | file.Seek(0, SEEK_SET); |
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index e42d3a870..c984ef852 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -273,18 +273,18 @@ const char* ElfReader::GetSectionName(int section) const { | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | 275 | SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { |
| 276 | NGLOG_DEBUG(Loader, "String section: {}", header->e_shstrndx); | 276 | LOG_DEBUG(Loader, "String section: {}", header->e_shstrndx); |
| 277 | 277 | ||
| 278 | // Should we relocate? | 278 | // Should we relocate? |
| 279 | relocate = (header->e_type != ET_EXEC); | 279 | relocate = (header->e_type != ET_EXEC); |
| 280 | 280 | ||
| 281 | if (relocate) { | 281 | if (relocate) { |
| 282 | NGLOG_DEBUG(Loader, "Relocatable module"); | 282 | LOG_DEBUG(Loader, "Relocatable module"); |
| 283 | entryPoint += vaddr; | 283 | entryPoint += vaddr; |
| 284 | } else { | 284 | } else { |
| 285 | NGLOG_DEBUG(Loader, "Prerelocated executable"); | 285 | LOG_DEBUG(Loader, "Prerelocated executable"); |
| 286 | } | 286 | } |
| 287 | NGLOG_DEBUG(Loader, "{} segments:", header->e_phnum); | 287 | LOG_DEBUG(Loader, "{} segments:", header->e_phnum); |
| 288 | 288 | ||
| 289 | // First pass : Get the bits into RAM | 289 | // First pass : Get the bits into RAM |
| 290 | u32 base_addr = relocate ? vaddr : 0; | 290 | u32 base_addr = relocate ? vaddr : 0; |
| @@ -304,7 +304,7 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
| 304 | 304 | ||
| 305 | for (unsigned int i = 0; i < header->e_phnum; ++i) { | 305 | for (unsigned int i = 0; i < header->e_phnum; ++i) { |
| 306 | Elf32_Phdr* p = &segments[i]; | 306 | Elf32_Phdr* p = &segments[i]; |
| 307 | NGLOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type, | 307 | LOG_DEBUG(Loader, "Type: {} Vaddr: {:08X} Filesz: {:08X} Memsz: {:08X} ", p->p_type, |
| 308 | p->p_vaddr, p->p_filesz, p->p_memsz); | 308 | p->p_vaddr, p->p_filesz, p->p_memsz); |
| 309 | 309 | ||
| 310 | if (p->p_type == PT_LOAD) { | 310 | if (p->p_type == PT_LOAD) { |
| @@ -317,13 +317,13 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
| 317 | } else if (permission_flags == (PF_R | PF_W)) { | 317 | } else if (permission_flags == (PF_R | PF_W)) { |
| 318 | codeset_segment = &codeset->data; | 318 | codeset_segment = &codeset->data; |
| 319 | } else { | 319 | } else { |
| 320 | NGLOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i, | 320 | LOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i, |
| 321 | p->p_flags); | 321 | p->p_flags); |
| 322 | continue; | 322 | continue; |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | if (codeset_segment->size != 0) { | 325 | if (codeset_segment->size != 0) { |
| 326 | NGLOG_ERROR(Loader, | 326 | LOG_ERROR(Loader, |
| 327 | "ELF has more than one segment of the same type. Skipping extra " | 327 | "ELF has more than one segment of the same type. Skipping extra " |
| 328 | "segment (id {})", | 328 | "segment (id {})", |
| 329 | i); | 329 | i); |
| @@ -345,7 +345,7 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { | |||
| 345 | codeset->entrypoint = base_addr + header->e_entry; | 345 | codeset->entrypoint = base_addr + header->e_entry; |
| 346 | codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); | 346 | codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); |
| 347 | 347 | ||
| 348 | NGLOG_DEBUG(Loader, "Done loading."); | 348 | LOG_DEBUG(Loader, "Done loading."); |
| 349 | 349 | ||
| 350 | return codeset; | 350 | return codeset; |
| 351 | } | 351 | } |
diff --git a/src/core/loader/linker.cpp b/src/core/loader/linker.cpp index c7be5f265..769516b6f 100644 --- a/src/core/loader/linker.cpp +++ b/src/core/loader/linker.cpp | |||
| @@ -84,7 +84,7 @@ void Linker::WriteRelocations(std::vector<u8>& program_image, const std::vector< | |||
| 84 | } | 84 | } |
| 85 | break; | 85 | break; |
| 86 | default: | 86 | default: |
| 87 | NGLOG_CRITICAL(Loader, "Unknown relocation type: {}", static_cast<int>(rela.type)); | 87 | LOG_CRITICAL(Loader, "Unknown relocation type: {}", static_cast<int>(rela.type)); |
| 88 | break; | 88 | break; |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| @@ -141,7 +141,7 @@ void Linker::ResolveImports() { | |||
| 141 | if (search != exports.end()) { | 141 | if (search != exports.end()) { |
| 142 | Memory::Write64(import.second.ea, search->second + import.second.addend); | 142 | Memory::Write64(import.second.ea, search->second + import.second.addend); |
| 143 | } else { | 143 | } else { |
| 144 | NGLOG_ERROR(Loader, "Unresolved import: {}", import.first); | 144 | LOG_ERROR(Loader, "Unresolved import: {}", import.first); |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | } | 147 | } |
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 20cc0bac0..8831d8e83 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -43,7 +43,7 @@ FileType IdentifyFile(FileUtil::IOFile& file, const std::string& filepath) { | |||
| 43 | FileType IdentifyFile(const std::string& file_name) { | 43 | FileType IdentifyFile(const std::string& file_name) { |
| 44 | FileUtil::IOFile file(file_name, "rb"); | 44 | FileUtil::IOFile file(file_name, "rb"); |
| 45 | if (!file.IsOpen()) { | 45 | if (!file.IsOpen()) { |
| 46 | NGLOG_ERROR(Loader, "Failed to load file {}", file_name); | 46 | LOG_ERROR(Loader, "Failed to load file {}", file_name); |
| 47 | return FileType::Unknown; | 47 | return FileType::Unknown; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| @@ -126,7 +126,7 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp | |||
| 126 | std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { | 126 | std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { |
| 127 | FileUtil::IOFile file(filename, "rb"); | 127 | FileUtil::IOFile file(filename, "rb"); |
| 128 | if (!file.IsOpen()) { | 128 | if (!file.IsOpen()) { |
| 129 | NGLOG_ERROR(Loader, "Failed to load file {}", filename); | 129 | LOG_ERROR(Loader, "Failed to load file {}", filename); |
| 130 | return nullptr; | 130 | return nullptr; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| @@ -137,12 +137,12 @@ std::unique_ptr<AppLoader> GetLoader(const std::string& filename) { | |||
| 137 | FileType filename_type = GuessFromExtension(filename_extension); | 137 | FileType filename_type = GuessFromExtension(filename_extension); |
| 138 | 138 | ||
| 139 | if (type != filename_type) { | 139 | if (type != filename_type) { |
| 140 | NGLOG_WARNING(Loader, "File {} has a different type than its extension.", filename); | 140 | LOG_WARNING(Loader, "File {} has a different type than its extension.", filename); |
| 141 | if (FileType::Unknown == type) | 141 | if (FileType::Unknown == type) |
| 142 | type = filename_type; | 142 | type = filename_type; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | NGLOG_DEBUG(Loader, "Loading file {} as {}...", filename, GetFileTypeString(type)); | 145 | LOG_DEBUG(Loader, "Loading file {} as {}...", filename, GetFileTypeString(type)); |
| 146 | 146 | ||
| 147 | return GetFileLoader(std::move(file), type, filename_filename, filename); | 147 | return GetFileLoader(std::move(file), type, filename_filename, filename); |
| 148 | } | 148 | } |
diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp index 067945d46..da064f8e3 100644 --- a/src/core/loader/nca.cpp +++ b/src/core/loader/nca.cpp | |||
| @@ -123,7 +123,7 @@ ResultStatus Nca::Load(FileUtil::IOFile&& in_file, std::string in_path) { | |||
| 123 | file.Seek(0, SEEK_SET); | 123 | file.Seek(0, SEEK_SET); |
| 124 | std::array<u8, sizeof(NcaHeader)> header_array{}; | 124 | std::array<u8, sizeof(NcaHeader)> header_array{}; |
| 125 | if (sizeof(NcaHeader) != file.ReadBytes(header_array.data(), sizeof(NcaHeader))) | 125 | if (sizeof(NcaHeader) != file.ReadBytes(header_array.data(), sizeof(NcaHeader))) |
| 126 | NGLOG_CRITICAL(Loader, "File reader errored out during header read."); | 126 | LOG_CRITICAL(Loader, "File reader errored out during header read."); |
| 127 | 127 | ||
| 128 | NcaHeader header{}; | 128 | NcaHeader header{}; |
| 129 | std::memcpy(&header, header_array.data(), sizeof(NcaHeader)); | 129 | std::memcpy(&header, header_array.data(), sizeof(NcaHeader)); |
| @@ -140,7 +140,7 @@ ResultStatus Nca::Load(FileUtil::IOFile&& in_file, std::string in_path) { | |||
| 140 | std::array<u8, sizeof(NcaSectionHeaderBlock)> array{}; | 140 | std::array<u8, sizeof(NcaSectionHeaderBlock)> array{}; |
| 141 | if (sizeof(NcaSectionHeaderBlock) != | 141 | if (sizeof(NcaSectionHeaderBlock) != |
| 142 | file.ReadBytes(array.data(), sizeof(NcaSectionHeaderBlock))) | 142 | file.ReadBytes(array.data(), sizeof(NcaSectionHeaderBlock))) |
| 143 | NGLOG_CRITICAL(Loader, "File reader errored out during header read."); | 143 | LOG_CRITICAL(Loader, "File reader errored out during header read."); |
| 144 | 144 | ||
| 145 | NcaSectionHeaderBlock block{}; | 145 | NcaSectionHeaderBlock block{}; |
| 146 | std::memcpy(&block, array.data(), sizeof(NcaSectionHeaderBlock)); | 146 | std::memcpy(&block, array.data(), sizeof(NcaSectionHeaderBlock)); |
| @@ -154,7 +154,7 @@ ResultStatus Nca::Load(FileUtil::IOFile&& in_file, std::string in_path) { | |||
| 154 | // Seek back to beginning of this section. | 154 | // Seek back to beginning of this section. |
| 155 | file.Seek(SECTION_HEADER_OFFSET + i * SECTION_HEADER_SIZE, SEEK_SET); | 155 | file.Seek(SECTION_HEADER_OFFSET + i * SECTION_HEADER_SIZE, SEEK_SET); |
| 156 | if (sizeof(Pfs0Superblock) != file.ReadBytes(&sb, sizeof(Pfs0Superblock))) | 156 | if (sizeof(Pfs0Superblock) != file.ReadBytes(&sb, sizeof(Pfs0Superblock))) |
| 157 | NGLOG_CRITICAL(Loader, "File reader errored out during header read."); | 157 | LOG_CRITICAL(Loader, "File reader errored out during header read."); |
| 158 | 158 | ||
| 159 | u64 offset = (static_cast<u64>(header.section_tables[i].media_offset) * | 159 | u64 offset = (static_cast<u64>(header.section_tables[i].media_offset) * |
| 160 | MEDIA_OFFSET_MULTIPLIER) + | 160 | MEDIA_OFFSET_MULTIPLIER) + |
| @@ -258,7 +258,7 @@ ResultStatus AppLoader_NCA::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 258 | const VAddr load_addr = next_load_addr; | 258 | const VAddr load_addr = next_load_addr; |
| 259 | next_load_addr = AppLoader_NSO::LoadModule(module, nca->GetExeFsFile(module), load_addr); | 259 | next_load_addr = AppLoader_NSO::LoadModule(module, nca->GetExeFsFile(module), load_addr); |
| 260 | if (next_load_addr) { | 260 | if (next_load_addr) { |
| 261 | NGLOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", module, load_addr); | 261 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", module, load_addr); |
| 262 | } else { | 262 | } else { |
| 263 | next_load_addr = load_addr; | 263 | next_load_addr = load_addr; |
| 264 | } | 264 | } |
| @@ -283,7 +283,7 @@ ResultStatus AppLoader_NCA::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 283 | ResultStatus AppLoader_NCA::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, | 283 | ResultStatus AppLoader_NCA::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_file, u64& offset, |
| 284 | u64& size) { | 284 | u64& size) { |
| 285 | if (nca->GetRomFsSize() == 0) { | 285 | if (nca->GetRomFsSize() == 0) { |
| 286 | NGLOG_DEBUG(Loader, "No RomFS available"); | 286 | LOG_DEBUG(Loader, "No RomFS available"); |
| 287 | return ResultStatus::ErrorNotUsed; | 287 | return ResultStatus::ErrorNotUsed; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| @@ -292,8 +292,8 @@ ResultStatus AppLoader_NCA::ReadRomFS(std::shared_ptr<FileUtil::IOFile>& romfs_f | |||
| 292 | offset = nca->GetRomFsOffset(); | 292 | offset = nca->GetRomFsOffset(); |
| 293 | size = nca->GetRomFsSize(); | 293 | size = nca->GetRomFsSize(); |
| 294 | 294 | ||
| 295 | NGLOG_DEBUG(Loader, "RomFS offset: 0x{:016X}", offset); | 295 | LOG_DEBUG(Loader, "RomFS offset: 0x{:016X}", offset); |
| 296 | NGLOG_DEBUG(Loader, "RomFS size: 0x{:016X}", size); | 296 | LOG_DEBUG(Loader, "RomFS size: 0x{:016X}", size); |
| 297 | 297 | ||
| 298 | return ResultStatus::Success; | 298 | return ResultStatus::Success; |
| 299 | } | 299 | } |
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 845ed7e90..7f84e4b1b 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -87,7 +87,7 @@ static std::vector<u8> ReadSegment(FileUtil::IOFile& file, const NsoSegmentHeade | |||
| 87 | 87 | ||
| 88 | file.Seek(header.offset, SEEK_SET); | 88 | file.Seek(header.offset, SEEK_SET); |
| 89 | if (compressed_size != file.ReadBytes(compressed_data.data(), compressed_size)) { | 89 | if (compressed_size != file.ReadBytes(compressed_data.data(), compressed_size)) { |
| 90 | NGLOG_CRITICAL(Loader, "Failed to read {} NSO LZ4 compressed bytes", compressed_size); | 90 | LOG_CRITICAL(Loader, "Failed to read {} NSO LZ4 compressed bytes", compressed_size); |
| 91 | return {}; | 91 | return {}; |
| 92 | } | 92 | } |
| 93 | 93 | ||
| @@ -215,7 +215,7 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 215 | 215 | ||
| 216 | // Load module | 216 | // Load module |
| 217 | LoadModule(filepath, Memory::PROCESS_IMAGE_VADDR); | 217 | LoadModule(filepath, Memory::PROCESS_IMAGE_VADDR); |
| 218 | NGLOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", filepath, Memory::PROCESS_IMAGE_VADDR); | 218 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", filepath, Memory::PROCESS_IMAGE_VADDR); |
| 219 | 219 | ||
| 220 | process->svc_access_mask.set(); | 220 | process->svc_access_mask.set(); |
| 221 | process->address_mappings = default_address_mappings; | 221 | process->address_mappings = default_address_mappings; |
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index f070dee7d..103ff0b77 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -43,7 +43,7 @@ PageTable* GetCurrentPageTable() { | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { | 45 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { |
| 46 | NGLOG_DEBUG(HW_Memory, "Mapping {} onto {:016X}-{:016X}", fmt::ptr(memory), base * PAGE_SIZE, | 46 | LOG_DEBUG(HW_Memory, "Mapping {} onto {:016X}-{:016X}", fmt::ptr(memory), base * PAGE_SIZE, |
| 47 | (base + size) * PAGE_SIZE); | 47 | (base + size) * PAGE_SIZE); |
| 48 | 48 | ||
| 49 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, | 49 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, |
| @@ -173,7 +173,7 @@ T Read(const VAddr vaddr) { | |||
| 173 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | 173 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; |
| 174 | switch (type) { | 174 | switch (type) { |
| 175 | case PageType::Unmapped: | 175 | case PageType::Unmapped: |
| 176 | NGLOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:08X}", sizeof(T) * 8, vaddr); | 176 | LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:08X}", sizeof(T) * 8, vaddr); |
| 177 | return 0; | 177 | return 0; |
| 178 | case PageType::Memory: | 178 | case PageType::Memory: |
| 179 | ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr); | 179 | ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr); |
| @@ -205,7 +205,7 @@ void Write(const VAddr vaddr, const T data) { | |||
| 205 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; | 205 | PageType type = current_page_table->attributes[vaddr >> PAGE_BITS]; |
| 206 | switch (type) { | 206 | switch (type) { |
| 207 | case PageType::Unmapped: | 207 | case PageType::Unmapped: |
| 208 | NGLOG_ERROR(HW_Memory, "Unmapped Write{} 0x{:08X} @ 0x{:016X}", sizeof(data) * 8, | 208 | LOG_ERROR(HW_Memory, "Unmapped Write{} 0x{:08X} @ 0x{:016X}", sizeof(data) * 8, |
| 209 | static_cast<u32>(data), vaddr); | 209 | static_cast<u32>(data), vaddr); |
| 210 | return; | 210 | return; |
| 211 | case PageType::Memory: | 211 | case PageType::Memory: |
| @@ -259,7 +259,7 @@ u8* GetPointer(const VAddr vaddr) { | |||
| 259 | return GetPointerFromVMA(vaddr); | 259 | return GetPointerFromVMA(vaddr); |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | NGLOG_ERROR(HW_Memory, "Unknown GetPointer @ 0x{:016X}", vaddr); | 262 | LOG_ERROR(HW_Memory, "Unknown GetPointer @ 0x{:016X}", vaddr); |
| 263 | return nullptr; | 263 | return nullptr; |
| 264 | } | 264 | } |
| 265 | 265 | ||
| @@ -296,12 +296,12 @@ u8* GetPhysicalPointer(PAddr address) { | |||
| 296 | }); | 296 | }); |
| 297 | 297 | ||
| 298 | if (area == std::end(memory_areas)) { | 298 | if (area == std::end(memory_areas)) { |
| 299 | NGLOG_ERROR(HW_Memory, "Unknown GetPhysicalPointer @ 0x{:016X}", address); | 299 | LOG_ERROR(HW_Memory, "Unknown GetPhysicalPointer @ 0x{:016X}", address); |
| 300 | return nullptr; | 300 | return nullptr; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | if (area->paddr_base == IO_AREA_PADDR) { | 303 | if (area->paddr_base == IO_AREA_PADDR) { |
| 304 | NGLOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr={:016X}", address); | 304 | LOG_ERROR(HW_Memory, "MMIO mappings are not supported yet. phys_addr={:016X}", address); |
| 305 | return nullptr; | 305 | return nullptr; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| @@ -348,7 +348,7 @@ void RasterizerMarkRegionCached(Tegra::GPUVAddr gpu_addr, u64 size, bool cached) | |||
| 348 | Core::System::GetInstance().GPU().memory_manager->GpuToCpuAddress(gpu_addr); | 348 | Core::System::GetInstance().GPU().memory_manager->GpuToCpuAddress(gpu_addr); |
| 349 | // The GPU <-> CPU virtual memory mapping is not 1:1 | 349 | // The GPU <-> CPU virtual memory mapping is not 1:1 |
| 350 | if (!maybe_vaddr) { | 350 | if (!maybe_vaddr) { |
| 351 | NGLOG_ERROR(HW_Memory, | 351 | LOG_ERROR(HW_Memory, |
| 352 | "Trying to flush a cached region to an invalid physical address {:016X}", | 352 | "Trying to flush a cached region to an invalid physical address {:016X}", |
| 353 | gpu_addr); | 353 | gpu_addr); |
| 354 | continue; | 354 | continue; |
| @@ -484,7 +484,7 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_ | |||
| 484 | 484 | ||
| 485 | switch (page_table.attributes[page_index]) { | 485 | switch (page_table.attributes[page_index]) { |
| 486 | case PageType::Unmapped: { | 486 | case PageType::Unmapped: { |
| 487 | NGLOG_ERROR(HW_Memory, | 487 | LOG_ERROR(HW_Memory, |
| 488 | "Unmapped ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 488 | "Unmapped ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 489 | current_vaddr, src_addr, size); | 489 | current_vaddr, src_addr, size); |
| 490 | std::memset(dest_buffer, 0, copy_amount); | 490 | std::memset(dest_buffer, 0, copy_amount); |
| @@ -548,7 +548,7 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi | |||
| 548 | 548 | ||
| 549 | switch (page_table.attributes[page_index]) { | 549 | switch (page_table.attributes[page_index]) { |
| 550 | case PageType::Unmapped: { | 550 | case PageType::Unmapped: { |
| 551 | NGLOG_ERROR(HW_Memory, | 551 | LOG_ERROR(HW_Memory, |
| 552 | "Unmapped WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 552 | "Unmapped WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 553 | current_vaddr, dest_addr, size); | 553 | current_vaddr, dest_addr, size); |
| 554 | break; | 554 | break; |
| @@ -596,7 +596,7 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size | |||
| 596 | 596 | ||
| 597 | switch (page_table.attributes[page_index]) { | 597 | switch (page_table.attributes[page_index]) { |
| 598 | case PageType::Unmapped: { | 598 | case PageType::Unmapped: { |
| 599 | NGLOG_ERROR(HW_Memory, | 599 | LOG_ERROR(HW_Memory, |
| 600 | "Unmapped ZeroBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 600 | "Unmapped ZeroBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 601 | current_vaddr, dest_addr, size); | 601 | current_vaddr, dest_addr, size); |
| 602 | break; | 602 | break; |
| @@ -637,7 +637,7 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, | |||
| 637 | 637 | ||
| 638 | switch (page_table.attributes[page_index]) { | 638 | switch (page_table.attributes[page_index]) { |
| 639 | case PageType::Unmapped: { | 639 | case PageType::Unmapped: { |
| 640 | NGLOG_ERROR(HW_Memory, | 640 | LOG_ERROR(HW_Memory, |
| 641 | "Unmapped CopyBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 641 | "Unmapped CopyBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 642 | current_vaddr, src_addr, size); | 642 | current_vaddr, src_addr, size); |
| 643 | ZeroBlock(process, dest_addr, copy_amount); | 643 | ZeroBlock(process, dest_addr, copy_amount); |
| @@ -692,7 +692,7 @@ boost::optional<PAddr> TryVirtualToPhysicalAddress(const VAddr addr) { | |||
| 692 | PAddr VirtualToPhysicalAddress(const VAddr addr) { | 692 | PAddr VirtualToPhysicalAddress(const VAddr addr) { |
| 693 | auto paddr = TryVirtualToPhysicalAddress(addr); | 693 | auto paddr = TryVirtualToPhysicalAddress(addr); |
| 694 | if (!paddr) { | 694 | if (!paddr) { |
| 695 | NGLOG_ERROR(HW_Memory, "Unknown virtual address @ 0x{:016X}", addr); | 695 | LOG_ERROR(HW_Memory, "Unknown virtual address @ 0x{:016X}", addr); |
| 696 | // To help with debugging, set bit on address so that it's obviously invalid. | 696 | // To help with debugging, set bit on address so that it's obviously invalid. |
| 697 | return addr | 0x80000000; | 697 | return addr | 0x80000000; |
| 698 | } | 698 | } |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 270d68222..b9a603df3 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -42,14 +42,14 @@ u64 GetTelemetryId() { | |||
| 42 | if (FileUtil::Exists(filename)) { | 42 | if (FileUtil::Exists(filename)) { |
| 43 | FileUtil::IOFile file(filename, "rb"); | 43 | FileUtil::IOFile file(filename, "rb"); |
| 44 | if (!file.IsOpen()) { | 44 | if (!file.IsOpen()) { |
| 45 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | 45 | LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 46 | return {}; | 46 | return {}; |
| 47 | } | 47 | } |
| 48 | file.ReadBytes(&telemetry_id, sizeof(u64)); | 48 | file.ReadBytes(&telemetry_id, sizeof(u64)); |
| 49 | } else { | 49 | } else { |
| 50 | FileUtil::IOFile file(filename, "wb"); | 50 | FileUtil::IOFile file(filename, "wb"); |
| 51 | if (!file.IsOpen()) { | 51 | if (!file.IsOpen()) { |
| 52 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | 52 | LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 53 | return {}; | 53 | return {}; |
| 54 | } | 54 | } |
| 55 | telemetry_id = GenerateTelemetryId(); | 55 | telemetry_id = GenerateTelemetryId(); |
| @@ -65,7 +65,7 @@ u64 RegenerateTelemetryId() { | |||
| 65 | 65 | ||
| 66 | FileUtil::IOFile file(filename, "wb"); | 66 | FileUtil::IOFile file(filename, "wb"); |
| 67 | if (!file.IsOpen()) { | 67 | if (!file.IsOpen()) { |
| 68 | NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename); | 68 | LOG_ERROR(Core, "failed to open telemetry_id: {}", filename); |
| 69 | return {}; | 69 | return {}; |
| 70 | } | 70 | } |
| 71 | file.WriteBytes(&new_telemetry_id, sizeof(u64)); | 71 | file.WriteBytes(&new_telemetry_id, sizeof(u64)); |
diff --git a/src/core/tracer/recorder.cpp b/src/core/tracer/recorder.cpp index 2f848c994..af032f0c9 100644 --- a/src/core/tracer/recorder.cpp +++ b/src/core/tracer/recorder.cpp | |||
| @@ -159,7 +159,7 @@ void Recorder::Finish(const std::string& filename) { | |||
| 159 | throw "Failed to write stream element"; | 159 | throw "Failed to write stream element"; |
| 160 | } | 160 | } |
| 161 | } catch (const char* str) { | 161 | } catch (const char* str) { |
| 162 | NGLOG_ERROR(HW_GPU, "Writing CiTrace file failed: {}", str); | 162 | LOG_ERROR(HW_GPU, "Writing CiTrace file failed: {}", str); |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
| 165 | 165 | ||
diff --git a/src/input_common/sdl/sdl.cpp b/src/input_common/sdl/sdl.cpp index 231a0f7af..8d117c2d4 100644 --- a/src/input_common/sdl/sdl.cpp +++ b/src/input_common/sdl/sdl.cpp | |||
| @@ -32,7 +32,7 @@ public: | |||
| 32 | explicit SDLJoystick(int joystick_index) | 32 | explicit SDLJoystick(int joystick_index) |
| 33 | : joystick{SDL_JoystickOpen(joystick_index), SDL_JoystickClose} { | 33 | : joystick{SDL_JoystickOpen(joystick_index), SDL_JoystickClose} { |
| 34 | if (!joystick) { | 34 | if (!joystick) { |
| 35 | NGLOG_ERROR(Input, "failed to open joystick {}", joystick_index); | 35 | LOG_ERROR(Input, "failed to open joystick {}", joystick_index); |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | 38 | ||
| @@ -204,7 +204,7 @@ public: | |||
| 204 | trigger_if_greater = false; | 204 | trigger_if_greater = false; |
| 205 | } else { | 205 | } else { |
| 206 | trigger_if_greater = true; | 206 | trigger_if_greater = true; |
| 207 | NGLOG_ERROR(Input, "Unknown direction '{}'", direction_name); | 207 | LOG_ERROR(Input, "Unknown direction '{}'", direction_name); |
| 208 | } | 208 | } |
| 209 | return std::make_unique<SDLAxisButton>(GetJoystick(joystick_index), axis, threshold, | 209 | return std::make_unique<SDLAxisButton>(GetJoystick(joystick_index), axis, threshold, |
| 210 | trigger_if_greater); | 210 | trigger_if_greater); |
| @@ -235,7 +235,7 @@ public: | |||
| 235 | 235 | ||
| 236 | void Init() { | 236 | void Init() { |
| 237 | if (SDL_Init(SDL_INIT_JOYSTICK) < 0) { | 237 | if (SDL_Init(SDL_INIT_JOYSTICK) < 0) { |
| 238 | NGLOG_CRITICAL(Input, "SDL_Init(SDL_INIT_JOYSTICK) failed with: {}", SDL_GetError()); | 238 | LOG_CRITICAL(Input, "SDL_Init(SDL_INIT_JOYSTICK) failed with: {}", SDL_GetError()); |
| 239 | } else { | 239 | } else { |
| 240 | using namespace Input; | 240 | using namespace Input; |
| 241 | RegisterFactory<ButtonDevice>("sdl", std::make_shared<SDLButtonFactory>()); | 241 | RegisterFactory<ButtonDevice>("sdl", std::make_shared<SDLButtonFactory>()); |
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index cec9cb9f3..98b33c201 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -29,21 +29,21 @@ enum class BufferMethods { | |||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) { | 31 | void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params) { |
| 32 | NGLOG_WARNING(HW_GPU, | 32 | LOG_WARNING(HW_GPU, |
| 33 | "Processing method {:08X} on subchannel {} value " | 33 | "Processing method {:08X} on subchannel {} value " |
| 34 | "{:08X} remaining params {}", | 34 | "{:08X} remaining params {}", |
| 35 | method, subchannel, value, remaining_params); | 35 | method, subchannel, value, remaining_params); |
| 36 | 36 | ||
| 37 | if (method == static_cast<u32>(BufferMethods::BindObject)) { | 37 | if (method == static_cast<u32>(BufferMethods::BindObject)) { |
| 38 | // Bind the current subchannel to the desired engine id. | 38 | // Bind the current subchannel to the desired engine id. |
| 39 | NGLOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", subchannel, value); | 39 | LOG_DEBUG(HW_GPU, "Binding subchannel {} to engine {}", subchannel, value); |
| 40 | bound_engines[subchannel] = static_cast<EngineID>(value); | 40 | bound_engines[subchannel] = static_cast<EngineID>(value); |
| 41 | return; | 41 | return; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | if (method < static_cast<u32>(BufferMethods::CountBufferMethods)) { | 44 | if (method < static_cast<u32>(BufferMethods::CountBufferMethods)) { |
| 45 | // TODO(Subv): Research and implement these methods. | 45 | // TODO(Subv): Research and implement these methods. |
| 46 | NGLOG_ERROR(HW_GPU, "Special buffer methods other than Bind are not implemented"); | 46 | LOG_ERROR(HW_GPU, "Special buffer methods other than Bind are not implemented"); |
| 47 | return; | 47 | return; |
| 48 | } | 48 | } |
| 49 | 49 | ||
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 998b7c843..f9cbab8e2 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -26,7 +26,7 @@ void Fermi2D::WriteReg(u32 method, u32 value) { | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void Fermi2D::HandleSurfaceCopy() { | 28 | void Fermi2D::HandleSurfaceCopy() { |
| 29 | NGLOG_WARNING(HW_GPU, "Requested a surface copy with operation {}", | 29 | LOG_WARNING(HW_GPU, "Requested a surface copy with operation {}", |
| 30 | static_cast<u32>(regs.operation)); | 30 | static_cast<u32>(regs.operation)); |
| 31 | 31 | ||
| 32 | const GPUVAddr source = regs.src.Address(); | 32 | const GPUVAddr source = regs.src.Address(); |
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 93c43c8cb..bbd34f060 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -207,7 +207,7 @@ void Maxwell3D::ProcessQueryGet() { | |||
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | void Maxwell3D::DrawArrays() { | 209 | void Maxwell3D::DrawArrays() { |
| 210 | NGLOG_DEBUG(HW_GPU, "called, topology={}, count={}", | 210 | LOG_DEBUG(HW_GPU, "called, topology={}, count={}", |
| 211 | static_cast<u32>(regs.draw.topology.Value()), regs.vertex_buffer.count); | 211 | static_cast<u32>(regs.draw.topology.Value()), regs.vertex_buffer.count); |
| 212 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); | 212 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); |
| 213 | 213 | ||
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index c298f0bfb..6e740713f 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp | |||
| @@ -31,7 +31,7 @@ void MaxwellDMA::WriteReg(u32 method, u32 value) { | |||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void MaxwellDMA::HandleCopy() { | 33 | void MaxwellDMA::HandleCopy() { |
| 34 | NGLOG_WARNING(HW_GPU, "Requested a DMA copy"); | 34 | LOG_WARNING(HW_GPU, "Requested a DMA copy"); |
| 35 | 35 | ||
| 36 | const GPUVAddr source = regs.src_address.Address(); | 36 | const GPUVAddr source = regs.src_address.Address(); |
| 37 | const GPUVAddr dest = regs.dst_address.Address(); | 37 | const GPUVAddr dest = regs.dst_address.Address(); |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index ca3814cfc..99282dac3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -112,7 +112,7 @@ RasterizerOpenGL::RasterizerOpenGL() { | |||
| 112 | 112 | ||
| 113 | glEnable(GL_BLEND); | 113 | glEnable(GL_BLEND); |
| 114 | 114 | ||
| 115 | NGLOG_CRITICAL(Render_OpenGL, "Sync fixed function OpenGL state here!"); | 115 | LOG_CRITICAL(Render_OpenGL, "Sync fixed function OpenGL state here!"); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | RasterizerOpenGL::~RasterizerOpenGL() { | 118 | RasterizerOpenGL::~RasterizerOpenGL() { |
| @@ -165,7 +165,7 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, | |||
| 165 | // assume every shader uses them all. | 165 | // assume every shader uses them all. |
| 166 | for (unsigned index = 0; index < 16; ++index) { | 166 | for (unsigned index = 0; index < 16; ++index) { |
| 167 | auto& attrib = regs.vertex_attrib_format[index]; | 167 | auto& attrib = regs.vertex_attrib_format[index]; |
| 168 | NGLOG_DEBUG(HW_GPU, "vertex attrib {}, count={}, size={}, type={}, offset={}, normalize={}", | 168 | LOG_DEBUG(HW_GPU, "vertex attrib {}, count={}, size={}, type={}, offset={}, normalize={}", |
| 169 | index, attrib.ComponentCount(), attrib.SizeString(), attrib.TypeString(), | 169 | index, attrib.ComponentCount(), attrib.SizeString(), attrib.TypeString(), |
| 170 | attrib.offset.Value(), attrib.IsNormalized()); | 170 | attrib.offset.Value(), attrib.IsNormalized()); |
| 171 | 171 | ||
| @@ -251,7 +251,7 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { | |||
| 251 | break; | 251 | break; |
| 252 | } | 252 | } |
| 253 | default: | 253 | default: |
| 254 | NGLOG_CRITICAL(HW_GPU, "Unimplemented shader index={}, enable={}, offset=0x{:08X}", | 254 | LOG_CRITICAL(HW_GPU, "Unimplemented shader index={}, enable={}, offset=0x{:08X}", |
| 255 | index, shader_config.enable.Value(), shader_config.offset); | 255 | index, shader_config.enable.Value(), shader_config.offset); |
| 256 | UNREACHABLE(); | 256 | UNREACHABLE(); |
| 257 | } | 257 | } |
| @@ -587,7 +587,7 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr | |||
| 587 | size = buffer.size * sizeof(float); | 587 | size = buffer.size * sizeof(float); |
| 588 | 588 | ||
| 589 | if (size > MaxConstbufferSize) { | 589 | if (size > MaxConstbufferSize) { |
| 590 | NGLOG_ERROR(HW_GPU, "indirect constbuffer size {} exceeds maximum {}", size, | 590 | LOG_ERROR(HW_GPU, "indirect constbuffer size {} exceeds maximum {}", size, |
| 591 | MaxConstbufferSize); | 591 | MaxConstbufferSize); |
| 592 | size = MaxConstbufferSize; | 592 | size = MaxConstbufferSize; |
| 593 | } | 593 | } |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 851ebc263..f9b4a4b87 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -117,7 +117,7 @@ static std::pair<u32, u32> GetASTCBlockSize(PixelFormat format) { | |||
| 117 | case PixelFormat::ASTC_2D_4X4: | 117 | case PixelFormat::ASTC_2D_4X4: |
| 118 | return {4, 4}; | 118 | return {4, 4}; |
| 119 | default: | 119 | default: |
| 120 | NGLOG_CRITICAL(HW_GPU, "Unhandled format: {}", static_cast<u32>(format)); | 120 | LOG_CRITICAL(HW_GPU, "Unhandled format: {}", static_cast<u32>(format)); |
| 121 | UNREACHABLE(); | 121 | UNREACHABLE(); |
| 122 | } | 122 | } |
| 123 | } | 123 | } |
| @@ -159,7 +159,7 @@ void MortonCopy(u32 stride, u32 block_height, u32 height, u8* gl_buffer, Tegra:: | |||
| 159 | } else { | 159 | } else { |
| 160 | // TODO(bunnei): Assumes the default rendering GOB size of 16 (128 lines). We should | 160 | // TODO(bunnei): Assumes the default rendering GOB size of 16 (128 lines). We should |
| 161 | // check the configuration for this and perform more generic un/swizzle | 161 | // check the configuration for this and perform more generic un/swizzle |
| 162 | NGLOG_WARNING(Render_OpenGL, "need to use correct swizzle/GOB parameters!"); | 162 | LOG_WARNING(Render_OpenGL, "need to use correct swizzle/GOB parameters!"); |
| 163 | VideoCore::MortonCopyPixels128( | 163 | VideoCore::MortonCopyPixels128( |
| 164 | stride, height, bytes_per_pixel, gl_bytes_per_pixel, | 164 | stride, height, bytes_per_pixel, gl_bytes_per_pixel, |
| 165 | Memory::GetPointer(*gpu.memory_manager->GpuToCpuAddress(addr)), gl_buffer, | 165 | Memory::GetPointer(*gpu.memory_manager->GpuToCpuAddress(addr)), gl_buffer, |
| @@ -396,7 +396,7 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( | |||
| 396 | const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; | 396 | const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; |
| 397 | 397 | ||
| 398 | // TODO(bunnei): This is hard corded to use just the first render buffer | 398 | // TODO(bunnei): This is hard corded to use just the first render buffer |
| 399 | NGLOG_WARNING(Render_OpenGL, "hard-coded for render target 0!"); | 399 | LOG_WARNING(Render_OpenGL, "hard-coded for render target 0!"); |
| 400 | 400 | ||
| 401 | // get color and depth surfaces | 401 | // get color and depth surfaces |
| 402 | const SurfaceParams color_params{SurfaceParams::CreateForFramebuffer(regs.rt[0])}; | 402 | const SurfaceParams color_params{SurfaceParams::CreateForFramebuffer(regs.rt[0])}; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index eea432b0b..459abbdc2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -131,7 +131,7 @@ struct SurfaceParams { | |||
| 131 | case Tegra::DepthFormat::Z24_S8_UNORM: | 131 | case Tegra::DepthFormat::Z24_S8_UNORM: |
| 132 | return PixelFormat::Z24S8; | 132 | return PixelFormat::Z24S8; |
| 133 | default: | 133 | default: |
| 134 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 134 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 135 | UNREACHABLE(); | 135 | UNREACHABLE(); |
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| @@ -150,7 +150,7 @@ struct SurfaceParams { | |||
| 150 | case Tegra::RenderTargetFormat::RGBA32_UINT: | 150 | case Tegra::RenderTargetFormat::RGBA32_UINT: |
| 151 | return PixelFormat::RGBA32UI; | 151 | return PixelFormat::RGBA32UI; |
| 152 | default: | 152 | default: |
| 153 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 153 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 154 | UNREACHABLE(); | 154 | UNREACHABLE(); |
| 155 | } | 155 | } |
| 156 | } | 156 | } |
| @@ -185,7 +185,7 @@ struct SurfaceParams { | |||
| 185 | case Tegra::Texture::TextureFormat::ASTC_2D_4X4: | 185 | case Tegra::Texture::TextureFormat::ASTC_2D_4X4: |
| 186 | return PixelFormat::ASTC_2D_4X4; | 186 | return PixelFormat::ASTC_2D_4X4; |
| 187 | default: | 187 | default: |
| 188 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 188 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 189 | UNREACHABLE(); | 189 | UNREACHABLE(); |
| 190 | } | 190 | } |
| 191 | } | 191 | } |
| @@ -239,7 +239,7 @@ struct SurfaceParams { | |||
| 239 | case Tegra::Texture::ComponentType::UNORM: | 239 | case Tegra::Texture::ComponentType::UNORM: |
| 240 | return ComponentType::UNorm; | 240 | return ComponentType::UNorm; |
| 241 | default: | 241 | default: |
| 242 | NGLOG_CRITICAL(HW_GPU, "Unimplemented component type={}", static_cast<u32>(type)); | 242 | LOG_CRITICAL(HW_GPU, "Unimplemented component type={}", static_cast<u32>(type)); |
| 243 | UNREACHABLE(); | 243 | UNREACHABLE(); |
| 244 | } | 244 | } |
| 245 | } | 245 | } |
| @@ -257,7 +257,7 @@ struct SurfaceParams { | |||
| 257 | case Tegra::RenderTargetFormat::RGBA32_UINT: | 257 | case Tegra::RenderTargetFormat::RGBA32_UINT: |
| 258 | return ComponentType::UInt; | 258 | return ComponentType::UInt; |
| 259 | default: | 259 | default: |
| 260 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 260 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 261 | UNREACHABLE(); | 261 | UNREACHABLE(); |
| 262 | } | 262 | } |
| 263 | } | 263 | } |
| @@ -267,7 +267,7 @@ struct SurfaceParams { | |||
| 267 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: | 267 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: |
| 268 | return PixelFormat::ABGR8; | 268 | return PixelFormat::ABGR8; |
| 269 | default: | 269 | default: |
| 270 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 270 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 271 | UNREACHABLE(); | 271 | UNREACHABLE(); |
| 272 | } | 272 | } |
| 273 | } | 273 | } |
| @@ -277,7 +277,7 @@ struct SurfaceParams { | |||
| 277 | case Tegra::DepthFormat::Z24_S8_UNORM: | 277 | case Tegra::DepthFormat::Z24_S8_UNORM: |
| 278 | return ComponentType::UNorm; | 278 | return ComponentType::UNorm; |
| 279 | default: | 279 | default: |
| 280 | NGLOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 280 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 281 | UNREACHABLE(); | 281 | UNREACHABLE(); |
| 282 | } | 282 | } |
| 283 | } | 283 | } |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index bbccf0bfd..2e801cdf6 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -283,7 +283,7 @@ public: | |||
| 283 | // Default - do nothing | 283 | // Default - do nothing |
| 284 | return value; | 284 | return value; |
| 285 | default: | 285 | default: |
| 286 | NGLOG_CRITICAL(HW_GPU, "Unimplemented conversion size {}", static_cast<u32>(size)); | 286 | LOG_CRITICAL(HW_GPU, "Unimplemented conversion size {}", static_cast<u32>(size)); |
| 287 | UNREACHABLE(); | 287 | UNREACHABLE(); |
| 288 | } | 288 | } |
| 289 | } | 289 | } |
| @@ -581,7 +581,7 @@ private: | |||
| 581 | return "input_attribute_" + std::to_string(index); | 581 | return "input_attribute_" + std::to_string(index); |
| 582 | } | 582 | } |
| 583 | 583 | ||
| 584 | NGLOG_CRITICAL(HW_GPU, "Unhandled input attribute: {}", index); | 584 | LOG_CRITICAL(HW_GPU, "Unhandled input attribute: {}", index); |
| 585 | UNREACHABLE(); | 585 | UNREACHABLE(); |
| 586 | } | 586 | } |
| 587 | } | 587 | } |
| @@ -599,7 +599,7 @@ private: | |||
| 599 | return "output_attribute_" + std::to_string(index); | 599 | return "output_attribute_" + std::to_string(index); |
| 600 | } | 600 | } |
| 601 | 601 | ||
| 602 | NGLOG_CRITICAL(HW_GPU, "Unhandled output attribute: {}", index); | 602 | LOG_CRITICAL(HW_GPU, "Unhandled output attribute: {}", index); |
| 603 | UNREACHABLE(); | 603 | UNREACHABLE(); |
| 604 | } | 604 | } |
| 605 | } | 605 | } |
| @@ -797,7 +797,7 @@ private: | |||
| 797 | break; | 797 | break; |
| 798 | } | 798 | } |
| 799 | default: | 799 | default: |
| 800 | NGLOG_CRITICAL(HW_GPU, "Unimplemented logic operation: {}", static_cast<u32>(logic_op)); | 800 | LOG_CRITICAL(HW_GPU, "Unimplemented logic operation: {}", static_cast<u32>(logic_op)); |
| 801 | UNREACHABLE(); | 801 | UNREACHABLE(); |
| 802 | } | 802 | } |
| 803 | } | 803 | } |
| @@ -819,7 +819,7 @@ private: | |||
| 819 | 819 | ||
| 820 | // Decoding failure | 820 | // Decoding failure |
| 821 | if (!opcode) { | 821 | if (!opcode) { |
| 822 | NGLOG_CRITICAL(HW_GPU, "Unhandled instruction: {0:x}", instr.value); | 822 | LOG_CRITICAL(HW_GPU, "Unhandled instruction: {0:x}", instr.value); |
| 823 | UNREACHABLE(); | 823 | UNREACHABLE(); |
| 824 | return offset + 1; | 824 | return offset + 1; |
| 825 | } | 825 | } |
| @@ -918,7 +918,7 @@ private: | |||
| 918 | instr.alu.saturate_d); | 918 | instr.alu.saturate_d); |
| 919 | break; | 919 | break; |
| 920 | default: | 920 | default: |
| 921 | NGLOG_CRITICAL(HW_GPU, "Unhandled MUFU sub op: {0:x}", | 921 | LOG_CRITICAL(HW_GPU, "Unhandled MUFU sub op: {0:x}", |
| 922 | static_cast<unsigned>(instr.sub_op.Value())); | 922 | static_cast<unsigned>(instr.sub_op.Value())); |
| 923 | UNREACHABLE(); | 923 | UNREACHABLE(); |
| 924 | } | 924 | } |
| @@ -942,11 +942,11 @@ private: | |||
| 942 | // Currently RRO is only implemented as a register move. | 942 | // Currently RRO is only implemented as a register move. |
| 943 | // Usage of `abs_b` and `negate_b` here should also be correct. | 943 | // Usage of `abs_b` and `negate_b` here should also be correct. |
| 944 | regs.SetRegisterToFloat(instr.gpr0, 0, op_b, 1, 1); | 944 | regs.SetRegisterToFloat(instr.gpr0, 0, op_b, 1, 1); |
| 945 | NGLOG_WARNING(HW_GPU, "RRO instruction is incomplete"); | 945 | LOG_WARNING(HW_GPU, "RRO instruction is incomplete"); |
| 946 | break; | 946 | break; |
| 947 | } | 947 | } |
| 948 | default: { | 948 | default: { |
| 949 | NGLOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: {}", opcode->GetName()); | 949 | LOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: {}", opcode->GetName()); |
| 950 | UNREACHABLE(); | 950 | UNREACHABLE(); |
| 951 | } | 951 | } |
| 952 | } | 952 | } |
| @@ -985,7 +985,7 @@ private: | |||
| 985 | break; | 985 | break; |
| 986 | } | 986 | } |
| 987 | default: { | 987 | default: { |
| 988 | NGLOG_CRITICAL(HW_GPU, "Unhandled BFE instruction: {}", opcode->GetName()); | 988 | LOG_CRITICAL(HW_GPU, "Unhandled BFE instruction: {}", opcode->GetName()); |
| 989 | UNREACHABLE(); | 989 | UNREACHABLE(); |
| 990 | } | 990 | } |
| 991 | } | 991 | } |
| @@ -1028,7 +1028,7 @@ private: | |||
| 1028 | regs.SetRegisterToInteger(instr.gpr0, true, 0, op_a + " << " + op_b, 1, 1); | 1028 | regs.SetRegisterToInteger(instr.gpr0, true, 0, op_a + " << " + op_b, 1, 1); |
| 1029 | break; | 1029 | break; |
| 1030 | default: { | 1030 | default: { |
| 1031 | NGLOG_CRITICAL(HW_GPU, "Unhandled shift instruction: {}", opcode->GetName()); | 1031 | LOG_CRITICAL(HW_GPU, "Unhandled shift instruction: {}", opcode->GetName()); |
| 1032 | UNREACHABLE(); | 1032 | UNREACHABLE(); |
| 1033 | } | 1033 | } |
| 1034 | } | 1034 | } |
| @@ -1058,7 +1058,7 @@ private: | |||
| 1058 | break; | 1058 | break; |
| 1059 | } | 1059 | } |
| 1060 | default: { | 1060 | default: { |
| 1061 | NGLOG_CRITICAL(HW_GPU, "Unhandled ArithmeticIntegerImmediate instruction: {}", | 1061 | LOG_CRITICAL(HW_GPU, "Unhandled ArithmeticIntegerImmediate instruction: {}", |
| 1062 | opcode->GetName()); | 1062 | opcode->GetName()); |
| 1063 | UNREACHABLE(); | 1063 | UNREACHABLE(); |
| 1064 | } | 1064 | } |
| @@ -1124,7 +1124,7 @@ private: | |||
| 1124 | break; | 1124 | break; |
| 1125 | } | 1125 | } |
| 1126 | default: { | 1126 | default: { |
| 1127 | NGLOG_CRITICAL(HW_GPU, "Unhandled ArithmeticInteger instruction: {}", | 1127 | LOG_CRITICAL(HW_GPU, "Unhandled ArithmeticInteger instruction: {}", |
| 1128 | opcode->GetName()); | 1128 | opcode->GetName()); |
| 1129 | UNREACHABLE(); | 1129 | UNREACHABLE(); |
| 1130 | } | 1130 | } |
| @@ -1161,7 +1161,7 @@ private: | |||
| 1161 | break; | 1161 | break; |
| 1162 | } | 1162 | } |
| 1163 | default: { | 1163 | default: { |
| 1164 | NGLOG_CRITICAL(HW_GPU, "Unhandled FFMA instruction: {}", opcode->GetName()); | 1164 | LOG_CRITICAL(HW_GPU, "Unhandled FFMA instruction: {}", opcode->GetName()); |
| 1165 | UNREACHABLE(); | 1165 | UNREACHABLE(); |
| 1166 | } | 1166 | } |
| 1167 | } | 1167 | } |
| @@ -1219,7 +1219,7 @@ private: | |||
| 1219 | op_a = "trunc(" + op_a + ')'; | 1219 | op_a = "trunc(" + op_a + ')'; |
| 1220 | break; | 1220 | break; |
| 1221 | default: | 1221 | default: |
| 1222 | NGLOG_CRITICAL(HW_GPU, "Unimplemented f2f rounding mode {}", | 1222 | LOG_CRITICAL(HW_GPU, "Unimplemented f2f rounding mode {}", |
| 1223 | static_cast<u32>(instr.conversion.f2f.rounding.Value())); | 1223 | static_cast<u32>(instr.conversion.f2f.rounding.Value())); |
| 1224 | UNREACHABLE(); | 1224 | UNREACHABLE(); |
| 1225 | break; | 1225 | break; |
| @@ -1253,7 +1253,7 @@ private: | |||
| 1253 | op_a = "trunc(" + op_a + ')'; | 1253 | op_a = "trunc(" + op_a + ')'; |
| 1254 | break; | 1254 | break; |
| 1255 | default: | 1255 | default: |
| 1256 | NGLOG_CRITICAL(HW_GPU, "Unimplemented f2i rounding mode {}", | 1256 | LOG_CRITICAL(HW_GPU, "Unimplemented f2i rounding mode {}", |
| 1257 | static_cast<u32>(instr.conversion.f2i.rounding.Value())); | 1257 | static_cast<u32>(instr.conversion.f2i.rounding.Value())); |
| 1258 | UNREACHABLE(); | 1258 | UNREACHABLE(); |
| 1259 | break; | 1259 | break; |
| @@ -1270,7 +1270,7 @@ private: | |||
| 1270 | break; | 1270 | break; |
| 1271 | } | 1271 | } |
| 1272 | default: { | 1272 | default: { |
| 1273 | NGLOG_CRITICAL(HW_GPU, "Unhandled conversion instruction: {}", opcode->GetName()); | 1273 | LOG_CRITICAL(HW_GPU, "Unhandled conversion instruction: {}", opcode->GetName()); |
| 1274 | UNREACHABLE(); | 1274 | UNREACHABLE(); |
| 1275 | } | 1275 | } |
| 1276 | } | 1276 | } |
| @@ -1305,7 +1305,7 @@ private: | |||
| 1305 | break; | 1305 | break; |
| 1306 | 1306 | ||
| 1307 | default: | 1307 | default: |
| 1308 | NGLOG_CRITICAL(HW_GPU, "Unhandled type: {}", | 1308 | LOG_CRITICAL(HW_GPU, "Unhandled type: {}", |
| 1309 | static_cast<unsigned>(instr.ld_c.type.Value())); | 1309 | static_cast<unsigned>(instr.ld_c.type.Value())); |
| 1310 | UNREACHABLE(); | 1310 | UNREACHABLE(); |
| 1311 | } | 1311 | } |
| @@ -1379,7 +1379,7 @@ private: | |||
| 1379 | break; | 1379 | break; |
| 1380 | } | 1380 | } |
| 1381 | default: { | 1381 | default: { |
| 1382 | NGLOG_CRITICAL(HW_GPU, "Unhandled memory instruction: {}", opcode->GetName()); | 1382 | LOG_CRITICAL(HW_GPU, "Unhandled memory instruction: {}", opcode->GetName()); |
| 1383 | UNREACHABLE(); | 1383 | UNREACHABLE(); |
| 1384 | } | 1384 | } |
| 1385 | } | 1385 | } |
| @@ -1596,7 +1596,7 @@ private: | |||
| 1596 | break; | 1596 | break; |
| 1597 | } | 1597 | } |
| 1598 | default: { | 1598 | default: { |
| 1599 | NGLOG_CRITICAL(HW_GPU, "Unhandled instruction: {}", opcode->GetName()); | 1599 | LOG_CRITICAL(HW_GPU, "Unhandled instruction: {}", opcode->GetName()); |
| 1600 | UNREACHABLE(); | 1600 | UNREACHABLE(); |
| 1601 | } | 1601 | } |
| 1602 | } | 1602 | } |
| @@ -1736,7 +1736,7 @@ boost::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, | |||
| 1736 | GLSLGenerator generator(subroutines, program_code, main_offset, stage); | 1736 | GLSLGenerator generator(subroutines, program_code, main_offset, stage); |
| 1737 | return ProgramResult{generator.GetShaderCode(), generator.GetEntries()}; | 1737 | return ProgramResult{generator.GetShaderCode(), generator.GetEntries()}; |
| 1738 | } catch (const DecompileFail& exception) { | 1738 | } catch (const DecompileFail& exception) { |
| 1739 | NGLOG_ERROR(HW_GPU, "Shader decompilation failed: {}", exception.what()); | 1739 | LOG_ERROR(HW_GPU, "Shader decompilation failed: {}", exception.what()); |
| 1740 | } | 1740 | } |
| 1741 | return boost::none; | 1741 | return boost::none; |
| 1742 | } | 1742 | } |
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index 8568fface..3c087d638 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp | |||
| @@ -27,7 +27,7 @@ GLuint LoadShader(const char* source, GLenum type) { | |||
| 27 | } | 27 | } |
| 28 | GLuint shader_id = glCreateShader(type); | 28 | GLuint shader_id = glCreateShader(type); |
| 29 | glShaderSource(shader_id, 1, &source, nullptr); | 29 | glShaderSource(shader_id, 1, &source, nullptr); |
| 30 | NGLOG_DEBUG(Render_OpenGL, "Compiling {} shader...", debug_type); | 30 | LOG_DEBUG(Render_OpenGL, "Compiling {} shader...", debug_type); |
| 31 | glCompileShader(shader_id); | 31 | glCompileShader(shader_id); |
| 32 | 32 | ||
| 33 | GLint result = GL_FALSE; | 33 | GLint result = GL_FALSE; |
| @@ -39,9 +39,9 @@ GLuint LoadShader(const char* source, GLenum type) { | |||
| 39 | std::string shader_error(info_log_length, ' '); | 39 | std::string shader_error(info_log_length, ' '); |
| 40 | glGetShaderInfoLog(shader_id, info_log_length, nullptr, &shader_error[0]); | 40 | glGetShaderInfoLog(shader_id, info_log_length, nullptr, &shader_error[0]); |
| 41 | if (result == GL_TRUE) { | 41 | if (result == GL_TRUE) { |
| 42 | NGLOG_DEBUG(Render_OpenGL, "{}", shader_error); | 42 | LOG_DEBUG(Render_OpenGL, "{}", shader_error); |
| 43 | } else { | 43 | } else { |
| 44 | NGLOG_ERROR(Render_OpenGL, "Error compiling {} shader:\n{}", debug_type, shader_error); | 44 | LOG_ERROR(Render_OpenGL, "Error compiling {} shader:\n{}", debug_type, shader_error); |
| 45 | } | 45 | } |
| 46 | } | 46 | } |
| 47 | return shader_id; | 47 | return shader_id; |
diff --git a/src/video_core/renderer_opengl/gl_shader_util.h b/src/video_core/renderer_opengl/gl_shader_util.h index 2036a06a9..0e4d782e2 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.h +++ b/src/video_core/renderer_opengl/gl_shader_util.h | |||
| @@ -29,7 +29,7 @@ void LogShaderSource(T... shaders) { | |||
| 29 | 29 | ||
| 30 | std::string source(source_length, ' '); | 30 | std::string source(source_length, ' '); |
| 31 | glGetShaderSource(shader, source_length, nullptr, &source[0]); | 31 | glGetShaderSource(shader, source_length, nullptr, &source[0]); |
| 32 | NGLOG_INFO(Render_OpenGL, "Shader source {}", source); | 32 | LOG_INFO(Render_OpenGL, "Shader source {}", source); |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | 35 | ||
| @@ -49,7 +49,7 @@ GLuint LoadShader(const char* source, GLenum type); | |||
| 49 | template <typename... T> | 49 | template <typename... T> |
| 50 | GLuint LoadProgram(bool separable_program, T... shaders) { | 50 | GLuint LoadProgram(bool separable_program, T... shaders) { |
| 51 | // Link the program | 51 | // Link the program |
| 52 | NGLOG_DEBUG(Render_OpenGL, "Linking program..."); | 52 | LOG_DEBUG(Render_OpenGL, "Linking program..."); |
| 53 | 53 | ||
| 54 | GLuint program_id = glCreateProgram(); | 54 | GLuint program_id = glCreateProgram(); |
| 55 | 55 | ||
| @@ -71,9 +71,9 @@ GLuint LoadProgram(bool separable_program, T... shaders) { | |||
| 71 | std::string program_error(info_log_length, ' '); | 71 | std::string program_error(info_log_length, ' '); |
| 72 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); | 72 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); |
| 73 | if (result == GL_TRUE) { | 73 | if (result == GL_TRUE) { |
| 74 | NGLOG_DEBUG(Render_OpenGL, "{}", program_error); | 74 | LOG_DEBUG(Render_OpenGL, "{}", program_error); |
| 75 | } else { | 75 | } else { |
| 76 | NGLOG_ERROR(Render_OpenGL, "Error linking shader:\n{}", program_error); | 76 | LOG_ERROR(Render_OpenGL, "Error linking shader:\n{}", program_error); |
| 77 | } | 77 | } |
| 78 | } | 78 | } |
| 79 | 79 | ||
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 392041a1c..1913397e4 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -31,7 +31,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { | |||
| 31 | return GL_UNSIGNED_BYTE; | 31 | return GL_UNSIGNED_BYTE; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); | 34 | LOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); |
| 35 | UNREACHABLE(); | 35 | UNREACHABLE(); |
| 36 | return {}; | 36 | return {}; |
| 37 | } | 37 | } |
| @@ -43,7 +43,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { | |||
| 43 | return GL_BYTE; | 43 | return GL_BYTE; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); | 46 | LOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); |
| 47 | UNREACHABLE(); | 47 | UNREACHABLE(); |
| 48 | return {}; | 48 | return {}; |
| 49 | } | 49 | } |
| @@ -52,7 +52,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { | |||
| 52 | return GL_FLOAT; | 52 | return GL_FLOAT; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented vertex type={}", attrib.TypeString()); | 55 | LOG_CRITICAL(Render_OpenGL, "Unimplemented vertex type={}", attrib.TypeString()); |
| 56 | UNREACHABLE(); | 56 | UNREACHABLE(); |
| 57 | return {}; | 57 | return {}; |
| 58 | } | 58 | } |
| @@ -66,7 +66,7 @@ inline GLenum IndexFormat(Maxwell::IndexFormat index_format) { | |||
| 66 | case Maxwell::IndexFormat::UnsignedInt: | 66 | case Maxwell::IndexFormat::UnsignedInt: |
| 67 | return GL_UNSIGNED_INT; | 67 | return GL_UNSIGNED_INT; |
| 68 | } | 68 | } |
| 69 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented index_format={}", static_cast<u32>(index_format)); | 69 | LOG_CRITICAL(Render_OpenGL, "Unimplemented index_format={}", static_cast<u32>(index_format)); |
| 70 | UNREACHABLE(); | 70 | UNREACHABLE(); |
| 71 | return {}; | 71 | return {}; |
| 72 | } | 72 | } |
| @@ -78,7 +78,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { | |||
| 78 | case Maxwell::PrimitiveTopology::TriangleStrip: | 78 | case Maxwell::PrimitiveTopology::TriangleStrip: |
| 79 | return GL_TRIANGLE_STRIP; | 79 | return GL_TRIANGLE_STRIP; |
| 80 | } | 80 | } |
| 81 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented topology={}", static_cast<u32>(topology)); | 81 | LOG_CRITICAL(Render_OpenGL, "Unimplemented topology={}", static_cast<u32>(topology)); |
| 82 | UNREACHABLE(); | 82 | UNREACHABLE(); |
| 83 | return {}; | 83 | return {}; |
| 84 | } | 84 | } |
| @@ -90,7 +90,7 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) { | |||
| 90 | case Tegra::Texture::TextureFilter::Nearest: | 90 | case Tegra::Texture::TextureFilter::Nearest: |
| 91 | return GL_NEAREST; | 91 | return GL_NEAREST; |
| 92 | } | 92 | } |
| 93 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode={}", | 93 | LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode={}", |
| 94 | static_cast<u32>(filter_mode)); | 94 | static_cast<u32>(filter_mode)); |
| 95 | UNREACHABLE(); | 95 | UNREACHABLE(); |
| 96 | return {}; | 96 | return {}; |
| @@ -110,7 +110,7 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) { | |||
| 110 | // manually mix them. However the shader part of this is not yet implemented. | 110 | // manually mix them. However the shader part of this is not yet implemented. |
| 111 | return GL_CLAMP_TO_BORDER; | 111 | return GL_CLAMP_TO_BORDER; |
| 112 | } | 112 | } |
| 113 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}", | 113 | LOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}", |
| 114 | static_cast<u32>(wrap_mode)); | 114 | static_cast<u32>(wrap_mode)); |
| 115 | UNREACHABLE(); | 115 | UNREACHABLE(); |
| 116 | return {}; | 116 | return {}; |
| @@ -129,7 +129,7 @@ inline GLenum BlendEquation(Maxwell::Blend::Equation equation) { | |||
| 129 | case Maxwell::Blend::Equation::Max: | 129 | case Maxwell::Blend::Equation::Max: |
| 130 | return GL_MAX; | 130 | return GL_MAX; |
| 131 | } | 131 | } |
| 132 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented blend equation={}", static_cast<u32>(equation)); | 132 | LOG_CRITICAL(Render_OpenGL, "Unimplemented blend equation={}", static_cast<u32>(equation)); |
| 133 | UNREACHABLE(); | 133 | UNREACHABLE(); |
| 134 | return {}; | 134 | return {}; |
| 135 | } | 135 | } |
| @@ -175,7 +175,7 @@ inline GLenum BlendFunc(Maxwell::Blend::Factor factor) { | |||
| 175 | case Maxwell::Blend::Factor::OneMinusConstantAlpha: | 175 | case Maxwell::Blend::Factor::OneMinusConstantAlpha: |
| 176 | return GL_ONE_MINUS_CONSTANT_ALPHA; | 176 | return GL_ONE_MINUS_CONSTANT_ALPHA; |
| 177 | } | 177 | } |
| 178 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented blend factor={}", static_cast<u32>(factor)); | 178 | LOG_CRITICAL(Render_OpenGL, "Unimplemented blend factor={}", static_cast<u32>(factor)); |
| 179 | UNREACHABLE(); | 179 | UNREACHABLE(); |
| 180 | return {}; | 180 | return {}; |
| 181 | } | 181 | } |
| @@ -196,7 +196,7 @@ inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) { | |||
| 196 | case Tegra::Texture::SwizzleSource::OneFloat: | 196 | case Tegra::Texture::SwizzleSource::OneFloat: |
| 197 | return GL_ONE; | 197 | return GL_ONE; |
| 198 | } | 198 | } |
| 199 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented swizzle source={}", static_cast<u32>(source)); | 199 | LOG_CRITICAL(Render_OpenGL, "Unimplemented swizzle source={}", static_cast<u32>(source)); |
| 200 | UNREACHABLE(); | 200 | UNREACHABLE(); |
| 201 | return {}; | 201 | return {}; |
| 202 | } | 202 | } |
| @@ -220,7 +220,7 @@ inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { | |||
| 220 | case Maxwell::ComparisonOp::Always: | 220 | case Maxwell::ComparisonOp::Always: |
| 221 | return GL_ALWAYS; | 221 | return GL_ALWAYS; |
| 222 | } | 222 | } |
| 223 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented comparison op={}", static_cast<u32>(comparison)); | 223 | LOG_CRITICAL(Render_OpenGL, "Unimplemented comparison op={}", static_cast<u32>(comparison)); |
| 224 | UNREACHABLE(); | 224 | UNREACHABLE(); |
| 225 | return {}; | 225 | return {}; |
| 226 | } | 226 | } |
| @@ -232,7 +232,7 @@ inline GLenum FrontFace(Maxwell::Cull::FrontFace front_face) { | |||
| 232 | case Maxwell::Cull::FrontFace::CounterClockWise: | 232 | case Maxwell::Cull::FrontFace::CounterClockWise: |
| 233 | return GL_CCW; | 233 | return GL_CCW; |
| 234 | } | 234 | } |
| 235 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented front face cull={}", static_cast<u32>(front_face)); | 235 | LOG_CRITICAL(Render_OpenGL, "Unimplemented front face cull={}", static_cast<u32>(front_face)); |
| 236 | UNREACHABLE(); | 236 | UNREACHABLE(); |
| 237 | return {}; | 237 | return {}; |
| 238 | } | 238 | } |
| @@ -246,7 +246,7 @@ inline GLenum CullFace(Maxwell::Cull::CullFace cull_face) { | |||
| 246 | case Maxwell::Cull::CullFace::FrontAndBack: | 246 | case Maxwell::Cull::CullFace::FrontAndBack: |
| 247 | return GL_FRONT_AND_BACK; | 247 | return GL_FRONT_AND_BACK; |
| 248 | } | 248 | } |
| 249 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented cull face={}", static_cast<u32>(cull_face)); | 249 | LOG_CRITICAL(Render_OpenGL, "Unimplemented cull face={}", static_cast<u32>(cull_face)); |
| 250 | UNREACHABLE(); | 250 | UNREACHABLE(); |
| 251 | return {}; | 251 | return {}; |
| 252 | } | 252 | } |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index e3bb2cbb8..af5b480a3 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -301,7 +301,7 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, | |||
| 301 | right = texcoords.left; | 301 | right = texcoords.left; |
| 302 | } else { | 302 | } else { |
| 303 | // Other transformations are unsupported | 303 | // Other transformations are unsupported |
| 304 | NGLOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags={}", | 304 | LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags={}", |
| 305 | static_cast<u32>(framebuffer_transform_flags)); | 305 | static_cast<u32>(framebuffer_transform_flags)); |
| 306 | UNIMPLEMENTED(); | 306 | UNIMPLEMENTED(); |
| 307 | } | 307 | } |
| @@ -404,14 +404,14 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum | |||
| 404 | 404 | ||
| 405 | switch (severity) { | 405 | switch (severity) { |
| 406 | case GL_DEBUG_SEVERITY_HIGH: | 406 | case GL_DEBUG_SEVERITY_HIGH: |
| 407 | NGLOG_ERROR(Render_OpenGL, format, str_source, str_type, id, message); | 407 | LOG_ERROR(Render_OpenGL, format, str_source, str_type, id, message); |
| 408 | break; | 408 | break; |
| 409 | case GL_DEBUG_SEVERITY_MEDIUM: | 409 | case GL_DEBUG_SEVERITY_MEDIUM: |
| 410 | NGLOG_WARNING(Render_OpenGL, format, str_source, str_type, id, message); | 410 | LOG_WARNING(Render_OpenGL, format, str_source, str_type, id, message); |
| 411 | break; | 411 | break; |
| 412 | case GL_DEBUG_SEVERITY_NOTIFICATION: | 412 | case GL_DEBUG_SEVERITY_NOTIFICATION: |
| 413 | case GL_DEBUG_SEVERITY_LOW: | 413 | case GL_DEBUG_SEVERITY_LOW: |
| 414 | NGLOG_DEBUG(Render_OpenGL, format, str_source, str_type, id, message); | 414 | LOG_DEBUG(Render_OpenGL, format, str_source, str_type, id, message); |
| 415 | break; | 415 | break; |
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| @@ -429,9 +429,9 @@ bool RendererOpenGL::Init() { | |||
| 429 | const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; | 429 | const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; |
| 430 | const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; | 430 | const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; |
| 431 | 431 | ||
| 432 | NGLOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version); | 432 | LOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version); |
| 433 | NGLOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor); | 433 | LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor); |
| 434 | NGLOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); | 434 | LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); |
| 435 | 435 | ||
| 436 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); | 436 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); |
| 437 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); | 437 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 89dc8ed1e..289140f31 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -24,9 +24,9 @@ bool Init(EmuWindow* emu_window) { | |||
| 24 | g_renderer = std::make_unique<RendererOpenGL>(); | 24 | g_renderer = std::make_unique<RendererOpenGL>(); |
| 25 | g_renderer->SetWindow(g_emu_window); | 25 | g_renderer->SetWindow(g_emu_window); |
| 26 | if (g_renderer->Init()) { | 26 | if (g_renderer->Init()) { |
| 27 | NGLOG_DEBUG(Render, "initialized OK"); | 27 | LOG_DEBUG(Render, "initialized OK"); |
| 28 | } else { | 28 | } else { |
| 29 | NGLOG_CRITICAL(Render, "initialization failed !"); | 29 | LOG_CRITICAL(Render, "initialization failed !"); |
| 30 | return false; | 30 | return false; |
| 31 | } | 31 | } |
| 32 | return true; | 32 | return true; |
| @@ -36,7 +36,7 @@ bool Init(EmuWindow* emu_window) { | |||
| 36 | void Shutdown() { | 36 | void Shutdown() { |
| 37 | g_renderer.reset(); | 37 | g_renderer.reset(); |
| 38 | 38 | ||
| 39 | NGLOG_DEBUG(Render, "shutdown OK"); | 39 | LOG_DEBUG(Render, "shutdown OK"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace VideoCore | 42 | } // namespace VideoCore |
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 55dce6d47..6f53b63c1 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -325,7 +325,7 @@ void GameList::PopupContextMenu(const QPoint& menu_location) { | |||
| 325 | void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { | 325 | void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { |
| 326 | if (!FileUtil::Exists(dir_path.toStdString()) || | 326 | if (!FileUtil::Exists(dir_path.toStdString()) || |
| 327 | !FileUtil::IsDirectory(dir_path.toStdString())) { | 327 | !FileUtil::IsDirectory(dir_path.toStdString())) { |
| 328 | NGLOG_ERROR(Frontend, "Could not find game list folder at {}", | 328 | LOG_ERROR(Frontend, "Could not find game list folder at {}", |
| 329 | dir_path.toLocal8Bit().data()); | 329 | dir_path.toLocal8Bit().data()); |
| 330 | search_field->setFilterResult(0, 0); | 330 | search_field->setFilterResult(0, 0); |
| 331 | return; | 331 | return; |
| @@ -388,7 +388,7 @@ static QString FormatGameName(const std::string& physical_name) { | |||
| 388 | 388 | ||
| 389 | void GameList::RefreshGameDirectory() { | 389 | void GameList::RefreshGameDirectory() { |
| 390 | if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) { | 390 | if (!UISettings::values.gamedir.isEmpty() && current_worker != nullptr) { |
| 391 | NGLOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); | 391 | LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); |
| 392 | search_field->clear(); | 392 | search_field->clear(); |
| 393 | PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); | 393 | PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); |
| 394 | } | 394 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 00a3e9632..2c52415f9 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -338,7 +338,7 @@ bool GMainWindow::SupportsRequiredGLExtensions() { | |||
| 338 | unsupported_ext.append("ARB_vertex_attrib_binding"); | 338 | unsupported_ext.append("ARB_vertex_attrib_binding"); |
| 339 | 339 | ||
| 340 | for (const QString& ext : unsupported_ext) | 340 | for (const QString& ext : unsupported_ext) |
| 341 | NGLOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); | 341 | LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext.toStdString()); |
| 342 | 342 | ||
| 343 | return unsupported_ext.empty(); | 343 | return unsupported_ext.empty(); |
| 344 | } | 344 | } |
| @@ -375,17 +375,17 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 375 | if (result != Core::System::ResultStatus::Success) { | 375 | if (result != Core::System::ResultStatus::Success) { |
| 376 | switch (result) { | 376 | switch (result) { |
| 377 | case Core::System::ResultStatus::ErrorGetLoader: | 377 | case Core::System::ResultStatus::ErrorGetLoader: |
| 378 | NGLOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString()); | 378 | LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString()); |
| 379 | QMessageBox::critical(this, tr("Error while loading ROM!"), | 379 | QMessageBox::critical(this, tr("Error while loading ROM!"), |
| 380 | tr("The ROM format is not supported.")); | 380 | tr("The ROM format is not supported.")); |
| 381 | break; | 381 | break; |
| 382 | case Core::System::ResultStatus::ErrorUnsupportedArch: | 382 | case Core::System::ResultStatus::ErrorUnsupportedArch: |
| 383 | NGLOG_CRITICAL(Frontend, "Unsupported architecture detected!", filename.toStdString()); | 383 | LOG_CRITICAL(Frontend, "Unsupported architecture detected!", filename.toStdString()); |
| 384 | QMessageBox::critical(this, tr("Error while loading ROM!"), | 384 | QMessageBox::critical(this, tr("Error while loading ROM!"), |
| 385 | tr("The ROM uses currently unusable 32-bit architecture")); | 385 | tr("The ROM uses currently unusable 32-bit architecture")); |
| 386 | break; | 386 | break; |
| 387 | case Core::System::ResultStatus::ErrorSystemMode: | 387 | case Core::System::ResultStatus::ErrorSystemMode: |
| 388 | NGLOG_CRITICAL(Frontend, "Failed to load ROM!"); | 388 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); |
| 389 | QMessageBox::critical(this, tr("Error while loading ROM!"), | 389 | QMessageBox::critical(this, tr("Error while loading ROM!"), |
| 390 | tr("Could not determine the system mode.")); | 390 | tr("Could not determine the system mode.")); |
| 391 | break; | 391 | break; |
| @@ -435,7 +435,7 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 435 | } | 435 | } |
| 436 | 436 | ||
| 437 | void GMainWindow::BootGame(const QString& filename) { | 437 | void GMainWindow::BootGame(const QString& filename) { |
| 438 | NGLOG_INFO(Frontend, "yuzu starting..."); | 438 | LOG_INFO(Frontend, "yuzu starting..."); |
| 439 | StoreRecentFile(filename); // Put the filename on top of the list | 439 | StoreRecentFile(filename); // Put the filename on top of the list |
| 440 | 440 | ||
| 441 | if (!LoadROM(filename)) | 441 | if (!LoadROM(filename)) |
| @@ -882,7 +882,7 @@ void GMainWindow::UpdateUITheme() { | |||
| 882 | QString theme_uri(":" + UISettings::values.theme + "/style.qss"); | 882 | QString theme_uri(":" + UISettings::values.theme + "/style.qss"); |
| 883 | QFile f(theme_uri); | 883 | QFile f(theme_uri); |
| 884 | if (!f.exists()) { | 884 | if (!f.exists()) { |
| 885 | NGLOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); | 885 | LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); |
| 886 | } else { | 886 | } else { |
| 887 | f.open(QFile::ReadOnly | QFile::Text); | 887 | f.open(QFile::ReadOnly | QFile::Text); |
| 888 | QTextStream ts(&f); | 888 | QTextStream ts(&f); |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 150915c17..3a311b69f 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -27,17 +27,17 @@ bool Config::LoadINI(const std::string& default_contents, bool retry) { | |||
| 27 | const char* location = this->sdl2_config_loc.c_str(); | 27 | const char* location = this->sdl2_config_loc.c_str(); |
| 28 | if (sdl2_config->ParseError() < 0) { | 28 | if (sdl2_config->ParseError() < 0) { |
| 29 | if (retry) { | 29 | if (retry) { |
| 30 | NGLOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); | 30 | LOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); |
| 31 | FileUtil::CreateFullPath(location); | 31 | FileUtil::CreateFullPath(location); |
| 32 | FileUtil::WriteStringToFile(true, default_contents, location); | 32 | FileUtil::WriteStringToFile(true, default_contents, location); |
| 33 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file | 33 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file |
| 34 | 34 | ||
| 35 | return LoadINI(default_contents, false); | 35 | return LoadINI(default_contents, false); |
| 36 | } | 36 | } |
| 37 | NGLOG_ERROR(Config, "Failed."); | 37 | LOG_ERROR(Config, "Failed."); |
| 38 | return false; | 38 | return false; |
| 39 | } | 39 | } |
| 40 | NGLOG_INFO(Config, "Successfully loaded {}", location); | 40 | LOG_INFO(Config, "Successfully loaded {}", location); |
| 41 | return true; | 41 | return true; |
| 42 | } | 42 | } |
| 43 | 43 | ||
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index cfd8eb7e6..e6f0bbe8f 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -62,19 +62,19 @@ void EmuWindow_SDL2::Fullscreen() { | |||
| 62 | return; | 62 | return; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | NGLOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); | 65 | LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); |
| 66 | 66 | ||
| 67 | // Try a different fullscreening method | 67 | // Try a different fullscreening method |
| 68 | NGLOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); | 68 | LOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); |
| 69 | if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { | 69 | if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { |
| 70 | return; | 70 | return; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | NGLOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); | 73 | LOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); |
| 74 | 74 | ||
| 75 | // Fallback algorithm: Maximise window. | 75 | // Fallback algorithm: Maximise window. |
| 76 | // Works on all systems (unless something is seriously wrong), so no fallback for this one. | 76 | // Works on all systems (unless something is seriously wrong), so no fallback for this one. |
| 77 | NGLOG_INFO(Frontend, "Falling back on a maximised window..."); | 77 | LOG_INFO(Frontend, "Falling back on a maximised window..."); |
| 78 | SDL_MaximizeWindow(render_window); | 78 | SDL_MaximizeWindow(render_window); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| @@ -91,7 +91,7 @@ bool EmuWindow_SDL2::SupportsRequiredGLExtensions() { | |||
| 91 | unsupported_ext.push_back("ARB_vertex_attrib_binding"); | 91 | unsupported_ext.push_back("ARB_vertex_attrib_binding"); |
| 92 | 92 | ||
| 93 | for (const std::string& ext : unsupported_ext) | 93 | for (const std::string& ext : unsupported_ext) |
| 94 | NGLOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext); | 94 | LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", ext); |
| 95 | 95 | ||
| 96 | return unsupported_ext.empty(); | 96 | return unsupported_ext.empty(); |
| 97 | } | 97 | } |
| @@ -103,7 +103,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 103 | 103 | ||
| 104 | // Initialize the window | 104 | // Initialize the window |
| 105 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { | 105 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { |
| 106 | NGLOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); | 106 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); |
| 107 | exit(1); | 107 | exit(1); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -126,7 +126,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 126 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); | 126 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); |
| 127 | 127 | ||
| 128 | if (render_window == nullptr) { | 128 | if (render_window == nullptr) { |
| 129 | NGLOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); | 129 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); |
| 130 | exit(1); | 130 | exit(1); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| @@ -137,17 +137,17 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 137 | gl_context = SDL_GL_CreateContext(render_window); | 137 | gl_context = SDL_GL_CreateContext(render_window); |
| 138 | 138 | ||
| 139 | if (gl_context == nullptr) { | 139 | if (gl_context == nullptr) { |
| 140 | NGLOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); | 140 | LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context! Exiting..."); |
| 141 | exit(1); | 141 | exit(1); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { | 144 | if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) { |
| 145 | NGLOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); | 145 | LOG_CRITICAL(Frontend, "Failed to initialize GL functions! Exiting..."); |
| 146 | exit(1); | 146 | exit(1); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | if (!SupportsRequiredGLExtensions()) { | 149 | if (!SupportsRequiredGLExtensions()) { |
| 150 | NGLOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting..."); | 150 | LOG_CRITICAL(Frontend, "GPU does not support all required OpenGL extensions! Exiting..."); |
| 151 | exit(1); | 151 | exit(1); |
| 152 | } | 152 | } |
| 153 | 153 | ||
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 95e568b7b..91b024819 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -69,7 +69,7 @@ int main(int argc, char** argv) { | |||
| 69 | auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); | 69 | auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); |
| 70 | 70 | ||
| 71 | if (argv_w == nullptr) { | 71 | if (argv_w == nullptr) { |
| 72 | NGLOG_CRITICAL(Frontend, "Failed to get command line arguments"); | 72 | LOG_CRITICAL(Frontend, "Failed to get command line arguments"); |
| 73 | return -1; | 73 | return -1; |
| 74 | } | 74 | } |
| 75 | #endif | 75 | #endif |
| @@ -102,7 +102,7 @@ int main(int argc, char** argv) { | |||
| 102 | break; | 102 | break; |
| 103 | case 'f': | 103 | case 'f': |
| 104 | fullscreen = true; | 104 | fullscreen = true; |
| 105 | NGLOG_INFO(Frontend, "Starting in fullscreen mode..."); | 105 | LOG_INFO(Frontend, "Starting in fullscreen mode..."); |
| 106 | break; | 106 | break; |
| 107 | case 'h': | 107 | case 'h': |
| 108 | PrintHelp(argv[0]); | 108 | PrintHelp(argv[0]); |
| @@ -132,7 +132,7 @@ int main(int argc, char** argv) { | |||
| 132 | SCOPE_EXIT({ MicroProfileShutdown(); }); | 132 | SCOPE_EXIT({ MicroProfileShutdown(); }); |
| 133 | 133 | ||
| 134 | if (filepath.empty()) { | 134 | if (filepath.empty()) { |
| 135 | NGLOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); | 135 | LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); |
| 136 | return -1; | 136 | return -1; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| @@ -153,28 +153,28 @@ int main(int argc, char** argv) { | |||
| 153 | 153 | ||
| 154 | switch (load_result) { | 154 | switch (load_result) { |
| 155 | case Core::System::ResultStatus::ErrorGetLoader: | 155 | case Core::System::ResultStatus::ErrorGetLoader: |
| 156 | NGLOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); | 156 | LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); |
| 157 | return -1; | 157 | return -1; |
| 158 | case Core::System::ResultStatus::ErrorLoader: | 158 | case Core::System::ResultStatus::ErrorLoader: |
| 159 | NGLOG_CRITICAL(Frontend, "Failed to load ROM!"); | 159 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); |
| 160 | return -1; | 160 | return -1; |
| 161 | case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: | 161 | case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: |
| 162 | NGLOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " | 162 | LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " |
| 163 | "being used with yuzu. \n\n For more information on dumping and " | 163 | "being used with yuzu. \n\n For more information on dumping and " |
| 164 | "decrypting games, please refer to: " | 164 | "decrypting games, please refer to: " |
| 165 | "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); | 165 | "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); |
| 166 | return -1; | 166 | return -1; |
| 167 | case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: | 167 | case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: |
| 168 | NGLOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); | 168 | LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); |
| 169 | return -1; | 169 | return -1; |
| 170 | case Core::System::ResultStatus::ErrorNotInitialized: | 170 | case Core::System::ResultStatus::ErrorNotInitialized: |
| 171 | NGLOG_CRITICAL(Frontend, "CPUCore not initialized"); | 171 | LOG_CRITICAL(Frontend, "CPUCore not initialized"); |
| 172 | return -1; | 172 | return -1; |
| 173 | case Core::System::ResultStatus::ErrorSystemMode: | 173 | case Core::System::ResultStatus::ErrorSystemMode: |
| 174 | NGLOG_CRITICAL(Frontend, "Failed to determine system mode!"); | 174 | LOG_CRITICAL(Frontend, "Failed to determine system mode!"); |
| 175 | return -1; | 175 | return -1; |
| 176 | case Core::System::ResultStatus::ErrorVideoCore: | 176 | case Core::System::ResultStatus::ErrorVideoCore: |
| 177 | NGLOG_CRITICAL(Frontend, "VideoCore not initialized"); | 177 | LOG_CRITICAL(Frontend, "VideoCore not initialized"); |
| 178 | return -1; | 178 | return -1; |
| 179 | case Core::System::ResultStatus::Success: | 179 | case Core::System::ResultStatus::Success: |
| 180 | break; // Expected case | 180 | break; // Expected case |