Also: Implement d3d9 screenshots without d3dx9
This only implements the two most likely surface formats. Does anybody
actually use 16-bit rendering anymore? (If yes, I'll do the slower path
through StretchRect to convert)
(backport from master, where it was two commits)
* Another thing lost was DXGetErrorString. Re-implement it.
* Include a partial list of errors.
(backported from master, where it was two commits)
Note: If we ever drop support for windows older than win8, we can
remove this and just call FormatMessage.
RageDisplay_D3D::CreateScreenshot will be returning nullptr until I get
around to re-implementing it without using d3dx, which is another thing that
did not make the move into the Windows SDK.
(backport from master)
From MSDN:
Security Remarks
If this function is called without FORMAT_MESSAGE_IGNORE_INSERTS, the
Arguments parameter must contain enough parameters to satisfy all insertion
sequences in the message string, and they must be of the correct type.
Therefore, do not use untrusted or unknown message strings with inserts
enabled because they can contain more insertion sequences than Arguments
provides, or those that may be of the wrong type. In particular, it is
unsafe to take an arbitrary system error code returned from an API and use
FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS.
(backport from master)
One thing that did not make it into the move to the Windows SDK is the
dxguid.lib library, which defined the IIDs for all of the DirectX interfaces.
This replaces that, defining the ones we use. Currently, we only need to
define the DirectInput IIDs, so that is all that is here.
(backport from master)
* Have clang and libc++ working.
If any clang users run into problems, remember to have libc++ and libc++abi set up.
Fixes
stepmania/src/arch/ArchHooks/ArchHooks.h:37:27: error:
variable has incomplete type 'tm'
virtual void SetTime( tm ) { }
^
/usr/include/wchar.h:83:8: note: forward declaration of 'tm'
struct tm;
^
* Add noexcept to swap.
See https://github.com/stepmania/stepmania/commit/e860773799f01d02f281c8c39421e7e34658788d#commitcomment-32674320
* Use standard c++11 for handling unexpected exceptions
The cxxabi.h header can make linking difficult.
HAS_XX is used elsewhere in the project to select optional sources,
will only be true if the lib is available on the system, and the
user asked to use it.