Commit Graph

54 Commits

Author SHA1 Message Date
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
9d0de38af1 Overlay: Pass on procname buffer 2013-06-17 00:14:45 +02:00
Kissaki
e64fa103fb Overlay: Use string var instead of hardcoded strings 2013-06-17 00:03:49 +02:00
Kissaki
b07053241a Overlay: Fix address offset 2013-06-17 00:03:20 +02:00
Kissaki
1182fc26cb Overlay: Introduce hook for ResetEx. Hook PresentEx.
* For D3D9Ex
** Hook PresentEx
** Hook ResetEx
2013-06-17 00:02:39 +02:00
Kissaki
123486b429 Overlay: Move logic to function, Varnaming, msgfix
- Move logic to new function IsFnInModule.
2013-06-17 00:02:11 +02:00
Kissaki
dfc863841d Overlay: Add myPresentEx function 2013-06-16 23:57:03 +02:00
Kissaki
3865e8cab0 Overlay: Code comments 2013-06-16 23:56:45 +02:00
Kissaki
04b344dc42 Overlay: Var init, comment, error loggin. 2013-06-16 14:34:44 +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
46fc3ccfc1 Commenting, formatting. Remove obsolete/wrong comment. 2013-06-04 22:37:40 +02:00
Kissaki
bb47083b9f Reduce varscopes and improve debugtext. 2013-06-04 22:37:39 +02:00
Kissaki
33069f82de comments. more elaborative debugoutput, consistent prefixing. 2013-06-04 22:37:37 +02:00
Wesley W. Terpstra
10b2d00043 Prevent overlay from disappearing on D3D DLL reloading.
This is confirmed to fix the missing overlay in Guild Wars 2.

When D3D was used by a process thus loading the DLL, but then unloaded we did not inject on subsequent loading of the D3D DLL (in the same exe). Guild Wars 2 did un- and reload the DLL when switching from their launcher to the game.
This commit introduces HardHook::reset() and checks for inactive hardhooks for a newly loaded DLL.

The changes were submitted on sourceforge
https://sourceforge.net/p/mumble/bugs/909/#bf9e
2013-06-04 22:37:36 +02:00
Mikkel Krautz
46d659d415 overlay/d3d9: pass through IDirect3DDevice9 AddRef/Release methods to originals on Windows 8.
We were getting unbalanced AddRef/Releases on Direct3D9 apps running on Windows 8 that ran
fine on Windows 7.  Windows 8 seems to be doing somthing funky with the internal ref count
of IDirect3DDevice9.

For now, piggyback on the orignal ref count methods to be able to determine when to release
ourselves. And cross our fingers that we won't be getting useless ref counts from some other
overlay.

This is a band-aid solution until we find something better.
2012-11-16 01:05:50 +01: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
Kissaki
ea29bd2415 initialize member variable DevState::initRefCount in constructor 2012-09-23 14:08:06 +02:00
Kissaki
5fe6801b1b handle some cppcheck-found issues:
* uninitialized membervars,
* AudioOutput.cpp: fix delete on array to delete[]
* OSS.cpp: close file descriptor in false data case
* OverlayEditorScene.cpp: rm duplicate logic
* fix ifndef to match usage of declared variable
* member var initializations
* check for null (ds in d3d9 as some lines above),
* lower scope of var decl.,
* swap bufsize check and array dereference so check is before! deref,
* initialize member vars in constr.
2011-10-09 14:01:58 +02:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Thorvald Natvig
e1b24d25f0 Clean up a few compiler warnings. 2011-01-20 18:25:15 -08:00
Benjamin Jemlich
c644952f4e Fix a crash in the overlay if a_ucTexture is NULL 2010-11-17 18:28:11 +01: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
2b6bad6a23 Flash in browser workaround 2010-03-10 18:03:04 +01:00
Thorvald Natvig
9fa00c3c1c Use premultiplied alpha textures 2010-03-01 03:14:31 +01:00
Thorvald Natvig
9bd867fb04 Fix overlay crash in Killing Floor when IDirect3DDevice9::Reset() fails 2010-02-05 19:11:23 +01:00
Thorvald Natvig
debc396d5b Indent, changelog, submodule and language update 2010-02-01 11:48:13 +01:00
Thorvald Natvig
28641d2100 Fix texture in D3D9 after reset 2010-01-30 21:25:21 +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
ad845f599e Fix typo in debug mode for d3d9ex 2009-08-24 17:20:05 +02:00
Thorvald Natvig
d2a64ee619 Start of DXGI Hook 2009-08-24 17:16:30 +02:00
Thorvald Natvig
865cdabaed Precache support for d3d9ex 2009-08-22 19:03:12 +02:00
Thorvald Natvig
ac0b3cf4d4 Indenting 2009-03-04 16:32:43 +01:00
Thorvald Natvig
e3f271b553 Indenting update
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1458 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-19 23:09:19 +00:00
Thorvald Natvig
1faac996b2 Support simultaneous overlay in multiple applications.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1443 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-17 02:55:59 +00:00
Thorvald Natvig
e90dd48ea8 Prefetch offset for createdevice.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1442 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-17 02:46:38 +00:00
Thorvald Natvig
061aa70e22 Trampoline-based, chaining, push/ret calling overlay.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1440 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-17 00:22:05 +00:00
Thorvald Natvig
852f60d918 Thread-safe AddRef/Release for overlay.
Delayed-insertion D3D9 hook, work around bug in SupCom.


git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1431 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-15 16:17:05 +00:00
Thorvald Natvig
97abe97c73 Fix exit crash of overlay.
Also include interface replacement code. Not used yet though, it would fail if the game did device->GetSwapChain->GetDevice, unless we patch all of those as well.

git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1426 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-13 02:24:17 +00:00
Thorvald Natvig
ad2b8e2149 Update copyright for 2009
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1380 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-05 15:12:48 +00:00
Thorvald Natvig
974ced33ed Update Win32 Overlay to inject LoadLibraryA. With the CBT hook, this should hopefully be enough.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1369 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-01 18:55:19 +00:00
Thorvald Natvig
e93c194397 Indenting run
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1019 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-03-20 14:26:20 +00:00
Thorvald Natvig
1f89fdd23e Move compiler settings to compiler.pri
Fix a lot of warnings with msvc

git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1006 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-03-18 16:26:24 +00:00
Thorvald Natvig
d6ef7b8c51 Compile Win32 with Visual Studio + Intel C Compiler
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@958 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-03-01 16:57:14 +00:00