- Siedler3 appears to have rather limited buffers for device/description
strings and crashes with those long strings. Shortened those strings. - Also driver needs to be "display" for display devices (some other programs rely on that info I seem to remember). - Fixed DSurface::GetSurfaceDesc to not just blindly copy a DDSURFACEDESC2 struct over a smaller DDSURFACEDESC one.
This commit is contained in:
parent
e81843bb61
commit
15a525973b
|
@ -35,8 +35,8 @@ static ICOM_VTABLE(IDirectDraw7) XF86DGA2_DirectDraw_VTable;
|
|||
|
||||
static const DDDEVICEIDENTIFIER2 xf86dga2_device =
|
||||
{
|
||||
"display",
|
||||
"XF86DGA2 Driver",
|
||||
"WINE DirectDraw on XF86DGA2",
|
||||
{ { 0x00010001, 0x00010001 } },
|
||||
0, 0, 0, 0,
|
||||
/* e2dcb020-dc60-11d1-8407-9714f5d50803 */
|
||||
|
|
|
@ -25,8 +25,8 @@ static ICOM_VTABLE(IDirectDraw7) User_DirectDraw_VTable;
|
|||
|
||||
static const DDDEVICEIDENTIFIER2 user_device =
|
||||
{
|
||||
"User Driver",
|
||||
"WINE DirectDraw on User (and GDI)",
|
||||
"display",
|
||||
"User (and GDI)",
|
||||
{ { 0x00010001, 0x00010001 } },
|
||||
0, 0, 0, 0,
|
||||
/* fe38440c-8969-4283-bc73-749e7bc3c2eb */
|
||||
|
|
|
@ -36,8 +36,8 @@ static ICOM_VTABLE(IDirectDraw7) XVidMode_DirectDraw_VTable;
|
|||
|
||||
static const DDDEVICEIDENTIFIER2 xvidmode_device =
|
||||
{
|
||||
"User/XF86VidMode Driver",
|
||||
"WINE DirectDraw on User with XF86VidMode",
|
||||
"display",
|
||||
"XF86VidMode",
|
||||
{ { 0x00010001, 0x00010001 } },
|
||||
0, 0, 0, 0,
|
||||
/* 40c1b248-9d7d-4a29-b7d7-4cd8109f3d5d */
|
||||
|
|
|
@ -19,6 +19,13 @@
|
|||
(x)->dwSize = sizeof(*x); \
|
||||
} while (0)
|
||||
|
||||
#define DD_STRUCT_COPY_BYSIZE(to,from) \
|
||||
do { \
|
||||
DWORD __size = to->dwSize; \
|
||||
memcpy(to,from,__size); \
|
||||
to->dwSize = __size;/*restore size*/ \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirectDraw implementation structure
|
||||
*/
|
||||
|
|
|
@ -739,7 +739,13 @@ Main_DirectDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
|
|||
ICOM_THIS(IDirectDrawSurfaceImpl, iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n",This,pDDSD);
|
||||
*pDDSD = This->surface_desc;
|
||||
if ((pDDSD->dwSize < sizeof(DDSURFACEDESC)) ||
|
||||
(pDDSD->dwSize > sizeof(DDSURFACEDESC2))) {
|
||||
ERR("Impossible/Strange struct size %ld.\n",pDDSD->dwSize);
|
||||
return DDERR_GENERIC;
|
||||
}
|
||||
|
||||
DD_STRUCT_COPY_BYSIZE(pDDSD,&This->surface_desc);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue