optimized font treatment on device reset

This commit is contained in:
spacy51 2007-12-01 21:22:02 +00:00
parent 3fe3b95971
commit e9afc98da1
1 changed files with 8 additions and 2 deletions

View File

@ -734,7 +734,10 @@ bool Direct3DDisplay::resetDevice()
if( !pDevice ) return false;
HRESULT hr;
destroyFont();
if( pFont ) {
// prepares font for rest
pFont->OnLostDevice();
}
destroyTexture();
prepareDisplayMode();
@ -751,7 +754,10 @@ bool Direct3DDisplay::resetDevice()
return false;
}
createFont();
if( pFont ) {
// re-aquires font resources
pFont->OnResetDevice();
}
createTexture();
setOption( _T("d3dFilter"), theApp.d3dFilter );
failed = false;