Changeset 38982 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
- Timestamp:
- Oct 12, 2011 8:20:21 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9wddm.def
r38903 r38982 17 17 VBoxWineExD3DDev9Update 18 18 VBoxWineExD3DSwapchain9Present 19 VBoxWineExD3DRc9SetDontDeleteGl -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/device.c
r38363 r38982 506 506 IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; 507 507 IDirect3DSwapChain9Impl *newSwapchain; 508 HRESULT hr = IDirect3DDevice9Impl_DoCreateAdditionalSwapChain(iface, present_parameters, &newSwapchain);508 HRESULT hr = IDirect3DDevice9Impl_DoCreateAdditionalSwapChain(iface, present_parameters, (IDirect3DSwapChain9**)&newSwapchain); 509 509 if (FAILED(hr)) 510 510 { … … 520 520 { 521 521 ERR("Failed to add additional swapchain, hr %#x.\n", hr); 522 IUnknown_Release( newSwapchain);522 IUnknown_Release((IDirect3DSwapChain9*)newSwapchain); 523 523 return hr; 524 524 } … … 3152 3152 return D3D_OK; 3153 3153 } 3154 3155 #ifdef VBOX_WITH_WDDM 3156 VBOXWINEEX_DECL(HRESULT) VBoxWineExD3DRc9SetDontDeleteGl(IDirect3DResource9 *iface) 3157 { 3158 D3DRESOURCETYPE enmType = IDirect3DResource9_GetType(iface); 3159 HRESULT hr; 3160 switch (enmType) 3161 { 3162 case D3DRTYPE_SURFACE: 3163 { 3164 IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl*)iface ; 3165 wined3d_mutex_lock(); 3166 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DSurface); 3167 wined3d_mutex_unlock(); 3168 break; 3169 } 3170 case D3DRTYPE_VOLUME: 3171 { 3172 IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl*)iface ; 3173 wined3d_mutex_lock(); 3174 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DVolume); 3175 wined3d_mutex_unlock(); 3176 break; 3177 } 3178 case D3DRTYPE_TEXTURE: 3179 { 3180 IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl*)iface ; 3181 wined3d_mutex_lock(); 3182 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DTexture); 3183 wined3d_mutex_unlock(); 3184 break; 3185 } 3186 case D3DRTYPE_VOLUMETEXTURE: 3187 { 3188 IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl*)iface ; 3189 wined3d_mutex_lock(); 3190 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DVolumeTexture); 3191 wined3d_mutex_unlock(); 3192 break; 3193 } 3194 case D3DRTYPE_CUBETEXTURE: 3195 { 3196 IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl*)iface ; 3197 wined3d_mutex_lock(); 3198 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DCubeTexture); 3199 wined3d_mutex_unlock(); 3200 break; 3201 } 3202 case D3DRTYPE_VERTEXBUFFER: 3203 { 3204 IDirect3DVertexBuffer9Impl *This = (IDirect3DVertexBuffer9Impl*)iface ; 3205 wined3d_mutex_lock(); 3206 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DVertexBuffer); 3207 wined3d_mutex_unlock(); 3208 break; 3209 } 3210 case D3DRTYPE_INDEXBUFFER: 3211 { 3212 IDirect3DIndexBuffer9Impl *This = (IDirect3DIndexBuffer9Impl*)iface ; 3213 wined3d_mutex_lock(); 3214 hr = IWineD3DResource_SetDontDeleteGl((IWineD3DResource*)This->wineD3DIndexBuffer); 3215 wined3d_mutex_unlock(); 3216 break; 3217 } 3218 default: 3219 ERR("invalid arg"); 3220 hr = E_INVALIDARG; 3221 break; 3222 } 3223 return hr; 3224 } 3225 #endif
Note:
See TracChangeset
for help on using the changeset viewer.