Join Date: Jul 2013
Posts: 5
|
TEXT Code: unique_ptr<Drawing::Direct3D9Renderer> gui_renderer; void Initialize() { unique_ptr<Drawing::Direct3D9Renderer> renderer( new Drawing::Direct3D9Renderer( g_pDevice ) ); gui_renderer = std::move( renderer ); Application::Initialize( std::move( gui_renderer ) ); auto &app = Application::Instance(); Drawing::FontPtr font = Drawing::FontManager::LoadFont( "Tahoma" , 8.0f , true ); app.SetDefaultFont( font ); auto form = std::make_shared<form1>(); app.Run( form ); app.Enable(); app.RegisterHotkey( Hotkey( Key::Insert , [] { Application::Instance().Toggle(); } ) ); } HRESULT WINAPI Hook_Reset( LPDIRECT3DDEVICE9 pDevice , D3DPRESENT_PARAMETERS* pPresentationParameters ) { if ( gui_renderer ) gui_renderer->PreD3DReset(); HRESULT hRes = Reset_o( pDevice , pPresentationParameters ); if ( gui_renderer ) gui_renderer->PostD3DReset(); return hRes; } HRESULT WINAPI Hook_EndScene( IDirect3DDevice9* pDevice ) { static bool InitalizeGUI = false; if ( !InitalizeGUI ) { Initialize(); messageHookHandle = SetWindowsHookExW( WH_GETMESSAGE , KeyboardHook , 0 , GetCurrentThreadId() ); InitalizeGUI = true; } if ( InitalizeGUI ) { auto &app = Application::Instance(); auto &renderer = app.GetRenderer(); renderer.BeginRendering(); app.Render(); renderer.EndRendering(); } return EndScene_o( pDevice ); }
if minimize game(csgo) and maximize game then game freeze (minimize and maximize is work) , how to fix?
|