Remove deprecated logging system and expose developer logging window (#825)

This commit is contained in:
Crementif 2023-05-20 02:46:12 +02:00 committed by GitHub
parent b8dec03cb5
commit d903b2cf12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 148 additions and 283 deletions

View file

@ -211,7 +211,7 @@ void InfoLog_TitleLoaded()
fs::path effectiveSavePath = getTitleSavePath();
std::error_code ec;
const bool saveDirExists = fs::exists(effectiveSavePath, ec);
cemuLog_force("Save path: {}{}", _pathToUtf8(effectiveSavePath), saveDirExists ? "" : " (not present)");
cemuLog_log(LogType::Force, "Save path: {}{}", _pathToUtf8(effectiveSavePath), saveDirExists ? "" : " (not present)");
// log shader cache name
cemuLog_log(LogType::Force, "Shader cache file: shaderCache/transferable/{:016x}.bin", titleId);

View file

@ -541,7 +541,7 @@ void fsc_setFileLength(FSCVirtualFile* fscFile, uint32 newEndOffset)
uint32 fileSize = fsc_getFileSize(fscFile);
if (!fsc_isWritable(fscFile))
{
cemuLog_force("TruncateFile called on read-only file");
cemuLog_log(LogType::Force, "TruncateFile called on read-only file");
}
else
{

View file

@ -113,7 +113,7 @@ void FSCVirtualFile_Host::fscSetFileLength(uint64 endOffset)
m_fileSize = m_seek;
m_fs->SetPosition(m_seek);
if (!r)
cemuLog_force("fscSetFileLength: Failed to set size to 0x{:x}", endOffset);
cemuLog_log(LogType::Force, "fscSetFileLength: Failed to set size to 0x{:x}", endOffset);
}
bool FSCVirtualFile_Host::fscDirNext(FSCDirEntry* dirEntry)
@ -127,7 +127,7 @@ bool FSCVirtualFile_Host::fscDirNext(FSCDirEntry* dirEntry)
m_dirIterator.reset(new fs::directory_iterator(*m_path));
if (!m_dirIterator)
{
cemuLog_force("Failed to iterate directory: {}", _pathToUtf8(*m_path));
cemuLog_log(LogType::Force, "Failed to iterate directory: {}", _pathToUtf8(*m_path));
return false;
}
}
@ -175,14 +175,14 @@ FSCVirtualFile* FSCVirtualFile_Host::OpenFile(const fs::path& path, FSC_ACCESS_F
cemu_assert_debug(writeAccessRequested);
fs = FileStream::createFile2(path);
if (!fs)
cemuLog_force("FSC: File create failed for {}", _pathToUtf8(path));
cemuLog_log(LogType::Force, "FSC: File create failed for {}", _pathToUtf8(path));
}
}
else if (HAS_FLAG(accessFlags, FSC_ACCESS_FLAG::FILE_ALWAYS_CREATE))
{
fs = FileStream::createFile2(path);
if (!fs)
cemuLog_force("FSC: File create failed for {}", _pathToUtf8(path));
cemuLog_log(LogType::Force, "FSC: File create failed for {}", _pathToUtf8(path));
}
else
{
@ -235,14 +235,14 @@ public:
if (fs::exists(dirPath))
{
if (!fs::is_directory(dirPath))
cemuLog_force("CreateDir: {} already exists but is not a directory", path);
cemuLog_log(LogType::Force, "CreateDir: {} already exists but is not a directory", path);
*fscStatus = FSC_STATUS_ALREADY_EXISTS;
return false;
}
std::error_code ec;
bool r = fs::create_directories(dirPath, ec);
if (!r)
cemuLog_force("CreateDir: Failed to create {}", path);
cemuLog_log(LogType::Force, "CreateDir: Failed to create {}", path);
*fscStatus = FSC_STATUS_OK;
return true;
}

View file

@ -43,7 +43,7 @@ bool gameProfile_loadBooleanOption(IniParser* iniParser, char* optionName, gameP
return true;
}
else
cemuLog_force("Unknown value '{}' for option '{}' in game profile", *option_value, optionName);
cemuLog_log(LogType::Force, "Unknown value '{}' for option '{}' in game profile", *option_value, optionName);
return false;
}
@ -64,7 +64,7 @@ bool gameProfile_loadBooleanOption2(IniParser& iniParser, const char* optionName
return true;
}
else
cemuLog_force("Unknown value '{}' for option '{}' in game profile", *option_value, optionName);
cemuLog_log(LogType::Force, "Unknown value '{}' for option '{}' in game profile", *option_value, optionName);
return false;
}
@ -94,7 +94,7 @@ bool gameProfile_loadIntegerOption(IniParser* iniParser, const char* optionName,
sint32 val = StringHelpers::ToInt(*option_value, defaultValue);
if (val < minVal || val > maxVal)
{
cemuLog_force("Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
cemuLog_log(LogType::Force, "Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
option->value = defaultValue;
return false;
}
@ -116,7 +116,7 @@ bool gameProfile_loadIntegerOption(IniParser& iniParser, const char* optionName,
T val = ConvertString<T>(*option_value);
if (val < minVal || val > maxVal)
{
cemuLog_force("Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
cemuLog_log(LogType::Force, "Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
return false;
}
@ -125,7 +125,7 @@ bool gameProfile_loadIntegerOption(IniParser& iniParser, const char* optionName,
}
catch(std::exception&)
{
cemuLog_force("Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
cemuLog_log(LogType::Force, "Value '{}' is out of range for option '{}' in game profile", *option_value, optionName);
return false;
}
}
@ -175,7 +175,7 @@ void gameProfile_load()
ppcThreadQuantum = g_current_game_profile->GetThreadQuantum();
if (ppcThreadQuantum != GameProfile::kThreadQuantumDefault)
cemuLog_force("Thread quantum set to {}", ppcThreadQuantum);
cemuLog_log(LogType::Force, "Thread quantum set to {}", ppcThreadQuantum);
}
bool GameProfile::Load(uint64_t title_id)
@ -283,7 +283,7 @@ void GameProfile::Save(uint64_t title_id)
FileStream* fs = FileStream::createFile2(gameProfilePath);
if (!fs)
{
cemuLog_force("Failed to write game profile");
cemuLog_log(LogType::Force, "Failed to write game profile");
return;
}

View file

@ -32,12 +32,12 @@ void GraphicPack2::LoadGraphicPack(fs::path graphicPackPath)
if (!iniParser.NextSection())
{
cemuLog_force("{}: Does not contain any sections", _pathToUtf8(rulesPath));
cemuLog_log(LogType::Force, "{}: Does not contain any sections", _pathToUtf8(rulesPath));
return;
}
if (!boost::iequals(iniParser.GetCurrentSectionName(), "Definition"))
{
cemuLog_force("{}: [Definition] must be the first section", _pathToUtf8(rulesPath));
cemuLog_log(LogType::Force, "{}: [Definition] must be the first section", _pathToUtf8(rulesPath));
return;
}
@ -48,7 +48,7 @@ void GraphicPack2::LoadGraphicPack(fs::path graphicPackPath)
auto [ptr, ec] = std::from_chars(option_version->data(), option_version->data() + option_version->size(), versionNum);
if (ec != std::errc{})
{
cemuLog_force("{}: Unable to parse version", _pathToUtf8(rulesPath));
cemuLog_log(LogType::Force, "{}: Unable to parse version", _pathToUtf8(rulesPath));
return;
}
@ -58,7 +58,7 @@ void GraphicPack2::LoadGraphicPack(fs::path graphicPackPath)
return;
}
}
cemuLog_force("{}: Outdated graphic pack", _pathToUtf8(rulesPath));
cemuLog_log(LogType::Force, "{}: Outdated graphic pack", _pathToUtf8(rulesPath));
}
void GraphicPack2::LoadAll()
@ -265,7 +265,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
m_version = StringHelpers::ToInt(*option_version, -1);
if (m_version < 0)
{
cemuLog_force(L"{}: Invalid version", m_filename);
cemuLog_log(LogType::Force, L"{}: Invalid version", m_filename);
throw std::exception();
}
@ -277,7 +277,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
else if (boost::iequals(*option_rendererFilter, "opengl"))
m_renderer_api = RendererAPI::OpenGL;
else
cemuLog_force("Unknown value '{}' for rendererFilter option", *option_rendererFilter);
cemuLog_log(LogType::Force, "Unknown value '{}' for rendererFilter option", *option_rendererFilter);
}
auto option_defaultEnabled = rules.FindOption("default");
@ -301,14 +301,14 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
else if (boost::iequals(*option_vendorFilter, "apple"))
m_gfx_vendor = GfxVendor::Apple;
else
cemuLog_force("Unknown value '{}' for vendorFilter", *option_vendorFilter);
cemuLog_log(LogType::Force, "Unknown value '{}' for vendorFilter", *option_vendorFilter);
}
auto option_path = rules.FindOption("path");
if (!option_path)
{
auto gp_name_log = rules.FindOption("name");
cemuLog_force("[Definition] section from '{}' graphic pack must contain option: path", gp_name_log.has_value() ? *gp_name_log : "Unknown");
cemuLog_log(LogType::Force, "[Definition] section from '{}' graphic pack must contain option: path", gp_name_log.has_value() ? *gp_name_log : "Unknown");
throw std::exception();
}
m_path = *option_path;
@ -348,7 +348,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
const auto preset_name = rules.FindOption("name");
if (!preset_name)
{
cemuLog_force("Graphic pack \"{}\": Preset in line {} skipped because it has no name option defined", m_name, rules.GetCurrentSectionLineNumber());
cemuLog_log(LogType::Force, "Graphic pack \"{}\": Preset in line {} skipped because it has no name option defined", m_name, rules.GetCurrentSectionLineNumber());
continue;
}
@ -372,7 +372,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
}
catch (const std::exception & ex)
{
cemuLog_force("Graphic pack \"{}\": Can't parse preset \"{}\": {}", m_name, *preset_name, ex.what());
cemuLog_log(LogType::Force, "Graphic pack \"{}\": Can't parse preset \"{}\": {}", m_name, *preset_name, ex.what());
}
}
else if (boost::iequals(currentSectionName, "RAM"))
@ -386,7 +386,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
{
if (m_version <= 5)
{
cemuLog_force("Graphic pack \"{}\": [RAM] options are only available for graphic pack version 6 or higher", m_name, optionNameBuf);
cemuLog_log(LogType::Force, "Graphic pack \"{}\": [RAM] options are only available for graphic pack version 6 or higher", m_name, optionNameBuf);
throw std::exception();
}
@ -396,12 +396,12 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
{
if (addrEnd <= addrStart)
{
cemuLog_force("Graphic pack \"{}\": start address (0x{:08x}) must be greater than end address (0x{:08x}) for {}", m_name, addrStart, addrEnd, optionNameBuf);
cemuLog_log(LogType::Force, "Graphic pack \"{}\": start address (0x{:08x}) must be greater than end address (0x{:08x}) for {}", m_name, addrStart, addrEnd, optionNameBuf);
throw std::exception();
}
else if ((addrStart & 0xFFF) != 0 || (addrEnd & 0xFFF) != 0)
{
cemuLog_force("Graphic pack \"{}\": addresses for %s are not aligned to 0x1000", m_name, optionNameBuf);
cemuLog_log(LogType::Force, "Graphic pack \"{}\": addresses for %s are not aligned to 0x1000", m_name, optionNameBuf);
throw std::exception();
}
else
@ -411,7 +411,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
}
else
{
cemuLog_force("Graphic pack \"{}\": has invalid syntax for option {}", m_name, optionNameBuf);
cemuLog_log(LogType::Force, "Graphic pack \"{}\": has invalid syntax for option {}", m_name, optionNameBuf);
throw std::exception();
}
}
@ -434,7 +434,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
const auto it = m_preset_vars.find(kv.first);
if (it == m_preset_vars.cend())
{
cemuLog_force("Graphic pack: \"{}\" contains preset variables which are not defined in the default section", m_name);
cemuLog_log(LogType::Force, "Graphic pack: \"{}\" contains preset variables which are not defined in the default section", m_name);
throw std::exception();
}
@ -472,7 +472,7 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
auto& p2 = kv.second[i + 1];
if (p1->variables.size() != p2->variables.size())
{
cemuLog_force("Graphic pack: \"{}\" contains inconsistent preset variables", m_name);
cemuLog_log(LogType::Force, "Graphic pack: \"{}\" contains inconsistent preset variables", m_name);
throw std::exception();
}
@ -480,14 +480,14 @@ GraphicPack2::GraphicPack2(std::wstring filename, IniParser& rules)
std::set<std::string> keys2(get_keys(p2->variables).begin(), get_keys(p2->variables).end());
if (keys1 != keys2)
{
cemuLog_force("Graphic pack: \"{}\" contains inconsistent preset variables", m_name);
cemuLog_log(LogType::Force, "Graphic pack: \"{}\" contains inconsistent preset variables", m_name);
throw std::exception();
}
if(p1->is_default)
{
if(has_default)
cemuLog_force("Graphic pack: \"{}\" has more than one preset with the default key set for the same category \"{}\"", m_name, p1->name);
cemuLog_log(LogType::Force, "Graphic pack: \"{}\" has more than one preset with the default key set for the same category \"{}\"", m_name, p1->name);
p1->active = true;
has_default = true;
}

View file

@ -33,7 +33,7 @@ void PatchErrorHandler::printError(class PatchGroup* patchGroup, sint32 lineNumb
cemuLog_writeLineToLog(msg, true, true);
m_anyErrorTriggered = true;
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_PATCHES))
if (cemuLog_isLoggingEnabled(LogType::Patches))
errorMessages.emplace_back(msg);
}
@ -51,7 +51,7 @@ void PatchErrorHandler::showStageErrorMessageBox()
{
cemu_assert_debug(false); // graphic pack should always be set
}
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_PATCHES))
if (cemuLog_isLoggingEnabled(LogType::Patches))
{
errorMsg.append("\n \nDetails:\n");
for (auto& itr : errorMessages)

View file

@ -738,7 +738,7 @@ void GraphicPack2::UndoPatchGroups(std::vector<PatchGroup*>& groups, const RPLMo
void GraphicPack2::NotifyModuleLoaded(const RPLModule* rpl)
{
cemuLog_force("Loaded module \'{}\' with checksum 0x{:08x}", rpl->moduleName2, rpl->patchCRC);
cemuLog_log(LogType::Force, "Loaded module \'{}\' with checksum 0x{:08x}", rpl->moduleName2, rpl->patchCRC);
std::lock_guard<std::recursive_mutex> lock(mtx_patches);
list_modules.emplace_back(rpl);

View file

@ -132,7 +132,7 @@ PPCRecFunction_t* PPCRecompiler_recompileFunction(PPCFunctionBoundaryTracker::PP
{
if (range.startAddress >= PPC_REC_CODE_AREA_END)
{
cemuLog_force("Attempting to recompile function outside of allowed code area");
cemuLog_log(LogType::Force, "Attempting to recompile function outside of allowed code area");
return nullptr;
}

View file

@ -470,7 +470,7 @@ LatteCMDPtr LatteCP_itMemWrite(LatteCMDPtr cmd, uint32 nWords)
MPTR valuePhysAddr = (word0 & ~3);
if (valuePhysAddr == 0)
{
cemuLog_force("GPU: Invalid itMemWrite to null pointer");
cemuLog_log(LogType::Force, "GPU: Invalid itMemWrite to null pointer");
return cmd;
}
uint32be* memPtr = (uint32be*)memory_getPointerFromPhysicalOffset(valuePhysAddr);

View file

@ -374,7 +374,7 @@ void LatteTexture_CopySlice(LatteTexture* srcTexture, sint32 srcSlice, sint32 sr
sint32 effectiveHeight_src = srcTexture->overwriteInfo.hasResolutionOverwrite ? srcTexture->overwriteInfo.height : srcTexture->height;
sint32 effectiveWidth_dst = dstTexture->overwriteInfo.hasResolutionOverwrite ? dstTexture->overwriteInfo.width : dstTexture->width;
sint32 effectiveHeight_dst = dstTexture->overwriteInfo.hasResolutionOverwrite ? dstTexture->overwriteInfo.height : dstTexture->height;
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_TEXTURE_CACHE))
if (cemuLog_isLoggingEnabled(LogType::TextureCache))
{
cemuLog_log(LogType::Force, "_copySlice(): Unable to sync textures with mismatching scale ratio (due to texture rule)");
float ratioWidth_src = (float)effectiveWidth_src / (float)srcTexture->width;

View file

@ -163,7 +163,7 @@ int Latte_ThreadEntry()
sLatteThreadFinishedInit = true;
// register debug handler
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_OPENGL))
if (cemuLog_isLoggingEnabled(LogType::OpenGLLogging))
g_renderer->EnableDebugMode();
// wait till a game is started

View file

@ -253,7 +253,7 @@ void LoadOpenGLImports()
void OpenGLRenderer::Initialize()
{
Renderer::Initialize();
auto lock = cafeLog_acquire();
auto lock = cemuLog_acquire();
cemuLog_log(LogType::Force, "------- Init OpenGL graphics backend -------");
GLCanvas_MakeCurrent(false);

View file

@ -1042,7 +1042,7 @@ void OpenGLRenderer::draw_genericDrawHandler(uint32 baseVertex, uint32 baseInsta
LatteTextureView* rt_depth = LatteMRT::GetDepthAttachment();
if (!rt_depth || !rt_color)
{
cemuLog_force("GPU7 special state 5 used but render target not setup correctly");
cemuLog_log(LogType::Force, "GPU7 special state 5 used but render target not setup correctly");
return;
}
surfaceCopy_copySurfaceWithFormatConversion(rt_depth->baseTexture, rt_depth->firstMip, rt_depth->firstSlice, rt_color->baseTexture, rt_color->firstMip, rt_color->firstSlice, rt_depth->baseTexture->width, rt_depth->baseTexture->height);

View file

@ -18,7 +18,7 @@ void SwapchainInfoVk::Create(VkPhysicalDevice physicalDevice, VkDevice logicalDe
if(details.capabilities.maxImageCount > 0)
image_count = std::min(image_count, details.capabilities.maxImageCount);
if(image_count < 2)
cemuLog_force("Vulkan: Swapchain image count less than 2 may cause problems");
cemuLog_log(LogType::Force, "Vulkan: Swapchain image count less than 2 may cause problems");
VkSwapchainCreateInfoKHR create_info = CreateSwapchainCreateInfo(surface, details, m_surfaceFormat, image_count, m_actualExtent);
create_info.oldSwapchain = nullptr;

View file

@ -311,7 +311,7 @@ VulkanRenderer::VulkanRenderer()
cemuLog_log(LogType::Force, "------- Init Vulkan graphics backend -------");
const bool useValidationLayer = cafeLog_isLoggingFlagEnabled(LOG_TYPE_VULKAN_VALIDATION);
const bool useValidationLayer = cemuLog_isLoggingEnabled(LogType::VulkanValidation);
if (useValidationLayer)
cemuLog_log(LogType::Force, "Validation layer is enabled");
@ -531,7 +531,7 @@ VulkanRenderer::VulkanRenderer()
swapchain_createDescriptorSetLayout();
// extension info
// cemuLog_force("VK_KHR_dynamic_rendering: {}", m_featureControl.deviceExtensions.dynamic_rendering?"supported":"not supported");
// cemuLog_log(LogType::Force, "VK_KHR_dynamic_rendering: {}", m_featureControl.deviceExtensions.dynamic_rendering?"supported":"not supported");
void* bufferPtr;
// init ringbuffer for uniform vars
@ -1194,7 +1194,7 @@ std::vector<const char*> VulkanRenderer::CheckInstanceExtensionSupport(FeatureCo
#elif BOOST_OS_MACOS
requiredInstanceExtensions.emplace_back(VK_EXT_METAL_SURFACE_EXTENSION_NAME);
#endif
if (cafeLog_isLoggingFlagEnabled(LOG_TYPE_VULKAN_VALIDATION))
if (cemuLog_isLoggingEnabled(LogType::VulkanValidation))
requiredInstanceExtensions.emplace_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
// make sure all required extensions are supported
@ -3596,7 +3596,7 @@ void VulkanRenderer::bufferCache_init(const sint32 bufferSize)
m_useHostMemoryForCache = memoryManager->CreateBufferFromHostMemory(memory_getPointerFromVirtualOffset(m_importedMemBaseAddress), hostAllocationSize, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT, 0, m_importedMem, m_importedMemMemory);
if (!m_useHostMemoryForCache)
{
cemuLog_force("Unable to import host memory to Vulkan buffer. Use default cache system instead");
cemuLog_log(LogType::Force, "Unable to import host memory to Vulkan buffer. Use default cache system instead");
}
}
if(!m_useHostMemoryForCache)

View file

@ -607,7 +607,7 @@ namespace iosu
if (!fscFile)
return (FSStatus)FS_RESULT::ERR_PLACEHOLDER;
#ifdef CEMU_DEBUG_ASSERT
cemuLog_force("FSAProcessCmd_appendFile(): size 0x{:08x} count 0x{:08x} (todo)\n", _swapEndianU32(cmd->cmdAppendFile.size), _swapEndianU32(cmd->cmdAppendFile.count));
cemuLog_log(LogType::Force, "FSAProcessCmd_appendFile(): size 0x{:08x} count 0x{:08x} (todo)\n", _swapEndianU32(cmd->cmdAppendFile.size), _swapEndianU32(cmd->cmdAppendFile.count));
#endif
return _swapEndianU32(cmd->cmdAppendFile.size) * _swapEndianU32(cmd->cmdAppendFile.count);
}

View file

@ -113,7 +113,7 @@ void iosuAct_loadAccounts()
// }
//}
cemuLog_force(L"IOSU_ACT: using account {} in first slot", first_acc.GetMiiName());
cemuLog_log(LogType::Force, L"IOSU_ACT: using account {} in first slot", first_acc.GetMiiName());
_actAccountDataInitialized = true;
}

View file

@ -367,7 +367,7 @@ namespace iosu
bool parse_xml_content(Task& task)
{
tinyxml2::XMLDocument doc;
//cafeLog_writeLineToLog((char*)task.result_buffer.data());
//cemuLog_log(LogType::Force, (char*)task.result_buffer.data());
if (doc.Parse((const char*)task.result_buffer.data(), task.processed_length) != tinyxml2::XML_SUCCESS)
return false;

View file

@ -326,12 +326,12 @@ bool iosuCrypto_loadCertificate(uint32 id, std::wstring_view mlcSubpath, std::ws
pkeyData = FileStream::LoadIntoMemory(pkeyPath);
if (!pkeyData || pkeyData->empty())
{
cemuLog_force("Unable to load private key file {}", pkeyPath.generic_string());
cemuLog_log(LogType::Force, "Unable to load private key file {}", pkeyPath.generic_string());
return false;
}
else if ((pkeyData->size() % 16) != 0)
{
cemuLog_force("Private key file has invalid length. Possibly corrupted? File: {}", pkeyPath.generic_string());
cemuLog_log(LogType::Force, "Private key file has invalid length. Possibly corrupted? File: {}", pkeyPath.generic_string());
return false;
}
}

View file

@ -58,7 +58,7 @@ namespace iosu
return false;
if (versionListVersionResult.fqdnURL.size() >= 256)
{
cemuLog_force("NIM: fqdn URL too long");
cemuLog_log(LogType::Force, "NIM: fqdn URL too long");
return false;
}
g_nim.latestVersion = (sint32)versionListVersionResult.version;

View file

@ -242,7 +242,7 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
// load FILEINFO section
if (fileinfoSection->sectionSize < sizeof(RPLFileInfoData))
{
cemuLog_force("RPLLoader: FILEINFO section size is below expected size");
cemuLog_log(LogType::Force, "RPLLoader: FILEINFO section size is below expected size");
delete rplLoaderContext;
return false;
}
@ -251,7 +251,7 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
uint8* fileInfoRawPtr = (uint8*)(rplData + fileinfoSection->fileOffset);
if (((uint64)fileinfoSection->fileOffset+fileinfoSection->sectionSize) > (uint64)rplSize)
{
cemuLog_force("RPLLoader: FILEINFO section outside of RPL file bounds");
cemuLog_log(LogType::Force, "RPLLoader: FILEINFO section outside of RPL file bounds");
return false;
}
rplLoaderContext->sectionData_fileInfo.resize(fileinfoSection->sectionSize);
@ -260,7 +260,7 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
RPLFileInfoData* fileInfoPtr = (RPLFileInfoData*)rplLoaderContext->sectionData_fileInfo.data();
if (fileInfoPtr->fileInfoMagic != 0xCAFE0402)
{
cemuLog_force("RPLLoader: Invalid FILEINFO magic");
cemuLog_log(LogType::Force, "RPLLoader: Invalid FILEINFO magic");
return false;
}
@ -287,16 +287,16 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
uint32 crcTableExpectedSize = sectionCount * sizeof(uint32be);
if (!RPLLoader_CheckBounds(rplLoaderContext, crcSection->fileOffset, crcTableExpectedSize))
{
cemuLog_force("RPLLoader: CRC section outside of RPL file bounds");
cemuLog_log(LogType::Force, "RPLLoader: CRC section outside of RPL file bounds");
crcSection->sectionSize = 0;
}
else if (crcSection->sectionSize < crcTableExpectedSize)
{
cemuLog_force("RPLLoader: CRC section size (0x{:x}) less than required (0x{:x})", (uint32)crcSection->sectionSize, crcTableExpectedSize);
cemuLog_log(LogType::Force, "RPLLoader: CRC section size (0x{:x}) less than required (0x{:x})", (uint32)crcSection->sectionSize, crcTableExpectedSize);
}
else if (crcSection->sectionSize != crcTableExpectedSize)
{
cemuLog_force("RPLLoader: CRC section size (0x{:x}) does not match expected size (0x{:x})", (uint32)crcSection->sectionSize, crcTableExpectedSize);
cemuLog_log(LogType::Force, "RPLLoader: CRC section size (0x{:x}) does not match expected size (0x{:x})", (uint32)crcSection->sectionSize, crcTableExpectedSize);
}
uint32 crcActualSectionCount = crcSection->sectionSize / sizeof(uint32); // how many CRCs are actually stored
@ -314,7 +314,7 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
uint32 crcFileinfo = rplLoaderContext->GetSectionCRC(sectionCount - 1);
if (crcCalcFileinfo != crcFileinfo)
{
cemuLog_force("RPLLoader: FILEINFO section has CRC mismatch - Calculated: {:08x} Actual: {:08x}", crcCalcFileinfo, crcFileinfo);
cemuLog_log(LogType::Force, "RPLLoader: FILEINFO section has CRC mismatch - Calculated: {:08x} Actual: {:08x}", crcCalcFileinfo, crcFileinfo);
}
rplLoaderContext->sectionAddressTable2[sectionCount - 1].ptr = rplLoaderContext->sectionData_fileInfo.data();
@ -448,7 +448,7 @@ bool RPLLoader_LoadSingleSection(RPLModule* rplLoaderContext, sint32 sectionInde
// copy to mapped address
if(section->virtualAddress < regionMappingInfo->baseAddress || (section->virtualAddress + uncompressedSection->sectionData.size()) > regionMappingInfo->endAddress)
cemuLog_force("RPLLoader: Section {} (0x{:08x} to 0x{:08x}) is not fully contained in it's bounding region (0x{:08x} to 0x{:08x})", sectionIndex, section->virtualAddress, section->virtualAddress + uncompressedSection->sectionData.size(), regionMappingInfo->baseAddress, regionMappingInfo->endAddress);
cemuLog_log(LogType::Force, "RPLLoader: Section {} (0x{:08x} to 0x{:08x}) is not fully contained in it's bounding region (0x{:08x} to 0x{:08x})", sectionIndex, section->virtualAddress, section->virtualAddress + uncompressedSection->sectionData.size(), regionMappingInfo->baseAddress, regionMappingInfo->endAddress);
uint8* sectionAddressPtr = memory_getPointerFromVirtualOffset(sectionAddress);
std::copy(uncompressedSection->sectionData.begin(), uncompressedSection->sectionData.end(), sectionAddressPtr);
@ -612,7 +612,7 @@ bool RPLLoader_LoadSections(sint32 aProcId, RPLModule* rplLoaderContext)
if (section->type == 0x8)
{
cemuLog_force("RPLLoader: Unsupported text section type 0x8");
cemuLog_log(LogType::Force, "RPLLoader: Unsupported text section type 0x8");
cemu_assert_debug(false);
}
@ -931,7 +931,7 @@ bool RPLLoader_FixImportSymbols(RPLModule* rplLoaderContext, sint32 symtabSectio
if (symSectionIndex >= sharedImportTracking.size())
{
cemuLog_force("RPL-Loader: Symbol {} references invalid section", i);
cemuLog_log(LogType::Force, "RPL-Loader: Symbol {} references invalid section", i);
}
else if (sharedImportTracking[symSectionIndex].rplLoaderContext != nullptr)
{
@ -1104,7 +1104,7 @@ bool RPLLoader_ApplySingleReloc(RPLModule* rplLoaderContext, uint32 uknR3, uint8
{
// within range, update jump opcode
if ((jumpDistance & 3) != 0)
cemuLog_force("RPL-Loader: Encountered unaligned RPL_RELOC_REL24");
cemuLog_log(LogType::Force, "RPL-Loader: Encountered unaligned RPL_RELOC_REL24");
opc &= ~0x03fffffc;
opc |= (jumpDistance &0x03fffffc);
*(uint32be*)relocAddr = opc;
@ -1125,7 +1125,7 @@ bool RPLLoader_ApplySingleReloc(RPLModule* rplLoaderContext, uint32 uknR3, uint8
{
// within range, update jump opcode
if ((jumpDistance & 3) != 0)
cemuLog_force("RPL-Loader: Encountered unaligned RPL_RELOC_REL14");
cemuLog_log(LogType::Force, "RPL-Loader: Encountered unaligned RPL_RELOC_REL14");
opc &= ~0xfffc;
opc |= (jumpDistance & 0xfffc);
*(uint32be*)relocAddr = opc;
@ -1190,7 +1190,7 @@ bool RPLLoader_ApplySingleReloc(RPLModule* rplLoaderContext, uint32 uknR3, uint8
}
else
{
cemuLog_force("RPLLoader: sdata reloc uses register other than r2/r13");
cemuLog_log(LogType::Force, "RPLLoader: sdata reloc uses register other than r2/r13");
cemu_assert(false);
}
}
@ -1224,7 +1224,7 @@ bool RPLLoader_ApplySingleReloc(RPLModule* rplLoaderContext, uint32 uknR3, uint8
}
else
{
cemuLog_force("RPLLoader: Unsupported reloc type 0x{:02x}", relocType);
cemuLog_log(LogType::Force, "RPLLoader: Unsupported reloc type 0x{:02x}", relocType);
cemu_assert_debug(false); // unknown reloc type
}
return true;
@ -1344,7 +1344,7 @@ bool RPLLoader_ApplyRelocs(RPLModule* rplLoaderContext, sint32 relaSectionIndex,
assert_dbg(); // not a TLS symbol
if (rplLoaderContext->fileInfo.tlsModuleIndex == -1)
{
cemuLog_force("RPLLoader: TLS relocs applied to non-TLS module");
cemuLog_log(LogType::Force, "RPLLoader: TLS relocs applied to non-TLS module");
cemu_assert_debug(false); // module not a TLS-module
}
tlsModuleIndex = rplLoaderContext->fileInfo.tlsModuleIndex;
@ -1962,7 +1962,7 @@ void RPLLoader_AddDependency(const char* name)
rplLoader_currentTlsModuleIndex++;
rplLoader_currentHandleCounter++;
if (rplLoader_currentTlsModuleIndex == 0x7FFF)
cemuLog_force("RPLLoader: Exhausted TLS module indices pool");
cemuLog_log(LogType::Force, "RPLLoader: Exhausted TLS module indices pool");
// convert name to path/filename if it isn't already one
if (strchr(name, '.'))
{

View file

@ -254,7 +254,7 @@ namespace coreinit
else
{
if (failedAttempts >= 0x800)
cemuLog_force("Detected long-term contested OSLockMutex");
cemuLog_log(LogType::Force, "Detected long-term contested OSLockMutex");
currentThread->waitingForMutex = mutex;
mutex->threadQueue.queueAndWait(currentThread);
currentThread->waitingForMutex = nullptr;

View file

@ -407,7 +407,7 @@ namespace coreinit
// release held synchronization primitives
if (!threadBE->mutexQueue.isEmpty())
{
cemuLog_force("OSExitThread: Thread is holding mutexes");
cemuLog_log(LogType::Force, "OSExitThread: Thread is holding mutexes");
while (true)
{
OSMutex* mutex = threadBE->mutexQueue.getFirst();
@ -415,7 +415,7 @@ namespace coreinit
break;
if (mutex->owner != threadBE)
{
cemuLog_force("OSExitThread: Thread is holding mutex which it doesn't own");
cemuLog_log(LogType::Force, "OSExitThread: Thread is holding mutex which it doesn't own");
threadBE->mutexQueue.removeMutex(mutex);
continue;
}

View file

@ -355,7 +355,7 @@ namespace H264
uint32 numByteConsumed = 0;
if (!DetermineBufferSizes(data, length, numByteConsumed))
{
cemuLog_force("H264: Unable to determine picture size. Ignoring decode input");
cemuLog_log(LogType::Force, "H264: Unable to determine picture size. Ignoring decode input");
decodeResult.frameReady = false;
return;
}
@ -397,7 +397,7 @@ namespace H264
}
else if (status != 0)
{
cemuLog_force("H264: Failed to decode frame (error 0x{:08x})", status);
cemuLog_log(LogType::Force, "H264: Failed to decode frame (error 0x{:08x})", status);
decodeResult.frameReady = false;
return;
}
@ -901,7 +901,7 @@ namespace H264
}
else
{
cemuLog_force("h264Export_H264DECSetParam(): Unsupported parameterId 0x{:08x}\n", paramId);
cemuLog_log(LogType::Force, "h264Export_H264DECSetParam(): Unsupported parameterId 0x{:08x}\n", paramId);
cemu_assert_unimplemented();
}
return H264DEC_STATUS::SUCCESS;

View file

@ -46,7 +46,7 @@ namespace nn
if (idbeData.size() != sizeof(nnIdbeEncryptedIcon_t))
{
// icon does not exist or has the wrong size
cemuLog_force("IDBE: Failed to retrieve icon for title {:016x}", titleId);
cemuLog_log(LogType::Force, "IDBE: Failed to retrieve icon for title {:016x}", titleId);
memset(iconOut, 0, sizeof(nnIdbeEncryptedIcon_t));
coreinit_resumeThread(thread);
return;

View file

@ -1069,8 +1069,8 @@ namespace snd
{
if (gUnsupportedSoundEffectWarning)
return;
cemuLog_force("The currently running title is trying to utilize an unsupported audio effect");
cemuLog_force("To emulate these correctly, place snd_user.rpl and snduser2.rpl from the original Wii U firmware in /cafeLibs/ folder");
cemuLog_log(LogType::Force, "The currently running title is trying to utilize an unsupported audio effect");
cemuLog_log(LogType::Force, "To emulate these correctly, place snd_user.rpl and snduser2.rpl from the original Wii U firmware in /cafeLibs/ folder");
gUnsupportedSoundEffectWarning = true;
}
@ -1104,17 +1104,17 @@ namespace snd
void AXFXReverbHiInit(AXFXReverbHiData* param)
{
cemuLog_force("AXFXReverbHiInit - stub");
cemuLog_log(LogType::Force, "AXFXReverbHiInit - stub");
}
void AXFXReverbHiSettings(AXFXReverbHiData* param)
{
cemuLog_force("AXFXReverbHiSettings - stub");
cemuLog_log(LogType::Force, "AXFXReverbHiSettings - stub");
}
void AXFXReverbHiShutdown(AXFXReverbHiData* param)
{
cemuLog_force("AXFXReverbHiShutdown - stub");
cemuLog_log(LogType::Force, "AXFXReverbHiShutdown - stub");
}
void AXFXReverbHiCallback(AUXCBSAMPLEDATA* auxSamples, AXFXReverbHiData* reverbHi)
@ -1133,7 +1133,7 @@ namespace snd
void AXFXMultiChReverbInit(AXFXMultiChReverbData* param, int ukn2, int ukn3)
{
cemuLog_force("AXFXMultiChReverbInit (Stubbed)");
cemuLog_log(LogType::Force, "AXFXMultiChReverbInit (Stubbed)");
}
void AXFXMultiChReverbSettingsUpdate(AXFXMultiChReverbData* param)