| Summary: | Provide a way to get current HDC along with HWND | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Katie Stafford <katie> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.3 | Keywords: | triage-2.0.4 |
| Hardware: | All | ||
| OS: | Windows (All) | ||
|
Description
Katie Stafford
2014-07-31 02:49:57 UTC
Can you just use GetDC()? http://msdn.microsoft.com/en-us/library/windows/desktop/dd144871(v=vs.85).aspx The Rift SDK actually does call GetDC if you don't give it a device context, but for some reason it doesn't seem to work unless you give it the HDC that created the GL context. This may be a bug in the Oculus SDK, but it still wouldn't hurt to have the existing handle present in SDL_SysWMInfo. I just tried using GetDC on the window; that returns a different handle. The only thing that works is the actual handle that created the context. Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! This is now available in https://hg.libsdl.org/SDL/rev/286c854c1d5b --ryan. |