Re: [PATCH 3/7] d3dx9_36: Beginning of constants parsing + tests (based on work from Luis Busquets)
On 5 April 2010 10:30, Christian Costa <titan.costa(a)wanadoo.fr> wrote:
+inline ctab_constant* get_constant(D3DXHANDLE ptr) +{ + if (!ptr) return NULL; + return (ctab_constant*)~(DWORD)ptr; +} + +inline D3DXHANDLE get_handle(ctab_constant* ptr) +{ + return (D3DXHANDLE)~((DWORD)ptr); +} These look like they would be problematic on 64-bit, does it really work like that?
Henri Verbeet a écrit :
On 5 April 2010 10:30, Christian Costa <titan.costa(a)wanadoo.fr> wrote:
+inline ctab_constant* get_constant(D3DXHANDLE ptr) +{ + if (!ptr) return NULL; + return (ctab_constant*)~(DWORD)ptr; +} + +inline D3DXHANDLE get_handle(ctab_constant* ptr) +{ + return (D3DXHANDLE)~((DWORD)ptr); +}
These look like they would be problematic on 64-bit, does it really work like that?
In 32 bit, handles use this scheme (or something similar). I guess the same is used for 64-bit. I will update the patch to work on both platforms.
participants (2)
-
Christian Costa -
Henri Verbeet