Commit Graph

12 Commits (3c1f17ca662d4f794e3034035f3bb5d888b2acca)

Author SHA1 Message Date
jp9000 21d70fa207 win-capture: Don't use FindWindow for game capture keepalive
Using and creating a window can use issues in game capture if multiple
game captures are active, so revert back to using a mutex, and just
ignore the keepalive check failure if injected inside a UWP program
(only check to see if GetLastError reports that it's not found -- if it
returns access denied or any other error, assume it's in a UWP program,
and ignore the keepalive check).
2017-01-15 09:15:45 -08:00
jp9000 3b5a30ce97 win-capture: Capture all D3D12 backbuffers
D3D12 capture does not take in to account when multiple backbuffers are
in used.  With previous versions of Direct3D there was no need to do
this, but with D3D12 you must explicitly capture each specific
backbuffer currently in use.
2016-12-23 01:53:15 -08:00
jp9000 d19342442f win-capture: Use window for keepalive check
To check to make sure game capture is still active in the capture
program, it currently uses a named event, and then it checks to see if
that named event exists.  However with UWP programs, you can't open a
named event outside of the UWP process.  FindWindow on the other hand
does work, so instead of checking to see if a named kernel object
exists, create a window and check to see if that window exists.
2016-12-16 02:21:06 -08:00
jp9000 746061fb3a win-capture: Always use minimal access rights within hook
This prevents issues with opening handles to objects within UWP
programs, which have increased security limitations.
2016-12-15 13:03:42 -08:00
jp9000 0b27b51294 win-capture: Add D3D12 capture support
Currently only supports shared texture capture, and doesn't support
rescaling.
2016-11-03 12:13:42 -07:00
jp9000 50c61898d0 win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00
jp9000 13d22645e4 win-capture: Use correct variable for system modules
..This is rather embarrassing.  I used the parameter variable and the
actual variable that I wanted to used went completely unused.  Would
static analysis catch something like this, I wonder?  Would probably
have to be really good static analysis.
2015-08-29 21:03:54 -07:00
jp9000 372a23de68 win-capture: Use inline define with VC only
mingw already supports the regular inline keyword in C; VC does not.
2015-02-09 03:55:17 -08:00
jp9000 12a000cae5 win-capture: Refactor inline functions
Apparently someone dumb (aka me) neglected to properly handle the inline
graphics hook API functions.  You're not supposed to 'extern' inline
functions, they need to be defined for each file when ever they're used.
2015-02-09 03:51:08 -08:00
jp9000 6b38fa35b0 Use _MSC_VER for MSVC-specific pragmas
These aren't used on mingw so they need to be surrounded by #ifdef
_MSC_VER
2015-02-09 03:49:18 -08:00
martell 1e056fd7ec win-capture: deal with a 32bit handle cast errors
The HWND type is a void pointer, but HWND values are global and always
32bit despite, so casting to 32bit can cause cast warnings on actual
good compilers like gcc via mingw.  This change correctly handles the
casting to 32bits without producing unwanted warnings or errors on
mingw.
2015-02-09 03:41:54 -08:00
jp9000 a5872955f4 win-capture: Add graphics-hook library
This library is a completely refactored and rewritten version of the
original graphics hook.  The code is more clean, readable, and has a
variety of new features, such as scaling and forcing memory capture.

Currently, only D3D9, 10, and 11 are implemented.  (This commit may be
updated on this branch)
2014-12-09 14:21:07 -08:00