optimized font treatment on device reset
This commit is contained in:
parent
3fe3b95971
commit
e9afc98da1
|
@ -734,7 +734,10 @@ bool Direct3DDisplay::resetDevice()
|
||||||
if( !pDevice ) return false;
|
if( !pDevice ) return false;
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
destroyFont();
|
if( pFont ) {
|
||||||
|
// prepares font for rest
|
||||||
|
pFont->OnLostDevice();
|
||||||
|
}
|
||||||
destroyTexture();
|
destroyTexture();
|
||||||
prepareDisplayMode();
|
prepareDisplayMode();
|
||||||
|
|
||||||
|
@ -751,7 +754,10 @@ bool Direct3DDisplay::resetDevice()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
createFont();
|
if( pFont ) {
|
||||||
|
// re-aquires font resources
|
||||||
|
pFont->OnResetDevice();
|
||||||
|
}
|
||||||
createTexture();
|
createTexture();
|
||||||
setOption( _T("d3dFilter"), theApp.d3dFilter );
|
setOption( _T("d3dFilter"), theApp.d3dFilter );
|
||||||
failed = false;
|
failed = false;
|
||||||
|
|
Loading…
Reference in New Issue