From: Fabian Maurer dark.shadow4@web.de
Since ddraw propably never allowed sizes that big anyways, this should not cause any issues.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51512 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/ddraw/ddraw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index f6770e59fb6..5a25bd58c4e 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1287,8 +1287,9 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) caps->dpcLineCaps.dwTextureFilterCaps = wined3d_caps.TextureFilterCaps; caps->dpcLineCaps.dwTextureAddressCaps = wined3d_caps.TextureAddressCaps;
- caps->dwMaxTextureWidth = wined3d_caps.MaxTextureWidth; - caps->dwMaxTextureHeight = wined3d_caps.MaxTextureHeight; + /* Some games (like "warning forever") assume the texture size fits a signed 16bit integer, so we limit the size artificially */ + caps->dwMaxTextureWidth = min(wined3d_caps.MaxTextureWidth, 16384); + caps->dwMaxTextureHeight = min(wined3d_caps.MaxTextureHeight, 16384);
caps->dwMaxTextureRepeat = wined3d_caps.MaxTextureRepeat; caps->dwMaxTextureAspectRatio = wined3d_caps.MaxTextureAspectRatio;