mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[d3d9] Reject 2 BeginScene + EndScene without Begin
This commit is contained in:
parent
6071e998fd
commit
09e5939502
@ -1360,13 +1360,27 @@ namespace dxvk {
|
||||
// Some games don't even call them.
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D9DeviceEx::BeginScene() {
|
||||
D3D9DeviceLock lock = LockDevice();
|
||||
|
||||
if (unlikely(m_flags.test(D3D9DeviceFlag::InScene)))
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
m_flags.set(D3D9DeviceFlag::InScene);
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D9DeviceEx::EndScene() {
|
||||
D3D9DeviceLock lock = LockDevice();
|
||||
|
||||
if (unlikely(!m_flags.test(D3D9DeviceFlag::InScene)))
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
FlushImplicit(true);
|
||||
|
||||
m_flags.clr(D3D9DeviceFlag::InScene);
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,8 @@ namespace dxvk {
|
||||
ValidSampleMask,
|
||||
DirtyDepthBounds,
|
||||
DirtyPointScale,
|
||||
|
||||
InScene,
|
||||
};
|
||||
|
||||
using D3D9DeviceFlags = Flags<D3D9DeviceFlag>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user