mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[d3d9] Make nullptr/oob checks in GetBackBuffer unlikely
This commit is contained in:
parent
8cfca32c2a
commit
e41640dcde
@ -331,10 +331,10 @@ namespace dxvk {
|
||||
UINT iBackBuffer,
|
||||
D3DBACKBUFFER_TYPE Type,
|
||||
IDirect3DSurface9** ppBackBuffer) {
|
||||
if (ppBackBuffer == nullptr)
|
||||
if (unlikely(ppBackBuffer == nullptr))
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
if (iBackBuffer >= m_presentParams.BackBufferCount) {
|
||||
if (unlikely(iBackBuffer >= m_presentParams.BackBufferCount)) {
|
||||
Logger::err(str::format("D3D9: GetBackBuffer: Invalid back buffer index: ", iBackBuffer));
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user