Fix Nz::ErrorFlags API and usage
This commit is contained in:
parent
f06752b08d
commit
0191256493
|
|
@ -62,7 +62,7 @@ namespace Nz::Vk
|
|||
{
|
||||
PFN_vkVoidFunction func;
|
||||
{
|
||||
ErrorFlags errFlags({}, ~ErrorMode::ThrowException);
|
||||
ErrorFlags errFlags({}, ErrorMode::ThrowException);
|
||||
func = m_instance.GetDeviceProcAddr(m_device, name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ aiFile* StreamOpener(aiFileIO* fileIO, const char* filePath, const char* openMod
|
|||
}
|
||||
else
|
||||
{
|
||||
ErrorFlags errFlags({}, ~ErrorMode::ThrowException);
|
||||
ErrorFlags errFlags({}, ErrorMode::ThrowException);
|
||||
|
||||
Result<OpenModeFlags, std::string> openModes = File::DecodeOpenMode(openMode);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace Nz
|
|||
|
||||
for (const char* libname : libs)
|
||||
{
|
||||
ErrorFlags disableError(ErrorMode::Silent, ~ErrorMode::ThrowException);
|
||||
ErrorFlags disableError(ErrorMode::Silent, ErrorMode::ThrowException);
|
||||
|
||||
if (!m_library.Load(Utf8Path(libname)))
|
||||
continue;
|
||||
|
|
@ -77,7 +77,7 @@ namespace Nz
|
|||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
ErrorFlags disableSilent({}, ~ErrorMode::Silent);
|
||||
ErrorFlags disableSilent({}, ErrorMode::Silent);
|
||||
|
||||
NazaraWarningFmt("failed to load {0}: {1}", libname, e.what());
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Nz
|
|||
ErrorModeFlags previousFlags = flags;
|
||||
|
||||
flags |= orFlags;
|
||||
flags &= andFlags;
|
||||
flags &= ~andFlags;
|
||||
|
||||
return previousFlags;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ namespace Nz
|
|||
|
||||
for (const char* libname : libs)
|
||||
{
|
||||
ErrorFlags errorFlags(ErrorMode::Silent, ~ErrorMode::ThrowException);
|
||||
ErrorFlags errorFlags(ErrorMode::Silent, ErrorMode::ThrowException);
|
||||
|
||||
if (!s_vulkanLib.Load(libname))
|
||||
continue;
|
||||
|
||||
Error::ApplyFlags({}, ~ErrorMode::Silent);
|
||||
Error::ApplyFlags({}, ErrorMode::Silent);
|
||||
|
||||
// vkGetInstanceProcAddr is the only function that's guarantee to be exported
|
||||
vkGetInstanceProcAddr = reinterpret_cast<PFN_vkGetInstanceProcAddr>(s_vulkanLib.GetSymbol("vkGetInstanceProcAddr"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue