Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
Stefan Hacker
3bcc83eb57 More comments for HardHook code 2012-07-06 21:14:20 +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
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
Stefan Hacker
b986e84b6c Fix possible access violation in Overlay
cloneCode function followed pointer chains without making sure to get read privileges to the corresponding areas. This patch fixes that and makes sure setup and cloneCode function do not rely on each other for getting read privileges .
2011-03-04 01:17:52 +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
Thorvald Natvig
d44c84cb1a This is not the window you are looking for 2010-02-28 18:16:27 +01:00