protonscr

[build] Clean and clarify #ifdef _WIN32

dxvkclosed
doitsujin/dxvk#2862 · opened 2022-08-22 by pchome · updated 2022-09-16 · 3 comments · github
Ppchome 2022-08-22 github

#ifdef _WIN32 in source code used in many different meanings, so I tried to clarify this a bit.
This may help not default platforms and/or combinations like winelib.

DXVK_WIN32_API - use native windows API
DXVK_WIN32_BUILD - native or cross windows build
DXVK_PLATFORM_API - use platform API
DXVK_USE_VR - in case of default dxvk build it can be set unconditionally or used for optionally disable VR support

In addition default dxvk build should set DXVK_WIN32_API and DXVK_WIN32_BUILD and optionally DXVK_USE_VR, native build should set only DXVK_PLATFORM_API and "mix" could use only DXVK_WIN32_API.

If this acceptable I can do Draft or PR for further discussion, or feel free to use/modify attached example
dxvk-2.0-win32-def.patch.txt

KK0bin maintainer 2022-09-16 github

The best way to actually get feedback for this is to just open a PR. If you're still interested in the the change, please just do that. Worst case scenario is that we close it.

Ppchome 2022-09-16 github

Worst case scenario is that we close it.

You maybe missed that part where other peoples time still mean something. Keeping PR up-to-date with constantly changing code, you know ...
In this case I didn't know is there any pending code which will address or rewrite parts of this patch, so before doing something I decided to ask if it worth it. Given that it is not critical but "nice to have" (maybe) code changes.

So, yes, this is your "Worst case scenario" -- I already forgot about it and you closed it.

Mmisyltoad 2022-09-16 github

If I am honest, I think what we have works fine for now.

I tried this with old dxvk native and it was... hard to make distinctions sometimes.

Launch options