Commit Graph

12 Commits

Author SHA1 Message Date
Davide Beatrici
6fb885c451 mumble_plugin_linux.h: detect process architecture by reading the process' memory instead of its binary
Aside from being faster, it also requires less code.

This commit also changes the way architecture is detected for Win32 processes.
Previously, we relied on the Wine's preloader binary's architecture because we read its ELF header; now we read the NT header(s) by calling isWin32Process64Bit() (implemented in 86154c8234).
2019-08-17 00:31:18 +02:00
Davide Beatrici
9875c59b7a plugins: use new header 2019-08-08 23:51:13 +02:00
Davide Beatrici
e8afc3872a plugins: move common functions and variables from OS-specific headers to mumble_plugin_main.h
This is in preparation for the new Source Engine plugin which will add a few common functions.

This commit also improves the functions arguments so that they are passed by reference and marked as const (when possible).

A new data type called procid_t is created, intended to be a replacement for pid_t (Linux) and DWORD (Windows).
2019-08-08 23:51:13 +02:00
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
davidebeatrici
7286fb0f68 Determine correct pointer size automatically, without the need of specific headers and variables
This commit removes the architecture-specific headers, by keeping only the OS-specific ones.
The different headers were needed to keep the legacy Windows header, after we created the "procptr32_t" (4 bytes) and "procptr64_t" (8 bytes) variables.
We created these variables because the "peekProc" functions read as many bytes as the variable can hold. A pointer is 4 bytes on 32 bit platforms and 8 bytes on 64 bit ones.

Now there's a new variable, called "procptr_t" and with a size of 8 bytes (unsigned long long).
We had a "peekProc" template function which returned the value stored at the specified memory address, but it has been used only to read pointers so far.
Since we needed a new function that checks the process architecture and sets the correct size of the memory to read, I decided to "recycle" it.
2017-11-19 21:48:49 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Davide Beatrici
685b5d6c17 plugins: fix compile error on Linux
This fixes #2615, introduced by #2611.
2016-11-03 16:25:57 +01:00
Mikkel Krautz
2a049e6cd9 mumble_plugin_linux.h: align API of the Windows and Linux plugin headers. 2016-08-13 10:04:12 +00:00
Mikkel Krautz
5b5167646d pugins/mumble_plugin_linux.h: convert C-style casts to C++-style casts. 2016-08-12 20:37:31 +00:00
Mikkel Krautz
ee0c6a2739 plugins/mumble_plugin_linux.h: use non-C++11 std::ifstream::open().
Fixes the C++03 build.
2016-08-12 20:36:20 +00:00
davidebeatrici
2da60f96e0 Linux support for positional audio plugins 2016-08-11 20:53:10 +02:00