Handle failure with d3d_swap

This commit is contained in:
twinaphex 2015-11-09 01:59:24 +01:00
parent 780bf74273
commit 6a12e874b8

View File

@ -1684,8 +1684,7 @@ static bool d3d_frame(void *data, const void *frame,
* can screenshot, etc. */
if (settings->video.black_frame_insertion)
{
d3d_swap(d3d, d3dr);
if (d3d->needs_restore)
if (!d3d_swap(d3d, d3dr) || d3d->needs_restore)
return true;
d3d_clear(d3dr, 0, 0, D3DCLEAR_TARGET, 0, 1, 0);
}