Age | Commit message (Collapse) | Author |
|
|
|
Apparently the first commit (59ae429972c16c377135bcccfee646b7df446933)
did not include all files.
Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
|
|
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
|
|
|
|
This changes all occurances of NULL in the overlay source
dir to nullptr. Additionally explicit comparisons with NULL were
removed.
|
|
|
|
|
|
|
|
Use correct types for handling pointer size/memory addresses.
Make use of boost optional as GetFnOffsetInModules return type. The
unsigned return type does not allow for negative error values anymore,
which we did not make use of anyway, and optional is more explicit.
Replaces workaround/error detection from the commits
114495e59f002531ac9bb02070a1bcbd6652669e
a3e7958f1605339560679cbbd3a27de4fd12066c
Fixes #1924
|
|
|
|
It is better to be explicit and API correct, even if the resulting
types ended up to be the same through typedefs or the implementation
reinterpret-casting to a memory address pointer.
|
|
|
|
drawn via IDirect3DSwapChain9::present().
Fixes mumble-voip/mumble#1056
|
|
It seems that in EVE Online, if we update our overlay texture but do not
draw to the screen, the texture mapping is never freed, until we begin
drawing again.
I do not know enough D3D11 to know why.
Instead, this commit works around the issue by introducing a fully legal
optimization to the blit() method:
If the rect of active overlay elements is empty (that is, the screen is
empty), do not perform a blit at all.
The change also introduces an extra call to blit upon receiving
OVERLAY_MSG_ACTIVE. That message is the message that signals that
the rect of active elements has changed.
We need to blit here to ensure we redraw correctly once the rect
of active overlay elements changes.
Fixes mumble-voip/mumble#1123
|
|
|
|
See also mumble-voip/mumble#1924
|
|
* When unloading the overlay DLL freeD3D9Hook was called *after* unloading the DLL. This is incorrect.
** For applications that actually use D3D and we inject into, the DLL is
never unloaded because we hold a refernce to it ourselves. So in this case,
the problematic code is never executed.
** When not actually injecting, the DLL will be unloaded, and then the
function freeD3D9Hook is called which is from that DLL.
** As we’re executing code in undefined space which previously held the
function, this may or may not crash.
* Remove the freeD3D9Hook function
** The function freeD3D9Hook just resets some fields to NULL and a flag
to false. As the DLL is unloaded anyway, these are never used again.
Hence, we can just remove it altogether (rather than just calling it
before unloading).
|
|
* Introduce return code checking and logging on failure to D3D API calls.
This should make logging more elaborative and may point to issues when
debugging/looking for issues.
|
|
* Introduce commented constatns for vtable offsets of create methods.
* Fix variable naming
* Resolve TODO in HookCreateEx:
HardHook checks if it was already set up (baseaddr != NULL), and if it was
it ignores further setup calls. Hence, we can safely do a best-effort of
hooking create9 again.
We currently expect the IDirect3D9 and IDirect3D9Ex objects to be the
same object instance.
** If we wanted to support separate objects we would query both for
IUnknown to compare addresses, and potentially create yet another hook to
myCreateDevice for the create9 on d3d9ex.
|
|
* Use sizeof() rather then size constant where possible
|
|
* 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.
|
|
* 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
|
|
|
|
in myCreateDevice(/Ex)
Incorrect checking for element existence in the std::map using the operator[]
caused interfaces to be added to the device map that weren't actually injected
to yet.
To minimize code impact before DX11 branch merge replace correct existence
checks triggering the bug with checks on whether there's a valid handle
(!= NULL) present for that device in the map. This way the default constructed
(and hence NULL) elements caused by the use of the operator[] are harmless.
For the future we'll have to decide whether we accept additional elements for
"simpler" coding or use the "logically cleaner" style of using find and
iterators.
|
|
* 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.
|
|
|
|
|
|
|
|
* For D3D9Ex
** Hook PresentEx
** Hook ResetEx
|
|
- Move logic to new function IsFnInModule.
|
|
|
|
|
|
|
|
|
|
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)
|
|
* Mark the childmethods overwriting the virtual Pipe methods as virtual explicitly
(effectively already were)
|
|
|
|
|
|
|
|
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
|
|
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.
|
|
* 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)
|
|
The debug outputs were placed after the return statements, rendering them useless.
Place them in front, so they are executed.
|
|
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
|