Commit Graph

38 Commits

Author SHA1 Message Date
Kissaki
834365e228 Cleanup: Remove unused Hooks
* For D3D10 and D3D11 the underlying DXGI provides the present and reset
functions. Hence, those hooks are in dxgi.cpp rather than the respective
d3d files.
** Remove unused hook variables
2015-05-16 15:38:41 +02:00
Kissaki
9544bec1f9 Overlay: Add Direct3D 11 support
* Based on an initial patch by Benjamin Jemlich
* Effects11 code based on changes by nyet
2014-01-10 22:51:11 +01:00
Kissaki
67914c3c79 Logtextfix. Logically format code.
* Fix log message text
* Format injection code logically, consistent to overlay injection code.
2013-12-06 18:27:20 +01:00
Stefan Hacker
fb56112d18 Fix crash of target application due to failures in D10State::init.
Function didn't handle errors at all and did only very limited logging.
This patch changes the function return type from void to bool and aborts
in case of failure. Also logging was added for all such failures. To handle
partially initialized object state the destructor was changed to NULL check
pointers before dereferencing them. If a failure occurs the state block
isn't used but destructed right away.
2013-12-05 22:09:39 +01:00
Kissaki
cd4e8350a5 Overlay: Changes as per PR-comments
* Use sizeof() rather then size constant where possible
2013-11-24 23:18:29 +01:00
Kissaki
dfbc1b9279 Overlay: Changes as per PR-comments
* Make cpp-local functions static so they are local file/translation unit
scope.
* Remove unused variables uiAudioCount and bVideoHooked
* Comment extern declarations, where there definitions are located.
* Improve constant naming JUMPOP_OFFSET => JMP_OP_SIZE.
* Remove extern declaration from method definitions.
* Adjust type declaration formatting to typical formatting.
* Use voidFunc typedef to pass around function address pointers.
** C++-style casts instead of C-style raw casts.
* Other minor formatting (/whitespace) adjustments
* Fix log text.
* Improve log text.
* Consistent, improved varnaming in d3d9.cpp on address calculation;
naming fn and base.
2013-11-24 19:20:24 +01:00
Kissaki
250835e83b Overlay: Rework Code.
* Separate DXGI logic from D3D10 into a separate file dxgi.cpp
* Structure code and logic, introduce additional functions
* Introduce constants
* Code commenting
* d3d9.cpp:
** Access devMap via std::find rather than operator[]
** Introduce class Stash to temporarily set variable value and revert on
destruction
** Move logic to function findOriginalDevice
** Use widestring for modulename (consistency)
** Implement Hook for Direct3DCreate9Ex
** Move function IsFnInModule to common lib.cpp/.h
* opengl.cpp:
** Add whitespace to format code
** Fix logging scope prefix
** Remove static global variable
2013-11-22 19:27:52 +01:00
Kissaki
1919b2cd71 Overlay: Less obtrusive logging.
* Present, AddRef and Release calls are not useful most of the time.
They were only logged in DEBUG builds, but as these methods are called very often heavily degrades performance.
Add define-guards so when one actually wants to debug and see them he can enable them.
Now, (normal) debug builds will not have the heavy performance loss any more.
2013-06-23 02:11:32 +02:00
Kissaki
f8f4b0fdec refacs: more elaborative Varnaming; codeformatting 2013-06-11 23:03:30 +02:00
Kissaki
cab4a3d852 Extend Windows Overlay code and clean it up.
Extend to handle library freeing.
Codeformatting and -cleanup, robustness, and make debugoutput more consistent.

* Indroduce hook for freeing loaded DLLs.
This separates logic between loading and freeing, leading to adjustments to
the recently introduced checks for freed DLLs.
* In HardHook::reset() do a clean and complete reset rather than minimal.
* Memvarinitialisation in HardHook
* Remove logically unused variable bPresenting in d3d9.cpp (always false)
* In d3d10.cpp prefix debugoutput with D3D10 consistently; no more DXGI
which is ambiguous with a d3d11 file that also uses DXGI.
* Consistently use ods instead of fods in the overlay files.
Not in HardHook yet, as that class is used in the Mumble client as well atm
* Fix forwarded return value types (LONG to ULONG)
* TODOs for hook-call-logic in multiple places
* Commenting, formatting and scope / order adjustments
* Introduce variables with constant values (replacing magic/undescriptive constants/numbers)
2013-06-11 23:02:14 +02:00
Kissaki
f4c54b24e3 Explicitly mark childmethods as virtual
* Mark the childmethods overwriting the virtual Pipe methods as virtual explicitly
(effectively already were)
2013-06-04 22:38:00 +02:00
Kissaki
bb47083b9f Reduce varscopes and improve debugtext. 2013-06-04 22:37:39 +02:00
Kissaki
9bd10b0001 refacs; initialization, var-scope reduction, replace c-style casts, rm unused
* DBus.h, AudioOutputSpeech.cpp: initialize uninitialized members,
* d3d10.cpp: actually use assigned results for a dbg output
* lib.cpp, link.cpp: c-style to c++-style casts
* SpeexMark.cpp, ResampMark.cpp: rm unused var
* AGC.cpp, ResampMark.cpp:
rm unused var (ineffective return statement after prior return;
thus removing unused code - but someone check if sth. was missed there)
2012-10-24 19:24:33 +02:00
Kissaki
e5101f2251 Fix debug output for overlay chain notice
The debug outputs were placed after the return statements, rendering them useless.
Place them in front, so they are executed.
2012-09-23 14:08:37 +02:00
Benjamin Jemlich
b87ee95f4d Fix use after delete in DX10 overlay code 2011-05-14 10:53:07 +02:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Stefan Hacker
05096f71cc Add some comments to hooking code 2011-03-04 00:48:23 +01:00
Benjamin Jemlich
bee5338dda Readd overlay hook on DLL_THREAD_ATTACH 2010-11-02 17:14:38 +01:00
Benjamin Jemlich
2997897f24 Fix some gcc and cppcheck warnings 2010-07-20 17:31:01 +02:00
Stefan Hacker
6380a88687 Transmit fps more often and represent them as float 2010-04-29 15:53:43 +02:00
Stefan Hacker
d8f1ac1115 Add an optional FPS counter to the overlay 2010-04-28 20:22:28 +02:00
Thorvald Natvig
9fa00c3c1c Use premultiplied alpha textures 2010-03-01 03:14:31 +01:00
Thorvald Natvig
07f7ef3c13 Indent, changelog, submodule and language update 2010-02-02 17:31:27 +01:00
Thorvald Natvig
c372eb458b Windows XP doesn't have DXGI or D3D10 2010-02-02 17:24:49 +01:00
Thorvald Natvig
c16b9b8e8f Indent, changelog, submodule and language update 2010-01-26 15:54:13 +01:00
Thorvald Natvig
036c6c3310 Remove dependence on sm.sm from Win32 overlay 2010-01-24 22:19:11 +01:00
Thorvald Natvig
0baf7589ad D3D9, D3D10 and OpenGL/Win32 pipe-based overlay 2010-01-24 17:17:35 +01:00
Thorvald Natvig
16339bfc91 Update license to 2010 2010-01-05 08:49:22 +01:00
Thorvald Natvig
f9bb90180b Indent, changelog and submodule update 2009-10-12 22:59:16 +02:00
Thorvald Natvig
6a3025549d Inproc draw for d3d10 2009-10-12 14:42:06 +02:00
Thorvald Natvig
d97d12bede Indent, changelog and submodule update 2009-09-21 17:06:54 +02:00
Thorvald Natvig
511773dfd4 DX10 fullscreen texture test 2009-09-21 16:37:52 +02:00
Thorvald Natvig
b5872663c7 Indent, changelog and submodule update 2009-09-02 17:41:45 +02:00
Thorvald Natvig
c663db3e4f Remove ods() for addref/release, impossible to run real apps with it on 2009-08-25 19:52:11 +02:00
Thorvald Natvig
8e0cbc8c78 Release heuristic 2009-08-25 19:44:17 +02:00
Thorvald Natvig
cafb24c1f3 Include fxo binary in overlay 2009-08-25 18:28:10 +02:00
Thorvald Natvig
93b6c57f4b Proof-of-concept DX10 overlay 2009-08-25 18:12:05 +02:00
Thorvald Natvig
d2a64ee619 Start of DXGI Hook 2009-08-24 17:16:30 +02:00