adapter: improve D3DCAPS9 generation