Sign in to follow this  
Sagan

Colourblind: Modify another game's graphical output

Recommended Posts

Hi, ever since reading a post about how Bioshock 2 looks like for colour blind people, ( http://negativegamer.com/2010/02/11/what-bioshock-2s-hacking-looks-like-if-youre-colour-blind/ ) I have had this idea to create an overlay that will automatically correct the colours of any game so colour blind people can still play it. Now I finally have the time to actually do it. The basic idea how this would work is, that I would 1) capture the screen of whichever application is running, then 2) run some filter over the captured image to modify it's colours, and then 3) display that modified image on top of the application. I think I can do numbers 2) and 3), but I can't do 1) yet. So my first question would be: How do you capture the output of another application? Fraps does it somehow, so it has to be possible. I am looking to do this in Windows, (XP, Vista, 7) and I don't really care about the programming language. C++ might be the best for this, but I am open to any language. (except maybe C#, because I'm not sure how well I would be able to port that code to Mac or Linux should I ever want to do that) So my questions: a) do you think I am going about this the right way? b) how do I capture the screen of another application? Thanks.

Share this post


Link to post
Share on other sites
I believe what you are looking for is known as "API hooking". I am fairly certain this is what Fraps does, and, although I've never done it myself, the concept is along the lines of transparently redirecting a function call to your own function. I've heard it called "injecting code", as well.

It's really been entirely too complicated for me to justify actually going through with it on the few occasions I've thought of a use for it. I'm sure there are a few here who know how to do it, but if they don't drop in here, you can start here:

http://en.wikipedia.org/wiki/Hooking#Hooking_Direct3D

and of course here:

http://www.google.com/search?q=direct3d+hooking

Purely speculation: IDirect3DDevice9::Present() (or glXSwapBuffer or whatever it is in OpenGL) may be a good place to start once you get your head around how to actually do the "hooking" - so you can get in and manipulate the backbuffer immediately before it's meant to be shown. There may well be technical reasons that's just impossible. Either way - Good luck with that :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this