mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
General: Convert PanicAlerts over to fmt equivalent
Converts lingering panic alert calls over to the fmt-capable ones.
This commit is contained in:
@ -43,7 +43,7 @@ bool Create(u32 adapter_index, bool enable_debug_layer)
|
||||
if (!s_d3d11_library.Open("d3d11.dll") ||
|
||||
!s_d3d11_library.GetSymbol("D3D11CreateDevice", &d3d11_create_device))
|
||||
{
|
||||
PanicAlertT("Failed to load d3d11.dll");
|
||||
PanicAlertFmtT("Failed to load d3d11.dll");
|
||||
s_d3d11_library.Close();
|
||||
return false;
|
||||
}
|
||||
@ -57,7 +57,7 @@ bool Create(u32 adapter_index, bool enable_debug_layer)
|
||||
dxgi_factory = D3DCommon::CreateDXGIFactory(enable_debug_layer);
|
||||
if (!dxgi_factory)
|
||||
{
|
||||
PanicAlertT("Failed to create DXGI factory");
|
||||
PanicAlertFmtT("Failed to create DXGI factory");
|
||||
D3DCommon::UnloadLibraries();
|
||||
s_d3d11_library.Close();
|
||||
return false;
|
||||
@ -113,7 +113,7 @@ bool Create(u32 adapter_index, bool enable_debug_layer)
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
PanicAlertT(
|
||||
PanicAlertFmtT(
|
||||
"Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0");
|
||||
dxgi_factory.Reset();
|
||||
D3DCommon::UnloadLibraries();
|
||||
|
@ -45,8 +45,8 @@ std::unique_ptr<DXTexture> DXTexture::Create(const TextureConfig& config)
|
||||
HRESULT hr = D3D::device->CreateTexture2D(&desc, nullptr, d3d_texture.GetAddressOf());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
PanicAlert("Failed to create %ux%ux%u D3D backing texture", config.width, config.height,
|
||||
config.layers);
|
||||
PanicAlertFmt("Failed to create {}x{}x{} D3D backing texture", config.width, config.height,
|
||||
config.layers);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -92,8 +92,8 @@ bool DXTexture::CreateSRV()
|
||||
HRESULT hr = D3D::device->CreateShaderResourceView(m_texture.Get(), &desc, m_srv.GetAddressOf());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
PanicAlert("Failed to create %ux%ux%u D3D SRV", m_config.width, m_config.height,
|
||||
m_config.layers);
|
||||
PanicAlertFmt("Failed to create {}x{}x{} D3D SRV", m_config.width, m_config.height,
|
||||
m_config.layers);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -109,8 +109,8 @@ bool DXTexture::CreateUAV()
|
||||
HRESULT hr = D3D::device->CreateUnorderedAccessView(m_texture.Get(), &desc, m_uav.GetAddressOf());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
PanicAlert("Failed to create %ux%ux%u D3D UAV", m_config.width, m_config.height,
|
||||
m_config.layers);
|
||||
PanicAlertFmt("Failed to create {}x{}x{} D3D UAV", m_config.width, m_config.height,
|
||||
m_config.layers);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ DXGI_FORMAT VarToD3D(VarType t, int size, bool integer)
|
||||
DXGI_FORMAT retval = d3d_format_lookup[(int)t + 5 * (size - 1) + 5 * 4 * (int)integer];
|
||||
if (retval == DXGI_FORMAT_UNKNOWN)
|
||||
{
|
||||
PanicAlert("VarToD3D: Invalid type/size combo %i , %i, %i", (int)t, size, (int)integer);
|
||||
PanicAlertFmt("VarToD3D: Invalid type/size combo {}, {}, {}", t, size, integer);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
std::unique_ptr<SwapChain> swap_chain;
|
||||
if (wsi.render_surface && !(swap_chain = SwapChain::Create(wsi)))
|
||||
{
|
||||
PanicAlertT("Failed to create D3D swap chain");
|
||||
PanicAlertFmtT("Failed to create D3D swap chain");
|
||||
ShutdownShared();
|
||||
D3D::Destroy();
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user