Commit Graph

13 Commits

Author SHA1 Message Date
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Jan Klass
36fc0f1b67 overlay: Use size_t as correct type for memory addresses
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
114495e59f
a3e7958f16

Fixes #1924
2017-07-13 13:18:09 +02:00
Jan Klass
7689647a50 Remove type variable prefix 2017-07-13 13:12:45 +02:00
Jan Klass
ce864c77d7 Cast to correct API types
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.
2017-07-11 00:42:08 +02:00
Jan Klass
830ea8aa54 Initialize pointers in constructor 2017-04-25 21:57:42 +02:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
72f038e8a1 overlay: remove use of d3dx9, d3dx10 and d3dx11. 2016-08-21 18:13:17 +02:00
Mikkel Krautz
8272e4872f overlay: optimize blit() to not perform a blit if the active item rect is empty.
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
2016-07-02 12:18:57 +02:00
Mikkel Krautz
049fcae125 overlay: update to use LICENSE.header. 2016-05-10 22:42:03 +02:00
Mikkel Krautz
3763d596c6 overlay: replace use of Effects11 with direct use of our split HLSL shaders.
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.
2015-11-28 10:05:07 +01:00
Kissaki
834365e228 Cleanup: Remove unused Hooks
* 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
2015-05-16 15:38:41 +02:00
Kissaki
9544bec1f9 Overlay: Add Direct3D 11 support
* Based on an initial patch by Benjamin Jemlich
* Effects11 code based on changes by nyet
2014-01-10 22:51:11 +01:00