Changeset 35713 in vbox for trunk/src/VBox
- Timestamp:
- Jan 25, 2011 2:15:16 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/directx.c
r33656 r35713 467 467 468 468 static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, 469 UINT adapter, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) 470 { 471 FIXME("iface %p, adapter %u, mode %p, rotation %p stub!\n", 472 iface, adapter, mode, rotation); 473 474 return D3DERR_DRIVERINTERNALERROR; 469 UINT Adapter, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) 470 { 471 IDirect3D9Impl *This = (IDirect3D9Impl *)iface; 472 HRESULT hr; 473 474 TRACE("iface %p, adapter %u, mode %p, rotation %p", iface, Adapter, pMode, pRotation); 475 476 wined3d_mutex_lock(); 477 hr = IWineD3D_GetAdapterDisplayModeEx(This->WineD3D, Adapter, (WINED3DDISPLAYMODEEX *) pMode, (WINED3DDISPLAYROTATION *) pRotation); 478 wined3d_mutex_unlock(); 479 480 if (SUCCEEDED(hr)) 481 { 482 pMode->Format = d3dformat_from_wined3dformat(pMode->Format); 483 } 484 485 /* 486 if (mode) 487 { 488 D3DDISPLAYMODE* d3dmode; 489 490 if (mode->Size != sizeof(D3DDISPLAYMODEEX)) 491 { 492 WARN("Invalid mode->Size %u expected %u", mode->Size, sizeof(D3DDISPLAYMODEEX)); 493 return D3DERR_INVALIDCALL; 494 } 495 496 wined3d_mutex_lock(); 497 hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) &d3dmode); 498 wined3d_mutex_unlock(); 499 500 if (SUCCEEDED(hr)) 501 { 502 mode->Width = d3dmode.Width; 503 mode->Height = d3dmode.Height; 504 mode->RefreshRate = d3dmode.RefreshRate; 505 mode->Format = d3dformat_from_wined3dformat(d3dmode.Format); 506 mode->ScanLineOrdering = D3DSCANLINEORDERING_PROGRESSIVE; //D3DSCANLINEORDERING_INTERLACED 507 } 508 } 509 else 510 { 511 hr = WINED3D_OK; 512 } 513 514 if (rotation) 515 { 516 *rotation = D3DDISPLAYROTATION_IDENTITY; 517 } 518 */ 519 return hr; 475 520 } 476 521 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wine/wined3d.h
r35650 r35713 2110 2110 WINED3DFORMAT Format; 2111 2111 } WINED3DDISPLAYMODE; 2112 typedef enum _WINED3DSCANLINEORDERING { 2113 WINED3DSCANLINEORDERING_UNKNOWN = 0, 2114 WINED3DSCANLINEORDERING_PROGRESSIVE = 1, 2115 WINED3DSCANLINEORDERING_INTERLACED = 2 2116 } WINED3DSCANLINEORDERING; 2117 typedef struct _WINED3DDISPLAYMODEEX { 2118 UINT Size; 2119 UINT Width; 2120 UINT Height; 2121 UINT RefreshRate; 2122 WINED3DFORMAT Format; 2123 WINED3DSCANLINEORDERING ScanLineOrdering; 2124 } WINED3DDISPLAYMODEEX; 2125 typedef enum _WINED3DDISPLAYROTATION { 2126 WINED3DDISPLAYROTATION_IDENTITY = 1, 2127 WINED3DDISPLAYROTATION_90 = 2, 2128 WINED3DDISPLAYROTATION_180 = 3, 2129 WINED3DDISPLAYROTATION_270 = 4 2130 } WINED3DDISPLAYROTATION; 2112 2131 typedef struct _WINED3DCOLORVALUE { 2113 2132 float r; … … 2939 2958 WINED3DDISPLAYMODE *mode) = 0; 2940 2959 2960 virtual HRESULT STDMETHODCALLTYPE GetAdapterDisplayModeEx( 2961 UINT adapter_idx, 2962 WINED3DDISPLAYMODEEX *mode, 2963 WINED3DDISPLAYROTATION *rotation) = 0; 2964 2941 2965 virtual HRESULT STDMETHODCALLTYPE GetAdapterIdentifier( 2942 2966 UINT adapter_idx, … … 3045 3069 UINT adapter_idx, 3046 3070 WINED3DDISPLAYMODE *mode); 3071 3072 HRESULT (STDMETHODCALLTYPE *GetAdapterDisplayModeEx)( 3073 IWineD3D* This, 3074 UINT adapter_idx, 3075 WINED3DDISPLAYMODEEX *mode, 3076 WINED3DDISPLAYROTATION *rotation); 3047 3077 3048 3078 HRESULT (STDMETHODCALLTYPE *GetAdapterIdentifier)( … … 3130 3160 #define IWineD3D_EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) (This)->lpVtbl->EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) 3131 3161 #define IWineD3D_GetAdapterDisplayMode(This,adapter_idx,mode) (This)->lpVtbl->GetAdapterDisplayMode(This,adapter_idx,mode) 3162 #define IWineD3D_GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation) (This)->lpVtbl->GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation) 3132 3163 #define IWineD3D_GetAdapterIdentifier(This,adapter_idx,flags,identifier) (This)->lpVtbl->GetAdapterIdentifier(This,adapter_idx,flags,identifier) 3133 3164 #define IWineD3D_CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels) (This)->lpVtbl->CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels) … … 3190 3221 WINED3DDISPLAYMODE *mode); 3191 3222 void __RPC_STUB IWineD3D_GetAdapterDisplayMode_Stub( 3223 IRpcStubBuffer* This, 3224 IRpcChannelBuffer* pRpcChannelBuffer, 3225 PRPC_MESSAGE pRpcMessage, 3226 DWORD* pdwStubPhase); 3227 HRESULT STDMETHODCALLTYPE IWineD3D_GetAdapterDisplayModeEx_Proxy( 3228 IWineD3D* This, 3229 UINT adapter_idx, 3230 WINED3DDISPLAYMODEEX *mode, 3231 WINED3DDISPLAYROTATION *rotation); 3232 void __RPC_STUB IWineD3D_GetAdapterDisplayModeEx_Stub( 3192 3233 IRpcStubBuffer* This, 3193 3234 IRpcChannelBuffer* pRpcChannelBuffer, -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/wingdi.h
r33656 r35713 2904 2904 DWORD dmDisplayFixedOutput; 2905 2905 } DUMMYSTRUCTNAME2; 2906 } DUMMYUNIONNAME 1;2906 } DUMMYUNIONNAME; 2907 2907 short dmColor; 2908 2908 short dmDuplex; … … 2951 2951 #define DM_SCALE 0x00000010L 2952 2952 #define DM_POSITION 0x00000020L 2953 #define DM_DISPLAYORIENTATION 0x00000080L 2953 2954 #define DM_COPIES 0x00000100L 2954 2955 #define DM_DEFAULTSOURCE 0x00000200L … … 3136 3137 #define DMCOLLATE_FALSE 0 3137 3138 #define DMCOLLATE_TRUE 1 3139 3140 /* DEVMODE dmDisplayOrientation specifiations */ 3141 #define DMDO_DEFAULT 0 3142 #define DMDO_90 1 3143 #define DMDO_180 2 3144 #define DMDO_270 3 3145 3146 /* DEVMODE dmDisplayFlags flags */ 3147 #define DM_INTERLACED 0x00000002 3148 #define DMDISPLAYFLAGS_TEXTMODE 0x00000004 3138 3149 3139 3150 #define DMICMMETHOD_NONE 1 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/include/wine/wined3d.h
r35650 r35713 2112 2112 WINED3DFORMAT Format; 2113 2113 } WINED3DDISPLAYMODE; 2114 typedef enum _WINED3DSCANLINEORDERING { 2115 WINED3DSCANLINEORDERING_UNKNOWN = 0, 2116 WINED3DSCANLINEORDERING_PROGRESSIVE = 1, 2117 WINED3DSCANLINEORDERING_INTERLACED = 2 2118 } WINED3DSCANLINEORDERING; 2119 typedef struct _WINED3DDISPLAYMODEEX { 2120 UINT Size; 2121 UINT Width; 2122 UINT Height; 2123 UINT RefreshRate; 2124 WINED3DFORMAT Format; 2125 WINED3DSCANLINEORDERING ScanLineOrdering; 2126 } WINED3DDISPLAYMODEEX; 2127 typedef enum _WINED3DDISPLAYROTATION { 2128 WINED3DDISPLAYROTATION_IDENTITY = 1, 2129 WINED3DDISPLAYROTATION_90 = 2, 2130 WINED3DDISPLAYROTATION_180 = 3, 2131 WINED3DDISPLAYROTATION_270 = 4 2132 } WINED3DDISPLAYROTATION; 2114 2133 typedef struct _WINED3DCOLORVALUE { 2115 2134 float r; … … 2941 2960 WINED3DDISPLAYMODE *mode) = 0; 2942 2961 2962 virtual HRESULT STDMETHODCALLTYPE GetAdapterDisplayModeEx( 2963 UINT adapter_idx, 2964 WINED3DDISPLAYMODEEX *mode, 2965 WINED3DDISPLAYROTATION *rotation) = 0; 2966 2943 2967 virtual HRESULT STDMETHODCALLTYPE GetAdapterIdentifier( 2944 2968 UINT adapter_idx, … … 3047 3071 UINT adapter_idx, 3048 3072 WINED3DDISPLAYMODE *mode); 3073 3074 HRESULT (STDMETHODCALLTYPE *GetAdapterDisplayModeEx)( 3075 IWineD3D* This, 3076 UINT adapter_idx, 3077 WINED3DDISPLAYMODEEX *mode, 3078 WINED3DDISPLAYROTATION *rotation); 3049 3079 3050 3080 HRESULT (STDMETHODCALLTYPE *GetAdapterIdentifier)( … … 3132 3162 #define IWineD3D_EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) (This)->lpVtbl->EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) 3133 3163 #define IWineD3D_GetAdapterDisplayMode(This,adapter_idx,mode) (This)->lpVtbl->GetAdapterDisplayMode(This,adapter_idx,mode) 3164 #define IWineD3D_GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation) (This)->lpVtbl->GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation) 3134 3165 #define IWineD3D_GetAdapterIdentifier(This,adapter_idx,flags,identifier) (This)->lpVtbl->GetAdapterIdentifier(This,adapter_idx,flags,identifier) 3135 3166 #define IWineD3D_CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels) (This)->lpVtbl->CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels) … … 3192 3223 WINED3DDISPLAYMODE *mode); 3193 3224 void __RPC_STUB IWineD3D_GetAdapterDisplayMode_Stub( 3225 IRpcStubBuffer* This, 3226 IRpcChannelBuffer* pRpcChannelBuffer, 3227 PRPC_MESSAGE pRpcMessage, 3228 DWORD* pdwStubPhase); 3229 HRESULT STDMETHODCALLTYPE IWineD3D_GetAdapterDisplayModeEx_Proxy( 3230 IWineD3D* This, 3231 UINT adapter_idx, 3232 WINED3DDISPLAYMODEEX *mode, 3233 WINED3DDISPLAYROTATION *rotation); 3234 void __RPC_STUB IWineD3D_GetAdapterDisplayModeEx_Stub( 3194 3235 IRpcStubBuffer* This, 3195 3236 IRpcChannelBuffer* pRpcChannelBuffer, -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/directx.c
r35319 r35713 2862 2862 } 2863 2863 2864 static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayModeEx(IWineD3D *iface, 2865 UINT Adapter, WINED3DDISPLAYMODEEX *pMode, WINED3DDISPLAYROTATION *pRotation) 2866 { 2867 TRACE("iface %p, adapter_idx %u, display_mode %p, display_rotation %p.\n", iface, Adapter, pMode, pRotation); 2868 2869 if (pMode==NULL && pRotation==NULL) 2870 { 2871 return WINED3D_OK; 2872 } 2873 2874 if (pMode && pMode->Size != sizeof(WINED3DDISPLAYMODEEX)) 2875 { 2876 WARN("Invalid mode->Size %u expected %u", pMode->Size, sizeof(WINED3DDISPLAYMODEEX)); 2877 return WINED3DERR_INVALIDCALL; 2878 } 2879 2880 if (Adapter >= IWineD3D_GetAdapterCount(iface)) 2881 { 2882 return WINED3DERR_INVALIDCALL; 2883 } 2884 2885 if (Adapter == 0) { /* Display */ 2886 int bpp = 0; 2887 DEVMODEW DevModeW; 2888 2889 ZeroMemory(&DevModeW, sizeof(DevModeW)); 2890 DevModeW.dmSize = sizeof(DevModeW); 2891 2892 EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &DevModeW, 0); 2893 2894 if (pMode) 2895 { 2896 pMode->Width = DevModeW.dmPelsWidth; 2897 pMode->Height = DevModeW.dmPelsHeight; 2898 bpp = DevModeW.dmBitsPerPel; 2899 pMode->RefreshRate = DEFAULT_REFRESH_RATE; 2900 if (DevModeW.dmFields&DM_DISPLAYFREQUENCY) 2901 { 2902 pMode->RefreshRate = DevModeW.dmDisplayFrequency; 2903 } 2904 2905 pMode->Format = pixelformat_for_depth(bpp); 2906 2907 pMode->ScanLineOrdering = WINED3DSCANLINEORDERING_PROGRESSIVE; 2908 if (DevModeW.dmFields&DM_DISPLAYFLAGS) 2909 { 2910 if (DevModeW.u2.dmDisplayFlags&DM_INTERLACED) 2911 { 2912 pMode->ScanLineOrdering = WINED3DSCANLINEORDERING_INTERLACED; 2913 } 2914 } 2915 } 2916 2917 if (pRotation) 2918 { 2919 *pRotation = WINED3DDISPLAYROTATION_IDENTITY; 2920 if (DevModeW.dmFields&DM_DISPLAYORIENTATION) 2921 { 2922 switch (DevModeW.u.s2.dmDisplayOrientation) 2923 { 2924 case DMDO_DEFAULT: 2925 *pRotation = WINED3DDISPLAYROTATION_IDENTITY; 2926 break; 2927 case DMDO_90: 2928 *pRotation = WINED3DDISPLAYROTATION_90; 2929 break; 2930 case DMDO_180: 2931 *pRotation = WINED3DDISPLAYROTATION_180; 2932 break; 2933 case DMDO_270: 2934 *pRotation = WINED3DDISPLAYROTATION_270; 2935 break; 2936 default: 2937 WARN("Unexpected display orientation %#x", DevModeW.u.s2.dmDisplayOrientation); 2938 break; 2939 } 2940 } 2941 } 2942 } else { 2943 FIXME_(d3d_caps)("Adapter not primary display\n"); 2944 } 2945 2946 return WINED3D_OK; 2947 } 2948 2864 2949 /* NOTE: due to structure differences between dx8 and dx9 D3DADAPTER_IDENTIFIER, 2865 2950 and fields being inserted in the middle, a new structure is used in place */ … … 5419 5504 IWineD3DImpl_EnumAdapterModes, 5420 5505 IWineD3DImpl_GetAdapterDisplayMode, 5506 IWineD3DImpl_GetAdapterDisplayModeEx, 5421 5507 IWineD3DImpl_GetAdapterIdentifier, 5422 5508 IWineD3DImpl_CheckDeviceMultiSampleType, -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r33656 r35713 3701 3701 wine_rb_remove(&priv->program_lookup, &key); 3702 3702 3703 TRACE("deleting program %u\n", entry->programId); 3703 3704 GL_EXTCALL(glDeleteObjectARB(entry->programId)); 3705 checkGLcall("glDeleteObjectARB"); 3704 3706 if (entry->vshader) list_remove(&entry->vshader_entry); 3705 3707 if (entry->pshader) list_remove(&entry->pshader_entry);
Note:
See TracChangeset
for help on using the changeset viewer.