Commit Graph

82 Commits

Author SHA1 Message Date
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
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
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
46fc3ccfc1 Commenting, formatting. Remove obsolete/wrong comment. 2013-06-04 22:37:40 +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
Benjamin Jemlich
491cd1eb44 Misc fixes 2012-02-26 08:36:19 +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
Benjamin Jemlich
6a52586995 Move overlay blacklist to its own file 2011-05-16 19:51:21 +02:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +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
Stefan Hacker
3db23e6b5f Make mumble overlay able to detect mumble independent of executable name 2011-02-27 02:54:17 +01:00
Thorvald Natvig
1161c9a1c4 Remove 1.1.x - no longer maintained 2011-02-20 04:21:34 +01:00
Thorvald Natvig
8a44cb950d Indent, changelog, submodule and language update 2011-01-21 03:47:51 +01:00
Thorvald Natvig
e1b24d25f0 Clean up a few compiler warnings. 2011-01-20 18:25:15 -08:00
Stefan Hacker
194ab5697f Fix overlay causing stack overflow when closing vs2010 solution
The amount of stack allocated for reading the black/whitelist values from the registry caused a stack overflow when closing solutions in vs2010. The fix is to switch to dynamic allocation on the heap for this variable. This fix also contains minor refactoring for better readability and adds a bit of additional debug output.
2011-01-09 15:42:42 +01:00
Stefan Hacker
ee8dcd8e55 Fix some problems with overlay backlisting not preventing dx hooking. Improve checking for WPF. 2010-12-23 19:53:07 +01:00
Stefan Hacker
0813b58cd5 Add 'M:' prefix to fods/ods overlay debugging function output 2010-12-23 19:36:01 +01:00
Benjamin Jemlich
34ff2e7aee More potential a_ucTexture == NULL crash fixes 2010-11-19 15:42:25 +01:00
Benjamin Jemlich
bee5338dda Readd overlay hook on DLL_THREAD_ATTACH 2010-11-02 17:14:38 +01:00
Benjamin Jemlich
ab2ed68d8e Blacklist WPF apps in the overlay 2010-09-27 18:44:21 +02:00
Benjamin Jemlich
385f25684a Fix overlay dll debug output 2010-07-26 13:36:09 +02:00
Benjamin Jemlich
8f0a2bdbb6 Revert "Overlay blacklist wmpnscfg.exe and fix the mumble_ol.dll's debug output" because it breaks the overlay
This reverts commit c24b79e5f0.
2010-07-26 08:26:54 +02:00
Stefan Hacker
c24b79e5f0 Overlay blacklist wmpnscfg.exe and fix the mumble_ol.dll's debug output 2010-07-24 15:58:55 +02:00
Stefan Hacker
ec31de1b25 Add black/whitelist icon loading for Windows. Make lists match on full path as well as executable names 2010-05-04 18:07:33 +02:00
Stefan Hacker
620f169d2f Make sure the overlay closes its registry handle 2010-03-16 20:25:30 +01:00
Thorvald Natvig
29088dcaba Indent, changelog, submodule and language update 2010-03-08 19:42:54 +01:00
Stefan Hacker
c2397ee352 Backend for user controlled overlay Black-/Whitelisting 2010-03-04 03:41:49 +01:00
Thorvald Natvig
d44c84cb1a This is not the window you are looking for 2010-02-28 18:16:27 +01:00
Thorvald Natvig
aa77c1e34b Indent, changelog, submodule and language update 2010-02-27 23:35:52 +01:00
Thorvald Natvig
0abb9e5469 Don't use widget functions on embedded widgets, they misbehave in release mode 2010-02-27 23:31:25 +01:00
Thorvald Natvig
1c79299230 Indent, changelog, submodule and language update 2010-02-23 16:16:44 +01:00
Thorvald Natvig
5a9b23dc4d WIP: Overlay 2010-02-18 15:23:57 +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
0a0c83fd0d Add overlay safety checks for 11x too 2009-11-09 23:52:55 +01:00
Thorvald Natvig
384c0df91e Blacklist explroer.exe from the overlay 2009-10-25 13:08:05 +01:00
Thorvald Natvig
f9bb90180b Indent, changelog and submodule update 2009-10-12 22:59:16 +02:00
Thorvald Natvig
e4bc4a2bac Don't initialize D3D etc if sharedmem fails 2009-10-12 16:02:32 +02:00
Thorvald Natvig
de5f7307b8 Indent, changelog and submodule update 2009-10-09 15:21:06 +02:00
Thorvald Natvig
1989a198cf Add overlay magic number and check memory size 2009-10-02 16:25:29 +02:00
Thorvald Natvig
b5872663c7 Indent, changelog and submodule update 2009-09-02 17:41:45 +02:00
Thorvald Natvig
8e0cbc8c78 Release heuristic 2009-08-25 19:44:17 +02:00