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
114495e59fa3e7958f16Fixes#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.
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.
Fixesmumble-voip/mumble#1123
Effects11 is quite heavy, in that it pulls D3DCompiler_43.dll (x86)
and D3DCompiler_47.dll (x64) into our Mumble installations on Windows.
Together, these two DLLs are ~6MB in size.
Also, the removal of the Effects11 library itself cuts the sizes of
the overlay DLLs by more than half:
mumble_ol.dll with Effects11: 407 KB
mumble_ol.dll without Effects11: 162 KB
mumble_ol_x64.dll with Effects11: 497 KB
mumble_ol_x64.dll without Effects11: 211 KB
Directly using the split shaders is just as easy, and uses less code than
using the Effects11 library. At least for our simple shaders.
And we gain a lot from it.
Done.
* For D3D10 and D3D11 the underlying DXGI provides the present and reset
functions. Hence, those hooks are in dxgi.cpp rather than the respective
d3d files.
** Remove unused hook variables