d3d->d3dswapchain = NULL;
}
d3d->locked = 0;
+ d3d->fulllocked = 0;
+ d3d->fakelock = 0;
d3d->maskshift.x = d3d->maskshift.y = d3d->maskshift.z = d3d->maskshift.w = 0;
d3d->maskmult.x = d3d->maskmult.y = d3d->maskmult.z = d3d->maskmult.w = 0;
}
{
struct d3dstruct *d3d = &d3ddata[monid];
+ if (w < 0 || h < 0) {
+ return d3d->texture1 != NULL;
+ }
+
d3d->tin_w = w * d3d->dmult;
d3d->tin_h = h * d3d->dmult;
struct d3dstruct *d3d = &d3ddata[monid];
HRESULT hr;
- if (!isd3d(d3d) || !d3d->texture1)
+ if (!isd3d(d3d)) {
return;
-
+ }
+
if (d3d->fakelock) {
d3d->fakelock--;
return;
}
+ if (!d3d->texture1)
+ return;
+
if (d3d->locked) {
LPDIRECT3DTEXTURE9 tex = d3d->texture1;
if (d3d->locked == 2) {
h = vb->outheight;
}
- if (oldtex_w[monid] == w && oldtex_h[monid] == h && oldtex_rtg[monid] == mon->screen_is_picasso)
+ if (oldtex_w[monid] == w && oldtex_h[monid] == h && oldtex_rtg[monid] == mon->screen_is_picasso && D3D_alloctexture(mon->monitor_id, -1, -1))
return false;
if (!w || !h) {