handle texture death

finally fixes resize
This commit is contained in:
tildearrow 2024-05-15 19:52:05 -05:00
parent d00cdabe6e
commit f66d723251
6 changed files with 28 additions and 1 deletions

View file

@ -35,6 +35,10 @@ FurnaceGUITextureFormat FurnaceGUIRender::getTextureFormat(FurnaceGUITexture* wh
return GUI_TEXFORMAT_UNKNOWN;
}
bool FurnaceGUIRender::isTextureValid(FurnaceGUITexture* which) {
return (which!=NULL);
}
bool FurnaceGUIRender::lockTexture(FurnaceGUITexture* which, void** data, int* pitch) {
return false;
}

View file

@ -91,6 +91,12 @@ FurnaceGUITextureFormat FurnaceGUIRenderDX9::getTextureFormat(FurnaceGUITexture*
return t->format;
}
bool FurnaceGUIRenderDX9::isTextureValid(FurnaceGUITexture* which) {
if (which==NULL) return false;
FurnaceDX9Texture* t=(FurnaceDX9Texture*)which;
return (t->tex!=NULL);
}
bool FurnaceGUIRenderDX9::lockTexture(FurnaceGUITexture* which, void** data, int* pitch) {
FurnaceDX9Texture* t=(FurnaceDX9Texture*)which;
D3DLOCKED_RECT lockedRect;
@ -519,6 +525,7 @@ bool FurnaceGUIRenderDX9::quit() {
iface->Release();
iface=NULL;
}
priv->texPool.clear();
dead=false;
return true;
}