mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Direct3D11: Fix after taking a screenshot, that attempting to resize the window would crash (Thanks 123DMWM)
This commit is contained in:
parent
0a4f26c296
commit
2a7fb28aac
@ -1046,7 +1046,7 @@ static BitmapCol* D3D11_GetRow(struct Bitmap* bmp, int y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cc_result Gfx_TakeScreenshot(struct Stream* output) {
|
cc_result Gfx_TakeScreenshot(struct Stream* output) {
|
||||||
ID3D11Texture2D* tmp;
|
ID3D11Texture2D* tmp = NULL;
|
||||||
struct Bitmap bmp;
|
struct Bitmap bmp;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@ -1080,6 +1080,7 @@ cc_result Gfx_TakeScreenshot(struct Stream* output) {
|
|||||||
|
|
||||||
finished:
|
finished:
|
||||||
if (tmp) { ID3D11Texture2D_Release(tmp); }
|
if (tmp) { ID3D11Texture2D_Release(tmp); }
|
||||||
|
ID3D11Resource_Release(backbuffer_res);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user