microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.44k stars 369 forks source link

Fixed missing __cdecl on ReportCustomMemoryAlloc static method #187

Closed walbourn closed 8 months ago

walbourn commented 8 months ago

This fixes a missed header function in GraphicsMemory for Xbox which needed __cdecl (see #180)

The library uses explicit __cdecl decoration in the header to ensure that on x86/x64, the calling convention is consistent with how the library is built (i.e. it uses /Gd for x64/x86) no matter which default calling-convention the client code is using.

In most cases you only need to decorate the header declaration of a function, but you also need to decorate the definition in a few specific cases: