Fix a bug where the 64 bit jump opcodes would be used unnecessarily, which resulted in function prologue overwrite in certain 64 bit D3D DLLs due to the length of the 64 bit jump.
Also if the game capture DLL is more than a 32 bit jump away, we now try to allocate memory near the target and set up an intermediate jump to get it within range.
This reverts commit f5c2dc094aade1feeb50220fa7583b5616e02b3d.
This was a change that was added to fix support for certain intel
devices, but ultimately I feel like it's just not needed and is trying
to fix something that isn't broken.
This also changes the way that the patches are used as well in the code,
instead of relying on constant patch sizes, now allows for variable
patch sizes instead
It says "windows 8 not supported" and makes one think that game capture
itself isn't working because of windows 8, but this message just refers
to directdraw capture only.
Because the DWM window is an invisible window, the recent change using
FindVisibleWindow instead of FindWindow will cause it to never find the
DWM window. So, detect if the target is the DWM, and then use regular
FindWindow instead if so.
This fixes league of legends capturing issues where people would get a
black screen with game capture with it: What happened is that riot must
have changed the window class for the hidden patcher window to have the
same window class as the in-game window, so when you exit your game, it
would try to capture the hidden patcher window and it would get stuck on
it. Solution was to make it so only visible windows were captured.
Secondly, this improves the game capture hotkey feature. Game capture
hotkey will now always 'stick' to the last window you captured, and save
it to config. Only until the hotkey is hit again will it try to capture
a different window.
Windows that are not visible will no longer be used as capture targets.
I'm guessing that this may have been the cause of a number of prior
issues.