D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
- struct d3dadapter9_context *pCTX )
+ struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode )
{
unsigned i;
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
This->caps = *pCaps;
This->d3d9 = pD3D9;
This->params = *pCreationParameters;
+ This->ex = ex;
This->present = pPresentationGroup;
IDirect3D9_AddRef(This->d3d9);
ID3DPresentGroup_AddRef(This->present);
if (FAILED(hr))
return hr;
- if (This->ex) {
+ if (ex) {
D3DDISPLAYMODEEX *mode = NULL;
struct NineSwapChain9Ex **ret =
(struct NineSwapChain9Ex **)&This->swapchains[i];
- if (This->pFullscreenDisplayMode) mode = &(This->pFullscreenDisplayMode[i]);
+ if (pFullscreenDisplayMode) mode = &(pFullscreenDisplayMode[i]);
/* when this is a Device9Ex, it should create SwapChain9Exs */
hr = NineSwapChain9Ex_new(This, TRUE, present,
&pPresentationParameters[i], pCTX,
This->update = &This->state;
nine_update_state(This, ~0);
- /* Is just used to pass the parameter from NineDevice9Ex_ctor */
- This->pFullscreenDisplayMode = NULL;
-
ID3DPresentGroup_Release(This->present);
return D3D_OK;
} else {
resource = NULL;
}
- hr = NineSurface9_new(This, NULL, resource, 0, 0, 0, &desc, &surface);
+ hr = NineSurface9_new(This, NULL, resource, NULL, 0, 0, 0, &desc, &surface);
pipe_resource_reference(&resource, NULL);
if (SUCCEEDED(hr))
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode,
struct NineDevice9 **ppOut )
{
BOOL lock;
NINE_NEW(Device9, ppOut, lock, /* args */
pScreen, pCreationParameters, pCaps,
- pPresentationParameters, pD3D9, pPresentationGroup, pCTX);
+ pPresentationParameters, pD3D9, pPresentationGroup, pCTX,
+ ex, pFullscreenDisplayMode);
}
{
struct NineUnknown base;
boolean ex;
- D3DDISPLAYMODEEX *pFullscreenDisplayMode;
/* G3D context */
struct pipe_screen *screen;
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode,
struct NineDevice9 **ppOut );
HRESULT
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3D9 *pD3D9,
ID3DPresentGroup *pPresentationGroup,
- struct d3dadapter9_context *pCTX );
+ struct d3dadapter9_context *pCTX,
+ boolean ex,
+ D3DDISPLAYMODEEX *pFullscreenDisplayMode );
void
NineDevice9_dtor( struct NineDevice9 *This );
ID3DPresentGroup *pPresentationGroup,
struct d3dadapter9_context *pCTX )
{
- This->base.ex = TRUE;
- This->base.pFullscreenDisplayMode = pFullscreenDisplayMode;
-
return NineDevice9_ctor(&This->base, pParams,
pScreen, pCreationParameters, pCaps,
pPresentationParameters,
- (IDirect3D9 *)pD3D9Ex, pPresentationGroup, pCTX);
+ (IDirect3D9 *)pD3D9Ex, pPresentationGroup, pCTX,
+ TRUE, pFullscreenDisplayMode);
}
static void