Commit Graph

163 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
3c787be130 Overlay: Move logic into function ..IsBlacklisted 2013-06-17 00:14:44 +02:00
Kissaki
0e7d86094c Overlay: Move DllMain logic into functions 2013-06-17 00:14:37 +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
f09e943b6c * Commenting, varnaming, fix indent
* commenting and adjusting debug output
* more descriptive varnaming
2013-06-11 23:03:31 +02:00
Kissaki
f8f4b0fdec refacs: more elaborative Varnaming; codeformatting 2013-06-11 23:03:30 +02:00
Kissaki
11d5305f69 Code refacs; fix typo and adjust texts
* fix typo
* debug text adjustments
2013-06-11 23:03:23 +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
Mikkel Krautz
8632246f98 Bump version to 1.2.5 2013-06-08 23:41:51 +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
85fa2ce57a Code formatting, smaller refacs, robustness.
* Performance: Prefix increment in loops.
* Check VirtualAlloc return
* Check for successful memory allocation in cloneCode
* Swap assignment of pCode and uiCode
(if alloc were to fail and not assign, uiCode shouldn't be nulled either)
* declare statics before non-static members
* Introduce variables replacing magic constants
* Reduce varscopes
2013-06-04 22:37:38 +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
Kissaki
1e4bb6dbd0 Prepend Projectname to header guard defines
* some few (4?) files actually already had it
2013-06-04 21:59:52 +02:00
Kissaki
7642e722ff Adjust header guard defines for uniformity
* Append underline to header guard defines to match the others (except ui_)
* Add guard to header files GlobalShortcut
* Adjust mklic.pl script to add guard to licenses.h,
and add updated licenses.h.
2013-06-04 21:59:51 +02:00
Kissaki
40ca9b4507 Rename header guard defines to not use c++-reserved names
* as pointed out in issue #842
adjust names to match other header files
2013-06-04 21:59:50 +02:00
Stefan Hacker
f4cc3f041e Fix mumble_ol.dll not being versioned under windows.
* Low impact fix for RC. Directly set VERSION in overlay.pro
* Currently the version is set multiple times
  in different .pro/pri files. This should be refactored to come from
  a single .pri file (similar to /macx/common.pri) used in all locations.
* Should probably use an RC file to be able to set more information
2013-01-20 19:22:05 +01:00
Mikkel Krautz
1eca95274d Add Windows Phone IP over USB Service to the overlay blacklist. 2012-12-15 13:09:23 +01:00
Kissaki
6ad5ea49a0 add RzSynapse.exe to overlay blacklist to prevent invisible hooking 2012-12-15 12:17:32 +01:00
Kissaki
2a469e8100 remove duplicate overlay blacklist entry for chrome.exe 2012-12-04 19:31:49 +01:00
Kissaki
4ec62f12aa add Steam and chrome to (default) overlay blacklist
Otherwise, Steam as well as chrome (with flash?) get hooked. This will result
in the need to restart them on Mumble updating for example, which is
confusing to users because there is no visible overlay in those applications
anyway.
2012-12-02 17:54:37 +01:00
Stefan Hacker
07a0e51c40 Add Adobe Acrobat to overlay blacklist 2012-11-27 20:27:32 +01: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
Mikkel Krautz
071be0f906 HardHook: add additional opcodes. 2012-11-11 13:35:32 +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
Stefan Hacker
3bcc83eb57 More comments for HardHook code 2012-07-06 21:14:20 +02:00
Benjamin Jemlich
491cd1eb44 Misc fixes 2012-02-26 08:36:19 +01:00
Stefan Hacker
3eb844d271 Merge pull request #56 from Kissaki/blacklist
add lollauncher.exe to overlay blacklist
2011-11-06 14:43:52 -08:00
Kissaki
19aeaedf42 add lollauncher.exe to overlay blacklist 2011-11-04 21:05:21 +01: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
Jamie Fraser
41100fd069 Add 'Crimecraft: Bleedout' to default blacklist. 2011-09-05 18:52:54 -04:00
Kissaki
69baac1b37 add thunderbird and instantbird to overlay blacklist (new hw-accelerated versions) 2011-06-30 18:34:27 +02:00
Benjamin Jemlich
6a52586995 Move overlay blacklist to its own file 2011-05-16 19:51:21 +02:00
Stefan Hacker
a24e50ed4a Fix Windows build.
Reverted move of overlay blacklist as it is needed in both the overlay itself and the client (broken by 2dad2795bd)
Fixed error introduced in VersionCheck::fetched (broken by f57f81248f)
Readded missing Server.h header in Tray.h (broken by 7529297760)
Fixed broken build files (broken by f7cc6e7ade)
2011-05-16 11:08:46 +02:00
Thorvald Natvig
2dad2795bd Move overlayBlacklist and care about error on ftruncate 2011-05-15 16:09:38 -07: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
Thorvald Natvig
84834d4d54 Indent, changelog, submodule and language update 2011-03-13 04:22:40 +01:00
Stefan Hacker
8c952c3bd2 Remove duplicate overlay debug output code.
Factor fods and its base function out to ods.h/cpp and use it in HardHook as well as lib functionality. This also fixes previous divergence between the two ods functions.
2011-03-06 20:39:35 +01:00