Menu Disappears

Posts 15 of 5 · Page 1 of 1
Menu Disappears
I've got this (credits to mmbob):
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...);
    }
}
EDIT: Got it. Done without "void".
ReFont(pDevice); /
Your gonna have to figure that out on your own. It is easy, no one should have to spoonfeed something this simple.
ReFont(pDevice);
Ty, but i still don't know where to place it.

I'll try this:
Code:
HRESULT WINAPI gellReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
	Directx.pFont->OnLostDevice();

	HRESULT hRet = pReset(pDevice, pPresentationParameters);

	Directx.pFont->OnResetDevice();

	ReFont(pDevice);

	return hRet;
}
Edit:
Code:
1>  DirectX.cpp
1>DirectX.cpp(58): error C3861: 'ReFont': identifier not found
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);
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?