HRESULT __stdcall hkPresent ( IDXGISwapChain * pSwapChain , UINT SyncInterval , UINT Flags ) { if ( ! init ) { if ( SUCCEEDED ( pSwapChain -> GetDevice ( __uuidof ( ID3D11Device ) , ( void * * ) & pDevice ) ) ) { ImGui :: StyleColorsLight ; pDevice -> GetImmediateContext ( & pContext ) ; DXGI_SWAP_CHAIN_DESC sd ; pSwapChain -> GetDesc ( & sd ) ; window = sd . OutputWindow ; ID3D11Texture2D * pBackBuffer ; pSwapChain -> GetBuffer ( 0 , __uuidof ( ID3D11Texture2D ) , ( LPVOID * ) & pBackBuffer ) ; pDevice -> CreateRenderTargetView ( pBackBuffer , NULL , & mainRenderTargetView ) ; pBackBuffer -> Release ( ) ; oWndProc = ( WNDPROC ) SetWindowLongPtr ( window , GWLP_WNDPROC , ( LONG_PTR ) WndProc ) ; InitImGui ( ) ; init = true ; } } if ( GetAsyncKeyState ( VK_INSERT ) & 1 ) { menu = ! menu ; } if ( menu ) { ImGui_ImplDX11_NewFrame ( ) ; ImGui_ImplWin32_NewFrame ( ) ; ImGui :: NewFrame ( ) ; ImGui :: Begin ( "я гей но об этом никто не узнает" ) ; ImGui :: End ( ) ; ImGui :: Render ( ) ; pContext -> OMSetRenderTargets ( 1 , & mainRenderTargetView , NULL ) ; ImGui_ImplDX11_RenderDrawData ( ImGui :: GetDrawData ( ) ) ; } return oPresent ( pSwapChain , SyncInterval , Flags ) ; }