Commit Graph

22 Commits (9b238ef71ea71ab077a5ac3af97c078a0fa06885)

Author SHA1 Message Date
Bl00drav3n 1f9f50c800 Fixed a bug in color conversion code for 16bit textures. 2015-02-14 01:08:38 +01:00
Bl00drav3n 74042fff96 win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
jp9000 253989bd72 win-capture: Mark unused parameters 2015-02-09 03:49:45 -08:00
jp9000 04c54162b2 win-capture: Fix ptr -> int cast warnings (mingw) 2015-02-09 03:49:44 -08:00
jp9000 2301a6f578 win-capture: Clarify if statement via inline func
Clears up a warning (to prevent && and || confusion), and clarifies what
specifically the if statement is trying to accomplish (check to see if
the capture is valid)
2015-02-09 03:49:43 -08:00
jp9000 5dfecab15c Fix windows printf format warnings (from mingw) 2015-02-09 03:49:14 -08:00
jp9000 0c1d121ff2 Remove various unused variables
Unused variables detected by mingw
2015-02-09 03:49:13 -08:00
jp9000 28278682a3 win-capture: Add option to show/hide game cursor 2015-02-07 03:06:16 -08:00
jp9000 2e6010b36d win-capture: Use macros for intervals
Having macros that state what these numbers mean is much more ideal than
just having a random number thrown in there, wondering why it was used
and what its purpose is (magic numbers).
2015-01-06 01:41:13 -08:00
jp9000 4f2c48a937 win-capture: Remove game capture 'Activate' button
The activate button is just silly for configuration in retrospect.  It's
confusing to users, and was even confusing to some other developers.
Instead of using an 'Activate' button for game capture every time you
want to capture a window, just make the 'window' list have a default 'no
window' value (empty), and then have it always active when an actual
window is selected.  The way syphon handles this on mac is actually
where I took the idea from (as suggested by Palana).
2015-01-06 01:30:55 -08:00
jp9000 0f09834c68 win-capture: Change error message for file mapping
If shared memory file mapping fails, I've found that it's somewhat
normal due to something in windows -- usually the capture will always
eventually start up after a few tries.  Only seems to apply to some
games though, for example seems to happen with counterstrike a lot for
some strange reason.  Capture always eventually starts back up though.
I remember seeing this with OBS1 as well in many cases but always
thought it was some sort of fluke
2015-01-05 03:01:20 -08:00
jp9000 c1289b893e win-capture: Log more hooking errors
Adds a few previously-missing log messages that specify the actual
reason why there was an error acquiring the hook, rather than just
saying nothing.
2015-01-05 03:01:20 -08:00
jp9000 e7790ab52c win-capture: Wait before auto-fullscreen hooking
If using the auto-fullscreen feature to hook in to a fullscreen, I found
that if you don't wait a few seconds before initializing the hook that
you can catch the process when it's just starting up and loading
important libraries (especially things such as steam/uplay/etc), which
can cause a little bit of interference with the process and on rare
occasions cause it to crash.

To help prevent the likelihood of that happening, this just makes it so
that the hook waits at least 3 seconds before even attempting to inject
the hook when using auto-fullscreen mode.  After some extensive testing
I haven't had any issues since.
2015-01-05 03:01:19 -08:00
jp9000 69223e3645 win-capture: Retry hooks on most failures
The design to not retry the hooks on most general error is just bad.
There are plenty of legitimate cases where it should retry the hook.

This changes it so that if a general failure occurs or if it isn't
capturing when the inject helper exits, it retries and increases the
length of time between retries.
2015-01-05 03:01:12 -08:00
jp9000 6a0677a407 win-capture: Rename variables for consistency
Variables that track time should not have the name 'interval', they
should have the name 'time' instead so it's crystal clear that the
variable is tracking time.
2015-01-05 02:53:29 -08:00
jp9000 edf9d9f41f win-capture: Add 'retry_interval' variable
Adds a variable 'retry_interval' to game capture that allows the
interval at which game capture checks to update to longer intervals if
the hook initialization has some sort of failure.

The reason why I want to do this is because I don't really like it when
the hook updates too often in failure, it just leads to log file spam
that I feel can be reduced, and it frequent updates feel a bit invasive.
I just generally feel more comfortable reducing the interval at which
the hook retries after failure.
2015-01-05 02:52:57 -08:00
jp9000 272f709d1d win-hook: Fix variable name typo
Was 'error_aqcuiring', now 'error_acquiring'
2015-01-05 02:45:42 -08:00
jp9000 12011d4380 win-capture: Increase game capture update interval
Instead of checking every 3 seconds whether to hook, check every 2
seconds.  3 seconds felt a bit long to me.
2015-01-05 02:45:37 -08:00
jp9000 e6752f6b41 win-capture: Fix potentially overwritten values
The code neglected to take in to account that start_capture can also be
called when the texture updates its size/format in the hook and 'ready'
is signaled again, so it's possible that existing variables in the game
capture structure could be overwritten with new ones unintentionally.
2015-01-05 02:45:37 -08:00
jp9000 6a85407270 win-capture: Change 'Activate' text if active
The game capture 'Activate' button is likely to fool users in to
thinking it's not actually active if the game capture displays black, so
if it's active, rename the button to 'Reactivate' in order to sort of
hint at the user that it's actually active.
2015-01-05 02:42:18 -08:00
jp9000 d3abdf39a2 win-capture: Don't draw cursor if outside area 2015-01-03 02:37:18 -08:00
jp9000 56899df08f win-capture: Add game capture
This adds the windows version of game capture.

New features:

- An option to hook any fullscreen application automatically (that
  doesn't have borders) so that no specific window configuration is
  required.  Definitely a sorely needed feature

- An option to force memory capture for the sake of compatibility with
  things such as SLI, multi-adapter setups (usually laptops), as well as
  the ability to be used with the OpenGL renderer

- An optimization option to force scaling on the GPU before texture
  transfer, reducing the transfer bandwidth (which is especially
  important for compatibility capture)

- An optimization option to limit framerate to the current OBS framerate
  to improve capture performance (mostly useful for compatibility
  capture)

- An option to capture third-party overlays (such as steam)

- Logging improvements, game capture log will now be sent via pipe
  instead of written to a separate file, making diagnosing problems a
  little bit easier
2014-12-09 15:25:59 -08:00