ReFont(pDevice); /
I've got this (credits to mmbob):
EDIT: Got it. Done without "void".Code:void ReFont(LPDIRECT3DDEVICE9 pDevice) { if (g_pDevice != pDevice) { g_pDevice = pDevice; try { if (Directx.pFont != 0) Directx.pFont->Release(); } catch (...) {} Directx.pFont = 0; D3DXCreateFontA(Here is the font options, but doesn't matter...); } }
Last edited by klofee; 08-30-2010 at 02:32 PM.
ReFont(pDevice); /
klofee (08-30-2010)
Ty, but i still don't know where to place it.ReFont(pDevice);
I'll try this:Edit:Code:HRESULT WINAPI gellReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters ) { Directx.pFont->OnLostDevice(); HRESULT hRet = pReset(pDevice, pPresentationParameters); Directx.pFont->OnResetDevice(); ReFont(pDevice); return hRet; }Code:1> DirectX.cpp 1>DirectX.cpp(58): error C3861: 'ReFont': identifier not found
Last edited by klofee; 08-30-2010 at 01:47 PM.
Add this to your gellPresent:
Code:if (g_pDevice != pDevice) { g_pDevice = pDevice; try { if (Directx.pFont != 0) Directx.pFont->Release(); } catch (...) {} Directx.pFont = 0; D3DXCreateFontA(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx.pFont);
klofee (08-30-2010)