- 614
- 260
C++:
bool CALLBACK Present(CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride,
CONST RGNDATA *pDirtyRegion)
{
if (SF->getRender()->CanDraw()){
if (stateblock == nullptr){
stateblock = new CState(g_pd3dDevice);
}
ImGui_ImplDX9_NewFrame();
RenderGUI();
stateblock->Save();
if (SUCCEEDED(SF->getRender()->BeginRender()) && init)
{
ImGui::Render();
std::string s = SF->getSAMP()->getPlayers()->GetPlayerName(0);
char buf[64];
sprintf(buf, "%s", s);
pFont->Print(buf, D3DCOLOR_ARGB(255, 255, 255, 0), 500, 500, false);
SF->getRender()->EndRender();
}
stateblock->Restore();
}
return true;
};
Игра виснет при старте. Как исправить?