This is a read-only archive of the Mumble forums.

This website archives and makes accessible historical state. It receives no updates or corrections. It is provided only to keep the information accessible as-is, under their old address.

For up-to-date information please refer to the Mumble website and its linked documentation and other resources. For support please refer to one of our other community/support channels.

Jump to content

How does your DirectX "Hack" work?


GT-Anakin
 Share

Recommended Posts

  • Administrators

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

* injecting


You 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

  • 3 weeks later...
  • Administrators

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%93

and our patched Qt 4 is at:

https://github.com/mumble-voip/mumble-developers-qt

Link to comment
Share on other sites

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

  • Administrators
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

 Share

×
×
  • Create New...