{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/689","repository_url":"https://api.github.com/repos/ocornut/imgui","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/689/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/689/events","html_url":"https://github.com/ocornut/imgui/issues/689","id":159390054,"number":689,"title":"(D3D9 / Hooked Device ) Issues with integration, code is locking up","user":{"login":"PermaNulled","id":12246596,"avatar_url":"https://avatars.githubusercontent.com/u/12246596?v=3","gravatar_id":"","url":"https://api.github.com/users/PermaNulled","html_url":"https://github.com/PermaNulled","followers_url":"https://api.github.com/users/PermaNulled/followers","following_url":"https://api.github.com/users/PermaNulled/following{/other_user}","gists_url":"https://api.github.com/users/PermaNulled/gists{/gist_id}","starred_url":"https://api.github.com/users/PermaNulled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PermaNulled/subscriptions","organizations_url":"https://api.github.com/users/PermaNulled/orgs","repos_url":"https://api.github.com/users/PermaNulled/repos","events_url":"https://api.github.com/users/PermaNulled/events{/privacy}","received_events_url":"https://api.github.com/users/PermaNulled/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-09T11:54:39Z","updated_at":"2016-06-10T09:11:52Z","closed_at":null,"body":"So I haven't been able to track down what exactly is causing my problem and my implementation/integration isn't an normal scenario I was hoping someone here would be able to help figure out what's going wrong.\r\n\r\nTo explain my project in a short way Xbox Live for halo 2 on windows was shut down I've created a mod which restores it by mirroring all of the XLive functionality in my own DLL but over LAN an added advantage was that I had access to the functions which GFWL (Games for Windows Live) used to render it's own overlays/hud on top of the game it was interacting with.\r\n\r\nSuch as \r\n\r\n```\r\nHRESULT XLiveOnCreateDevice(\r\n          IUnknown *pD3D,\r\n         VOID *pD3DPP\r\n )\r\n HRESULT XLiveInitialize(\r\n          XLIVE_INITIALIZE_INFO *pPii\r\n)\r\nHRESULT XLiveRender()\r\n\r\n```\r\n> XLiveRender is called by games in the render loop after BeginScene is called and all rendering has completed. XLiveRender is called before the last EndScene method call in the render loop.\r\n\r\nWith this I wanted to add my own GUI to the mix, and have choose to attempt integration of imgui, so far I've just been trying to get the d3d9 example to render in the game but It's locking up at \r\n\r\n> 09/06/2016 04:45:41.662 ImFontAtlas::Build() - for_loop #3 - stbtt_PackFontRangesRenderIntoRects( RangesCount: 1 )\r\n\r\nWhich appears to happen in ImGui_ImplDX9_NewFrame();\r\nhttps://github.com/PermaNulled/cartographer/blob/imgui_attempt/GUI.cpp#L311\r\n\r\nOriginally I thought this was due to my lack of HWND handle as I was passing NULL so I made it wait until that was filled by another handler of XLive which the game passes it's window handle into.\r\n\r\nOnce the game does that I call ImGui_ImplDX9_Init()\r\nhttps://github.com/PermaNulled/cartographer/blob/imgui_attempt/GUI.cpp#L120\r\n\r\nI've commented everything else out because i can't seem to get past this point things are locked up from here if I wait up to 30 or so seconds it will still not be functioning it doesn't crash it's just frozen/in a dead lock state.\r\n\r\nBased on strings I've added in this is as far as it gets,\r\nhttps://github.com/PermaNulled/cartographer/blob/imgui_attempt/imgui/imgui_draw.cpp#L1432\r\n\r\nI would appreciate any help any one has to offer on the matter, I also apologize for my sloppy code I'm not exactly a 'professional' or someone looking for a career in programming.\r\n"},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/225131926","html_url":"https://github.com/ocornut/imgui/issues/689#issuecomment-225131926","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/689","id":225131926,"user":{"login":"PermaNulled","id":12246596,"avatar_url":"https://avatars.githubusercontent.com/u/12246596?v=3","gravatar_id":"","url":"https://api.github.com/users/PermaNulled","html_url":"https://github.com/PermaNulled","followers_url":"https://api.github.com/users/PermaNulled/followers","following_url":"https://api.github.com/users/PermaNulled/following{/other_user}","gists_url":"https://api.github.com/users/PermaNulled/gists{/gist_id}","starred_url":"https://api.github.com/users/PermaNulled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PermaNulled/subscriptions","organizations_url":"https://api.github.com/users/PermaNulled/orgs","repos_url":"https://api.github.com/users/PermaNulled/repos","events_url":"https://api.github.com/users/PermaNulled/events{/privacy}","received_events_url":"https://api.github.com/users/PermaNulled/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T09:11:52Z","updated_at":"2016-06-10T09:11:52Z","body":"This is 100% just copy and paste of the example stuff for d3d9... I haven't tried passing input to it yet the only two functions I'm trying to call from the example so far are the NewFrame and Initialization"}}
{"actor":{"display_login":"PermaNulled"}}