- if function.name == 'CreateSwapChain' and arg.name == 'pDesc':
- print r' DXGI_SWAP_CHAIN_DESC *_pDesc = NULL;'
- print r' DXGI_SWAP_CHAIN_DESC _Desc;'
- print r' if (pDesc) {'
- print r' _Desc = *pDesc;'
- if not self.interface.name.endswith('DWM'):
+ if function.name == 'CreateSwapChain' and arg.name == 'pDesc' \
+ or arg.name == 'pSwapChainDesc':
+ print r' DXGI_SWAP_CHAIN_DESC *_pSwapChainDesc = NULL;'
+ print r' DXGI_SWAP_CHAIN_DESC _SwapChainDesc;'
+ print r' if (%s) {' % arg.name
+ print r' _SwapChainDesc = *%s;' % arg.name
+ if function.name != 'CreateSwapChain' or not self.interface.name.endswith('DWM'):