summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3DCommon
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-12-02 13:17:27 -0500
committerLioncash <mathew1800@gmail.com>2020-12-02 13:38:33 -0500
commit139d4fc76e4ddf45179ca5ec5e42c52ef513ea4d (patch)
treea639ad5dfd8a1b85eb32d408e2068dce9f41ce00 /Source/Core/VideoBackends/D3DCommon
parent5abae61a8c7e0e4ac03bb8d3031793037e87fdd3 (diff)
General: Convert PanicAlerts over to fmt equivalent
Converts lingering panic alert calls over to the fmt-capable ones.
Diffstat (limited to 'Source/Core/VideoBackends/D3DCommon')
-rw-r--r--Source/Core/VideoBackends/D3DCommon/Common.cpp20
-rw-r--r--Source/Core/VideoBackends/D3DCommon/Shader.cpp4
-rw-r--r--Source/Core/VideoBackends/D3DCommon/SwapChain.cpp6
3 files changed, 15 insertions, 15 deletions
diff --git a/Source/Core/VideoBackends/D3DCommon/Common.cpp b/Source/Core/VideoBackends/D3DCommon/Common.cpp
index a80a3d6821..4b3f50ca8c 100644
--- a/Source/Core/VideoBackends/D3DCommon/Common.cpp
+++ b/Source/Core/VideoBackends/D3DCommon/Common.cpp
@@ -33,15 +33,15 @@ bool LoadLibraries()
if (!s_dxgi_library.Open("dxgi.dll"))
{
- PanicAlertT("Failed to load dxgi.dll");
+ PanicAlertFmtT("Failed to load dxgi.dll");
return false;
}
if (!s_d3dcompiler_library.Open(D3DCOMPILER_DLL_A))
{
- PanicAlertT("Failed to load %s. If you are using Windows 7, try installing the "
- "KB4019990 update package.",
- D3DCOMPILER_DLL_A);
+ PanicAlertFmtT("Failed to load {0}. If you are using Windows 7, try installing the "
+ "KB4019990 update package.",
+ D3DCOMPILER_DLL_A);
s_dxgi_library.Close();
return false;
}
@@ -50,7 +50,7 @@ bool LoadLibraries()
if (!s_d3dcompiler_library.GetSymbol("D3DCompile", &d3d_compile) ||
!s_dxgi_library.GetSymbol("CreateDXGIFactory", &create_dxgi_factory))
{
- PanicAlertT("Failed to find one or more D3D symbols");
+ PanicAlertFmtT("Failed to find one or more D3D symbols");
s_d3dcompiler_library.Close();
s_dxgi_library.Close();
return false;
@@ -88,7 +88,7 @@ Microsoft::WRL::ComPtr<IDXGIFactory> CreateDXGIFactory(bool debug_device)
HRESULT hr = create_dxgi_factory(IID_PPV_ARGS(factory.ReleaseAndGetAddressOf()));
if (FAILED(hr))
{
- PanicAlert("CreateDXGIFactory() failed with HRESULT %08X", hr);
+ PanicAlertFmt("CreateDXGIFactory() failed with HRESULT {:08X}", hr);
return nullptr;
}
@@ -147,7 +147,7 @@ DXGI_FORMAT GetDXGIFormatForAbstractFormat(AbstractTextureFormat format, bool ty
case AbstractTextureFormat::D32F_S8:
return DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS;
default:
- PanicAlert("Unhandled texture format.");
+ PanicAlertFmt("Unhandled texture format.");
return DXGI_FORMAT_R8G8B8A8_UNORM;
}
}
@@ -180,7 +180,7 @@ DXGI_FORMAT GetSRVFormatForAbstractFormat(AbstractTextureFormat format)
case AbstractTextureFormat::D32F_S8:
return DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS;
default:
- PanicAlert("Unhandled SRV format");
+ PanicAlertFmt("Unhandled SRV format");
return DXGI_FORMAT_UNKNOWN;
}
}
@@ -198,7 +198,7 @@ DXGI_FORMAT GetRTVFormatForAbstractFormat(AbstractTextureFormat format, bool int
case AbstractTextureFormat::R32F:
return DXGI_FORMAT_R32_FLOAT;
default:
- PanicAlert("Unhandled RTV format");
+ PanicAlertFmt("Unhandled RTV format");
return DXGI_FORMAT_UNKNOWN;
}
}
@@ -215,7 +215,7 @@ DXGI_FORMAT GetDSVFormatForAbstractFormat(AbstractTextureFormat format)
case AbstractTextureFormat::D32F_S8:
return DXGI_FORMAT_D32_FLOAT_S8X24_UINT;
default:
- PanicAlert("Unhandled DSV format");
+ PanicAlertFmt("Unhandled DSV format");
return DXGI_FORMAT_UNKNOWN;
}
}
diff --git a/Source/Core/VideoBackends/D3DCommon/Shader.cpp b/Source/Core/VideoBackends/D3DCommon/Shader.cpp
index 9ea83ffa30..88fc70c8a0 100644
--- a/Source/Core/VideoBackends/D3DCommon/Shader.cpp
+++ b/Source/Core/VideoBackends/D3DCommon/Shader.cpp
@@ -119,8 +119,8 @@ std::optional<Shader::BinaryData> Shader::CompileShader(D3D_FEATURE_LEVEL featur
file << "Video Backend: " + g_video_backend->GetDisplayName();
file.close();
- PanicAlert("Failed to compile %s:\nDebug info (%s):\n%s", filename.c_str(), target,
- static_cast<const char*>(errors->GetBufferPointer()));
+ PanicAlertFmt("Failed to compile {}:\nDebug info ({}):\n{}", filename, target,
+ static_cast<const char*>(errors->GetBufferPointer()));
return std::nullopt;
}
diff --git a/Source/Core/VideoBackends/D3DCommon/SwapChain.cpp b/Source/Core/VideoBackends/D3DCommon/SwapChain.cpp
index ff344a993d..56d927f159 100644
--- a/Source/Core/VideoBackends/D3DCommon/SwapChain.cpp
+++ b/Source/Core/VideoBackends/D3DCommon/SwapChain.cpp
@@ -126,7 +126,7 @@ bool SwapChain::CreateSwapChain(bool stereo)
if (FAILED(hr))
{
- PanicAlert("Failed to create swap chain with HRESULT %08X", hr);
+ PanicAlertFmt("Failed to create swap chain with HRESULT {:08X}", hr);
return false;
}
@@ -139,7 +139,7 @@ bool SwapChain::CreateSwapChain(bool stereo)
m_stereo = stereo;
if (!CreateSwapChainBuffers())
{
- PanicAlert("Failed to create swap chain buffers");
+ PanicAlertFmt("Failed to create swap chain buffers");
DestroySwapChainBuffers();
m_swap_chain.Reset();
return false;
@@ -187,7 +187,7 @@ void SwapChain::SetStereo(bool stereo)
DestroySwapChain();
if (!CreateSwapChain(stereo))
{
- PanicAlert("Failed to switch swap chain stereo mode");
+ PanicAlertFmt("Failed to switch swap chain stereo mode");
CreateSwapChain(false);
}
}