Fix renderer detection under Wine.

Use new timing checks to detect D3D being dependant on other APIs.
(Should work now regardless of platform, but GPU hardware detection may still be
needed...)
This commit is contained in:
redpolline 2024-12-31 09:09:59 -05:00
parent 32689355d0
commit 38cbfb3be9
3 changed files with 542 additions and 35 deletions

View file

@ -27,6 +27,21 @@
#include "Renderer_Hook.h"
/* Timeout is in seconds.
Used for determining which rendering API is the real one used by
the app when multiple APIs are used. (NVIDIA, Wine, etc.)
This is an internally used value, separate from the timeout given
to DetectRenderer().
If you define it below the minimal level (one second), the minimal level
will be used.
Any timeout given to DetectRenderer() less than this value will be upgraded
to it.
*/
#define MAX_RENDERER_API_DETECT_TIMEOUT 1
namespace ingame_overlay {
std::future<Renderer_Hook*> DetectRenderer(std::chrono::milliseconds timeout = std::chrono::milliseconds{ -1 });