GT-Anakin Posted March 3, 2017 Share Posted March 3, 2017 Hello,I'm working on an overlay tool and i'm using Qt. Can you explain me, how you did the DirectX "Hack" to show the qt widgets on top of an DirectX application in Fullscreen mod?? Link to comment Share on other sites More sharing options...
Administrators kissaki Posted March 7, 2017 Administrators Share Posted March 7, 2017 It doesn't really have anything to do with Qt, and we don't really show Qt widgets per se.We inject into the systems DLL loading and on loading DLLs check whether they are 3D accelerated applications (using DirectX, OpenGL...), and whether we want to show an overlay. If so, we inject our own functions into the original DirectX functions, replacing the original code with a jump to our own code, preserving what we replaced.Then we use a Pipe for communication between the Mumble client and the overlay that was injected into other applications.Refer to the overlay folder for the overlay specific code and src/mumble/overlay.h for the client specific stuff.* Preparation* Checking whether to inject* injectingYou may want to check out the "minhook" library for code injection.If you were talking about the interactive mode where we actually draw the Mumble client itself in the overlay, I'm not too sure about that, and I think we removed it in the current codebase because it apparently had some open issues and no maintainer. You'd have to check for the "interactive mode" flag and code paths. Link to comment Share on other sites More sharing options...
Administrators mkrautz Posted March 24, 2017 Administrators Share Posted March 24, 2017 Actually, in Mumble 1.2.x there is a full-screen overlay that does embed the full Mumble client in the overlay.We do it using various hacks in both Qt and Mumble, and it's not pretty. It's not going to function in Qt 5/Mumble 1.3.0.Some quick pointers for some of the hacks:https://github.com/mumble-voip/mumble/search?p=1&q=g.ocIntercept&type=&utf8=%E2%9C%93and our patched Qt 4 is at:https://github.com/mumble-voip/mumble-developers-qt Link to comment Share on other sites More sharing options...
GT-Anakin Posted March 25, 2017 Author Share Posted March 25, 2017 i'm tied to Qt 5. So that would work for me, correct??There are so many overlays (steam, origin, Nvidia,...) i wonder there is no kind of api that allows you to add some overlay items to the screen (labels, image) and to interact with them (get mouse position, get mouse klick event)There is really not much needed. Just image/label print + option to grap the mouse with press/position.Then you can write your own program to show the content permanent, to hide them, to interact with mouse... Link to comment Share on other sites More sharing options...
Administrators mkrautz Posted March 28, 2017 Administrators Share Posted March 28, 2017 i'm tied to Qt 5. So that would work for me, correct??There are so many overlays (steam, origin, Nvidia,...) i wonder there is no kind of api that allows you to add some overlay items to the screen (labels, image) and to interact with them (get mouse position, get mouse klick event)There is really not much needed. Just image/label print + option to grap the mouse with press/position.Then you can write your own program to show the content permanent, to hide them, to interact with mouse... Our implementation only worked on Qt 4.What we did was, we made use of our existing overlay.Then we leveraged our GlobalShortcut implementation (including the ability to suppress events).This allowed us to grab mouse coordinates, clicks, etc. -- and ensure they weren't delivered to any other app on the system.Our code is old and unmaintained, and I doubt it works well anymore. However, our implementation mirrored the "Windows platform" windows from Mumble into overlay. That was the most hacky part of it.If you instead use a custom platform plugin in Qt, or you simply draw your widgets yourself, it should be much more doable.Unfortunately, our overlay code isn't really its own project, so it's not easy to integrate into something else. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now