mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 18:15:35 +00:00
End the scene before resetting the D3D device, since we'll start with BeginScene after that.
If we don't do this, we'll end up with unbalanced Begin/End scene pairs which causes D3DERR_INVALIDCALL in the present. Fixes https://github.com/libsdl-org/SDL/issues/4933
This commit is contained in:
parent
6b64c47b69
commit
3a31a45028
|
@ -1425,6 +1425,12 @@ D3D_Reset(SDL_Renderer * renderer)
|
||||||
SDL_Texture *texture;
|
SDL_Texture *texture;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Cancel any scene that we've started */
|
||||||
|
if (!data->beginScene) {
|
||||||
|
IDirect3DDevice9_EndScene(data->device);
|
||||||
|
data->beginScene = SDL_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Release the default render target before reset */
|
/* Release the default render target before reset */
|
||||||
if (data->defaultRenderTarget) {
|
if (data->defaultRenderTarget) {
|
||||||
IDirect3DSurface9_Release(data->defaultRenderTarget);
|
IDirect3DSurface9_Release(data->defaultRenderTarget);
|
||||||
|
|
Loading…
Reference in a new issue