winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
770 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Replace "DirectDraw stuff" with per-adapter screen information.
by Alexandre Julliard
30 Aug '11
30 Aug '11
Module: wine Branch: master Commit: 1870353c7ab9e31a51aa104a364d2629ba612fa3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1870353c7ab9e31a51aa104a3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 29 18:58:56 2011 +0200 wined3d: Replace "DirectDraw stuff" with per-adapter screen information. --- dlls/wined3d/device.c | 33 ++++++++++++++++++--------------- dlls/wined3d/wined3d_private.h | 10 +++++----- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a4c3696..82dcd65 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1627,7 +1627,8 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device) HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device, UINT swapchain_idx, const WINED3DDISPLAYMODE *mode) { - const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, mode->Format); + struct wined3d_adapter *adapter = device->adapter; + const struct wined3d_format *format = wined3d_get_format(&adapter->gl_info, mode->Format); DEVMODEW devmode; LONG ret; RECT clip_rc; @@ -1653,8 +1654,8 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device, devmode.dmFields |= DM_DISPLAYFREQUENCY; /* Only change the mode if necessary */ - if (device->ddraw_width == mode->Width && device->ddraw_height == mode->Height - && device->ddraw_format == mode->Format && !mode->RefreshRate) + if (adapter->screen_size.cx == mode->Width && adapter->screen_size.cy == mode->Height + && adapter->screen_format == mode->Format && !mode->RefreshRate) return WINED3D_OK; ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL); @@ -1673,9 +1674,9 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device, } /* Store the new values */ - device->ddraw_width = mode->Width; - device->ddraw_height = mode->Height; - device->ddraw_format = mode->Format; + adapter->screen_size.cx = mode->Width; + adapter->screen_size.cy = mode->Height; + adapter->screen_format = mode->Format; /* And finally clip mouse to our screen */ SetRect(&clip_rc, 0, 0, mode->Width, mode->Height); @@ -3939,6 +3940,8 @@ HRESULT CDECL wined3d_device_get_display_mode(struct wined3d_device *device, } else { + const struct wined3d_adapter *adapter = device->adapter; + /* Don't read the real display mode, but return the stored mode * instead. X11 can't change the color depth, and some apps are * pretty angry if they SetDisplayMode from 24 to 16 bpp and find out @@ -3946,9 +3949,9 @@ HRESULT CDECL wined3d_device_get_display_mode(struct wined3d_device *device, * * Also don't relay to the swapchain because with ddraw it's possible * that there isn't a swapchain at all. */ - mode->Width = device->ddraw_width; - mode->Height = device->ddraw_height; - mode->Format = device->ddraw_format; + mode->Width = adapter->screen_size.cx; + mode->Height = adapter->screen_size.cy; + mode->Format = adapter->screen_format; mode->RefreshRate = 0; hr = WINED3D_OK; } @@ -5291,12 +5294,12 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device } /* MSDN: Cursor must be smaller than the display mode */ - if (cursor_image->resource.width > device->ddraw_width - || cursor_image->resource.height > device->ddraw_height) + if (cursor_image->resource.width > device->adapter->screen_size.cx + || cursor_image->resource.height > device->adapter->screen_size.cy) { WARN("Surface %p dimensions are %ux%u, but screen dimensions are %ux%u.\n", cursor_image, cursor_image->resource.width, cursor_image->resource.height, - device->ddraw_width, device->ddraw_height); + device->adapter->screen_size.cx, device->adapter->screen_size.cy); return WINED3DERR_INVALIDCALL; } @@ -6190,9 +6193,9 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, wined3d_decref(device->wined3d); return hr; } - device->ddraw_width = mode.Width; - device->ddraw_height = mode.Height; - device->ddraw_format = mode.Format; + adapter->screen_size.cx = mode.Width; + adapter->screen_size.cy = mode.Height; + adapter->screen_format = mode.Format; /* Save the creation parameters. */ device->createParms.AdapterOrdinal = adapter_idx; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 05f2bf4..516e14c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1509,7 +1509,11 @@ struct wined3d_adapter { UINT ordinal; BOOL opengl; - POINT monitorPoint; + + POINT monitorPoint; + SIZE screen_size; + enum wined3d_format_id screen_format; + struct wined3d_gl_info gl_info; struct wined3d_driver_info driver_info; WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */ @@ -1729,10 +1733,6 @@ struct wined3d_device UINT dummy_texture_3d[MAX_COMBINED_SAMPLERS]; UINT dummy_texture_cube[MAX_COMBINED_SAMPLERS]; - /* DirectDraw stuff */ - DWORD ddraw_width, ddraw_height; - enum wined3d_format_id ddraw_format; - /* With register combiners we can skip junk texture stages */ DWORD texUnitMap[MAX_COMBINED_SAMPLERS]; DWORD rev_tex_unit_map[MAX_COMBINED_SAMPLERS];
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to wined3d_device_get_available_texture_mem() const.
by Alexandre Julliard
30 Aug '11
30 Aug '11
Module: wine Branch: master Commit: e7f61b8c616e676c3bae8e9c7883adf84d4665cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7f61b8c616e676c3bae8e9c7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 29 18:58:55 2011 +0200 wined3d: Make the device parameter to wined3d_device_get_available_texture_mem() const. --- dlls/wined3d/device.c | 2 +- include/wine/wined3d.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8593a6a..a4c3696 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1696,7 +1696,7 @@ HRESULT CDECL wined3d_device_get_wined3d(const struct wined3d_device *device, st return WINED3D_OK; } -UINT CDECL wined3d_device_get_available_texture_mem(struct wined3d_device *device) +UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device) { TRACE("device %p.\n", device); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 3a1cb87..4cdc1d7 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2205,7 +2205,7 @@ HRESULT __cdecl wined3d_device_draw_tri_patch(struct wined3d_device *device, UIN HRESULT __cdecl wined3d_device_end_scene(struct wined3d_device *device); HRESULT __cdecl wined3d_device_end_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock); void __cdecl wined3d_device_evict_managed_resources(struct wined3d_device *device); -UINT __cdecl wined3d_device_get_available_texture_mem(struct wined3d_device *device); +UINT __cdecl wined3d_device_get_available_texture_mem(const struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_back_buffer(struct wined3d_device *device, UINT swapchain_idx, UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer); INT __cdecl wined3d_device_get_base_vertex_index(struct wined3d_device *device);
1
0
0
0
Aric Stewart : usp10: Draw selected glyphs in ScriptStringOut.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: 49dc1570b77dfa9f8a709d960af8be95284e5587 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49dc1570b77dfa9f8a709d960…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Aug 29 06:50:05 2011 -0500 usp10: Draw selected glyphs in ScriptStringOut. --- dlls/usp10/Makefile.in | 2 +- dlls/usp10/usp10.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/dlls/usp10/Makefile.in b/dlls/usp10/Makefile.in index 80c93d9..0013221 100644 --- a/dlls/usp10/Makefile.in +++ b/dlls/usp10/Makefile.in @@ -1,6 +1,6 @@ MODULE = usp10.dll IMPORTLIB = usp10 -IMPORTS = gdi32 +IMPORTS = user32 gdi32 C_SRCS = \ bidi.c \ diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 63e50c8..61f65e4 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1029,16 +1029,20 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, int cEnd, UINT uOptions, const RECT *prc, + BOOL fSelected, BOOL fDisabled) { StringAnalysis *analysis; int off_x = 0; HRESULT hr; + COLORREF BkColor = 0x0; + COLORREF TextColor = 0x0; + INT BkMode = 0; INT runStart, runEnd; INT iGlyph, cGlyphs; - TRACE("(%p,%d,%d,%d,%d,%d, 0x%1x, %d)\n", - ssa, iX, iY, iItem, cStart, cEnd, uOptions, fDisabled); + TRACE("(%p,%d,%d,%d,%d,%d, 0x%1x, %d, %d)\n", + ssa, iX, iY, iItem, cStart, cEnd, uOptions, fSelected, fDisabled); if (!(analysis = ssa)) return E_INVALIDARG; @@ -1049,6 +1053,20 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, uOptions |= ETO_GLYPH_INDEX; analysis->pItem[0].a.fNoGlyphIndex = FALSE; /* say that we have glyphs */ + if (fSelected) + { + BkMode = GetBkMode(analysis->hdc); + SetBkMode( analysis->hdc, OPAQUE); + BkColor = GetBkColor(analysis->hdc); + SetBkColor(analysis->hdc, GetSysColor(COLOR_HIGHLIGHT)); + if (!fDisabled) + { + TextColor = GetTextColor(analysis->hdc); + SetTextColor(analysis->hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); + } + + } + if (cStart >= 0 && analysis->pItem[iItem+1].iCharPos > cStart && analysis->pItem[iItem].iCharPos <= cStart) runStart = cStart - analysis->pItem[iItem].iCharPos; else @@ -1093,6 +1111,14 @@ static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, TRACE("ScriptTextOut hr=%08x\n", hr); + if (fSelected) + { + SetBkColor(analysis->hdc, BkColor); + SetBkMode( analysis->hdc, BkMode); + if (!fDisabled) + SetTextColor(analysis->hdc, TextColor); + } + return hr; } @@ -1137,11 +1163,23 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, for (item = 0; item < analysis->numItems; item++) { - hr = SS_ItemOut( ssa, iX, iY, analysis->logical2visual[item], -1, -1, uOptions, prc, fDisabled); + hr = SS_ItemOut( ssa, iX, iY, analysis->logical2visual[item], -1, -1, uOptions, prc, FALSE, fDisabled); if (FAILED(hr)) return hr; } + if (iMinSel < iMaxSel && (iMinSel > 0 || iMaxSel > 0)) + { + if (iMaxSel > 0 && iMinSel < 0) + iMinSel = 0; + for (item = 0; item < analysis->numItems; item++) + { + hr = SS_ItemOut( ssa, iX, iY, analysis->logical2visual[item], iMinSel, iMaxSel, uOptions, prc, TRUE, fDisabled); + if (FAILED(hr)) + return hr; + } + } + return S_OK; }
1
0
0
0
Aric Stewart : usp10: Modify ScriptStringOut to paint the string item by item.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: f1796a94a5a629a977b6f7b746f309e3a2f05bc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1796a94a5a629a977b6f7b74…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Aug 29 06:49:55 2011 -0500 usp10: Modify ScriptStringOut to paint the string item by item. --- dlls/usp10/usp10.c | 123 ++++++++++++++++++++++++++++++++++------------------ 1 files changed, 80 insertions(+), 43 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 105990b..63e50c8 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1021,6 +1021,81 @@ error: return hr; } +static HRESULT SS_ItemOut( SCRIPT_STRING_ANALYSIS ssa, + int iX, + int iY, + int iItem, + int cStart, + int cEnd, + UINT uOptions, + const RECT *prc, + BOOL fDisabled) +{ + StringAnalysis *analysis; + int off_x = 0; + HRESULT hr; + INT runStart, runEnd; + INT iGlyph, cGlyphs; + + TRACE("(%p,%d,%d,%d,%d,%d, 0x%1x, %d)\n", + ssa, iX, iY, iItem, cStart, cEnd, uOptions, fDisabled); + + if (!(analysis = ssa)) return E_INVALIDARG; + + if ((cStart >= 0 && analysis->pItem[iItem+1].iCharPos <= cStart) || + (cEnd >= 0 && analysis->pItem[iItem].iCharPos >= cEnd)) + return S_OK; + + uOptions |= ETO_GLYPH_INDEX; + analysis->pItem[0].a.fNoGlyphIndex = FALSE; /* say that we have glyphs */ + + if (cStart >= 0 && analysis->pItem[iItem+1].iCharPos > cStart && analysis->pItem[iItem].iCharPos <= cStart) + runStart = cStart - analysis->pItem[iItem].iCharPos; + else + runStart = 0; + if (cEnd >= 0 && analysis->pItem[iItem+1].iCharPos > cEnd && analysis->pItem[iItem].iCharPos <= cEnd) + runEnd = (cEnd-1) - analysis->pItem[iItem].iCharPos; + else + runEnd = (analysis->pItem[iItem+1].iCharPos - analysis->pItem[iItem].iCharPos) - 1; + + if (analysis->pItem[iItem].a.fRTL) + { + if (cEnd >= 0 && cEnd < analysis->pItem[iItem+1].iCharPos) + ScriptStringCPtoX(ssa, cEnd, FALSE, &off_x); + else + ScriptStringCPtoX(ssa, analysis->pItem[iItem+1].iCharPos-1, TRUE, &off_x); + } + else + { + if (cStart >=0 && runStart) + ScriptStringCPtoX(ssa, cStart, FALSE, &off_x); + else + ScriptStringCPtoX(ssa, analysis->pItem[iItem].iCharPos, FALSE, &off_x); + } + + if (analysis->pItem[iItem].a.fRTL) + iGlyph = analysis->glyphs[iItem].pwLogClust[runEnd]; + else + iGlyph = analysis->glyphs[iItem].pwLogClust[runStart]; + + if (analysis->pItem[iItem].a.fRTL) + cGlyphs = analysis->glyphs[iItem].pwLogClust[runStart] - iGlyph; + else + cGlyphs = analysis->glyphs[iItem].pwLogClust[runEnd] - iGlyph; + + cGlyphs++; + + hr = ScriptTextOut(analysis->hdc, (SCRIPT_CACHE *)&analysis->sc, iX + off_x, + iY, uOptions, prc, &analysis->pItem[iItem].a, NULL, 0, + &analysis->glyphs[iItem].glyphs[iGlyph], cGlyphs, + &analysis->glyphs[iItem].piAdvance[iGlyph], NULL, + &analysis->glyphs[iItem].pGoffset[iGlyph]); + + TRACE("ScriptTextOut hr=%08x\n", hr); + + return hr; +} + /*********************************************************************** * ScriptStringOut (USP10.@) * @@ -1052,8 +1127,7 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, BOOL fDisabled) { StringAnalysis *analysis; - WORD *glyphs; - int item, cnt, x; + int item; HRESULT hr; TRACE("(%p,%d,%d,0x%1x,%p,%d,%d,%d)\n", @@ -1061,51 +1135,14 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, if (!(analysis = ssa)) return E_INVALIDARG; - /* - * Get storage for the output buffer for the consolidated strings - */ - cnt = 0; for (item = 0; item < analysis->numItems; item++) { - cnt += analysis->glyphs[item].numGlyphs; + hr = SS_ItemOut( ssa, iX, iY, analysis->logical2visual[item], -1, -1, uOptions, prc, fDisabled); + if (FAILED(hr)) + return hr; } - if (!(glyphs = heap_alloc(sizeof(WCHAR) * cnt))) return E_OUTOFMEMORY; - - /* - * ScriptStringOut only processes glyphs hence set ETO_GLYPH_INDEX - */ - uOptions |= ETO_GLYPH_INDEX; - analysis->pItem[0].a.fNoGlyphIndex = FALSE; /* say that we have glyphs */ - TRACE("numItems %d\n", analysis->numItems); - - /* - * Copy the string items into the output buffer - */ - cnt = 0; - for (item = 0; item < analysis->numItems; item++) - { - memcpy(&glyphs[cnt], analysis->glyphs[analysis->logical2visual[item]].glyphs, - sizeof(WCHAR) * analysis->glyphs[analysis->logical2visual[item]].numGlyphs); - - TRACE("Item %d, Glyphs %d ", analysis->logical2visual[item], analysis->glyphs[analysis->logical2visual[item]].numGlyphs); - for (x = cnt; x < analysis->glyphs[analysis->logical2visual[item]].numGlyphs + cnt; x ++) - TRACE("%04x", glyphs[x]); - TRACE("\n"); - - cnt += analysis->glyphs[analysis->logical2visual[item]].numGlyphs; /* point to the end of the copied text */ - } - - hr = ScriptTextOut(analysis->hdc, (SCRIPT_CACHE *)&analysis->sc, iX, iY, - uOptions, prc, &analysis->pItem->a, NULL, 0, glyphs, cnt, - analysis->glyphs->piAdvance, NULL, analysis->glyphs->pGoffset); - TRACE("ScriptTextOut hr=%08x\n", hr); - - /* - * Free the output buffer and script cache - */ - heap_free(glyphs); - return hr; + return S_OK; } /***********************************************************************
1
0
0
0
Aric Stewart : usp10: Display and handle bidi runs in the correct order in ScriptString functions .
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: a7071662f7e75da4c936f532a07e132f252c3a4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7071662f7e75da4c936f532a…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Aug 29 06:49:40 2011 -0500 usp10: Display and handle bidi runs in the correct order in ScriptString functions. --- dlls/usp10/usp10.c | 58 +++++++++++++++++++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 19 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 38f6c3a..105990b 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -334,6 +334,7 @@ typedef struct { StringGlyphs* glyphs; SCRIPT_LOGATTR* logattrs; SIZE* sz; + int* logical2visual; } StringAnalysis; static inline void *heap_alloc(SIZE_T size) @@ -910,6 +911,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, SCRIPT_CONTROL sControl; SCRIPT_STATE sState; int i, num_items = 255; + BYTE *BidiLevel; TRACE("(%p,%p,%d,%d,%d,0x%x,%d,%p,%p,%p,%p,%p,%p)\n", hdc, pString, cString, cGlyphs, iCharset, dwFlags, iReqWidth, @@ -965,6 +967,11 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, if (!(analysis->glyphs = heap_alloc_zero(sizeof(StringGlyphs) * analysis->numItems))) goto error; + if (!(analysis->logical2visual = heap_alloc_zero(sizeof(int) * analysis->numItems))) + goto error; + if (!(BidiLevel = heap_alloc_zero(analysis->numItems))) + goto error; + for (i = 0; i < analysis->numItems; i++) { SCRIPT_CACHE *sc = (SCRIPT_CACHE *)&analysis->sc; @@ -994,8 +1001,13 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, analysis->glyphs[i].pGoffset = pGoffset; analysis->glyphs[i].abc = abc; analysis->glyphs[i].iMaxPosX= -1; + + BidiLevel[i] = analysis->pItem[i].a.s.uBidiLevel; } + ScriptLayout(analysis->numItems, BidiLevel, NULL, analysis->logical2visual); + heap_free(BidiLevel); + *pssa = analysis; return S_OK; @@ -1003,6 +1015,7 @@ error: heap_free(analysis->glyphs); heap_free(analysis->logattrs); heap_free(analysis->pItem); + heap_free(analysis->logical2visual); heap_free(analysis->sc); heap_free(analysis); return hr; @@ -1064,24 +1077,23 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, uOptions |= ETO_GLYPH_INDEX; analysis->pItem[0].a.fNoGlyphIndex = FALSE; /* say that we have glyphs */ + TRACE("numItems %d\n", analysis->numItems); + /* * Copy the string items into the output buffer */ - - TRACE("numItems %d\n", analysis->numItems); - cnt = 0; for (item = 0; item < analysis->numItems; item++) { - memcpy(&glyphs[cnt], analysis->glyphs[item].glyphs, - sizeof(WCHAR) * analysis->glyphs[item].numGlyphs); + memcpy(&glyphs[cnt], analysis->glyphs[analysis->logical2visual[item]].glyphs, + sizeof(WCHAR) * analysis->glyphs[analysis->logical2visual[item]].numGlyphs); - TRACE("Item %d, Glyphs %d ", item, analysis->glyphs[item].numGlyphs); - for (x = cnt; x < analysis->glyphs[item].numGlyphs + cnt; x ++) + TRACE("Item %d, Glyphs %d ", analysis->logical2visual[item], analysis->glyphs[analysis->logical2visual[item]].numGlyphs); + for (x = cnt; x < analysis->glyphs[analysis->logical2visual[item]].numGlyphs + cnt; x ++) TRACE("%04x", glyphs[x]); TRACE("\n"); - cnt += analysis->glyphs[item].numGlyphs; /* point to the end of the copied text */ + cnt += analysis->glyphs[analysis->logical2visual[item]].numGlyphs; /* point to the end of the copied text */ } hr = ScriptTextOut(analysis->hdc, (SCRIPT_CACHE *)&analysis->sc, iX, iY, @@ -1102,7 +1114,7 @@ HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, */ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int* pX) { - int i; + int item; int runningX = 0; StringAnalysis* analysis = ssa; @@ -1117,10 +1129,13 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai return E_INVALIDARG; } - for(i=0; i<analysis->numItems; i++) + for(item=0; item<analysis->numItems; item++) { - int CP = analysis->pItem[i+1].iCharPos - analysis->pItem[i].iCharPos; + int CP, i; int offset; + + i = analysis->logical2visual[item]; + CP = analysis->pItem[i+1].iCharPos - analysis->pItem[i].iCharPos; /* initialize max extents for uninitialized runs */ if (analysis->glyphs[i].iMaxPosX == -1) { @@ -1134,13 +1149,13 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai &analysis->pItem[i].a, &analysis->glyphs[i].iMaxPosX); } - if (icp >= CP) + if (icp >= analysis->pItem[i+1].iCharPos || icp < analysis->pItem[i].iCharPos) { runningX += analysis->glyphs[i].iMaxPosX; - icp -= CP; continue; } + icp -= analysis->pItem[i].iCharPos; ScriptCPtoX(icp, fTrailing, CP, analysis->glyphs[i].numGlyphs, analysis->glyphs[i].pwLogClust, analysis->glyphs[i].psva, analysis->glyphs[i].piAdvance, &analysis->pItem[i].a, &offset); @@ -1162,8 +1177,7 @@ HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrai HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int* piCh, int* piTrailing) { StringAnalysis* analysis = ssa; - int i; - int runningCp = 0; + int item; TRACE("(%p), %d, (%p), (%p)\n", ssa, iX, piCh, piTrailing); @@ -1185,9 +1199,15 @@ HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int* piCh, return S_OK; } - for(i=0; i<analysis->numItems; i++) + for(item=0; item<analysis->numItems; item++) { - int CP = analysis->pItem[i+1].iCharPos - analysis->pItem[i].iCharPos; + int i; + int CP; + + for (i = 0; i < analysis->numItems && analysis->logical2visual[i] != item; i++) + /* nothing */; + + CP = analysis->pItem[i+1].iCharPos - analysis->pItem[i].iCharPos; /* initialize max extents for uninitialized runs */ if (analysis->glyphs[i].iMaxPosX == -1) { @@ -1204,14 +1224,13 @@ HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int* piCh, if (iX > analysis->glyphs[i].iMaxPosX) { iX -= analysis->glyphs[i].iMaxPosX; - runningCp += CP; continue; } ScriptXtoCP(iX, CP, analysis->glyphs[i].numGlyphs, analysis->glyphs[i].pwLogClust, analysis->glyphs[i].psva, analysis->glyphs[i].piAdvance, &analysis->pItem[i].a, piCh, piTrailing); - *piCh += runningCp; + *piCh += analysis->pItem[i].iCharPos; return S_OK; } @@ -1264,6 +1283,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) heap_free(analysis->logattrs); heap_free(analysis->sz); heap_free(analysis->sc); + heap_free(analysis->logical2visual); heap_free(analysis); if (invalid) return E_INVALIDARG;
1
0
0
0
Alistair Leslie-Hughes : advapi32: Cleanup event log only if create was successful.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: 6dcae92ca13f0f4443e01c224359966222d4012c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6dcae92ca13f0f4443e01c224…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Aug 29 08:28:40 2011 +1000 advapi32: Cleanup event log only if create was successful. --- dlls/advapi32/tests/eventlog.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 5b46eaf..543b41c 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -1147,6 +1147,6 @@ START_TEST(eventlog) { test_readwrite(); test_autocreation(); + cleanup_eventlog(); } - cleanup_eventlog(); }
1
0
0
0
Octavian Voicu : winefile: Don' t parse colons as stream separators when splitting paths.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: a966945d984741f3d9580c44b8d48851ebc51f5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a966945d984741f3d9580c44b…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Sun Aug 28 01:39:31 2011 +0300 winefile: Don't parse colons as stream separators when splitting paths. --- programs/winefile/splitpath.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/programs/winefile/splitpath.c b/programs/winefile/splitpath.c index 7425147..20d7ded 100644 --- a/programs/winefile/splitpath.c +++ b/programs/winefile/splitpath.c @@ -35,9 +35,7 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* } else if (drv) *drv = '\0'; - /* search for end of string or stream separator */ - for(end=path; *end && *end!=':'; ) - end++; + end = path + lstrlenW(path); /* search for begin of file extension */ for(p=end; p>path && *--p!='\\' && *p!='/'; )
1
0
0
0
Octavian Voicu : cmd: Don' t parse colons as stream separators when splitting paths.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: 94d2312fe2fdd77669ac826afa24e6821571ebba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94d2312fe2fdd77669ac826af…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Sun Aug 28 01:39:30 2011 +0300 cmd: Don't parse colons as stream separators when splitting paths. --- programs/cmd/batch.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index 03c92ee..f010f28 100644 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -222,9 +222,7 @@ void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHA } else if (drv) *drv = '\0'; - /* search for end of string or stream separator */ - for(end=path; *end && *end!=':'; ) - end++; + end = path + strlenW(path); /* search for begin of file extension */ for(p=end; p>path && *--p!='\\' && *p!='/'; )
1
0
0
0
Stefan Dösinger : ddraw: Emulate a 24 bit depth format without stencil or padding.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: 899b2785581d3ba2cc48d5c9abdccf6bb63943ca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=899b2785581d3ba2cc48d5c9a…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Aug 26 13:40:04 2011 +0200 ddraw: Emulate a 24 bit depth format without stencil or padding. --- dlls/ddraw/ddraw.c | 18 ++++++++ dlls/ddraw/tests/d3d.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/utils.c | 3 +- 3 files changed, 125 insertions(+), 1 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index d1754ec..a404d4f 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -5120,6 +5120,24 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device } } } + + /* Historically some windows drivers used dwZBufferBitDepth=24 for WINED3DFMT_X8D24_UNORM, + * while others used dwZBufferBitDepth=32. In either case the pitch matches a 32 bits per + * pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and + * newer enumerate both versions, so we do the same(bug 22434) */ + hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, d3ddm.Format, + WINED3DUSAGE_DEPTHSTENCIL, WINED3DRTYPE_SURFACE, WINED3DFMT_X8D24_UNORM, SURFACE_OPENGL); + if (SUCCEEDED(hr)) + { + DDPIXELFORMAT x8d24 = + { + sizeof(x8d24), DDPF_ZBUFFER, 0, + {24}, {0x00000000}, {0x00ffffff}, {0x00000000} + }; + TRACE("Enumerating WINED3DFMT_X8D24_UNORM, dwZBufferBitDepth=24 version\n"); + callback(&x8d24, context); + } + TRACE("End of enumeration.\n"); LeaveCriticalSection(&ddraw_cs); diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 8946d48..a916f29 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -4361,6 +4361,110 @@ done: UnregisterClassA("d3d7_test_wndproc_wc", GetModuleHandleA(NULL)); } +static void dump_format(const DDPIXELFORMAT *fmt) +{ + trace("dwFlags %08x, FourCC %08x, dwZBufferBitDepth %u, stencil %08x\n", fmt->dwFlags, fmt->dwFourCC, + fmt->dwZBufferBitDepth, fmt->dwStencilBitDepth); + trace("dwZBitMask %08x, dwStencilBitMask %08x, dwRGBZBitMask %08x\n", fmt->dwZBitMask, + fmt->dwStencilBitMask, fmt->dwRGBZBitMask); +} + +HRESULT WINAPI enum_z_fmt_cb(DDPIXELFORMAT *fmt, void *ctx) +{ + static const DDPIXELFORMAT formats[] = + { + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, + {16}, {0}, {0x0000ffff}, {0x00000000}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, + {32}, {0}, {0xffffff00}, {0x00000000}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER | DDPF_STENCILBUFFER, 0, + {32}, {8}, {0xffffff00}, {0x000000ff}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, + {32}, {0}, {0x00ffffff}, {0x00000000}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER | DDPF_STENCILBUFFER, 0, + {32}, {8}, {0x00ffffff}, {0xff000000}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, + {24}, {0}, {0x00ffffff}, {0x00000000}, {0x00000000} + }, + { + sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, + {32}, {0}, {0xffffffff}, {0x00000000}, {0x00000000} + }, + }; + unsigned int *count = ctx, i, expected_pitch; + DDSURFACEDESC2 ddsd; + IDirectDrawSurface7 *surface; + HRESULT hr; + (*count)++; + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; + ddsd.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; + ddsd.ddpfPixelFormat = *fmt; + ddsd.dwWidth = 1024; + ddsd.dwHeight = 1024; + hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &surface, NULL); + ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#x.\n", hr); + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); + ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc failed, hr %#x.\n", hr); + IDirectDrawSurface7_Release(surface); + + ok(ddsd.dwFlags & DDSD_PIXELFORMAT, "DDSD_PIXELFORMAT is not set\n"); + ok(!(ddsd.dwFlags & DDSD_ZBUFFERBITDEPTH), "DDSD_ZBUFFERBITDEPTH is set\n"); + + /* 24 bit unpadded depth buffers are actually padded(Geforce 9600, Win7, + * Radeon 9000M WinXP) */ + if (fmt->dwZBufferBitDepth == 24) expected_pitch = ddsd.dwWidth * 4; + else expected_pitch = ddsd.dwWidth * fmt->dwZBufferBitDepth / 8; + + /* Some formats(16 bit depth without stencil) return pitch 0 */ + if (ddsd.lPitch != 0 && ddsd.lPitch != expected_pitch) + { + ok(0, "Z buffer pitch is %u, expected %u\n", ddsd.lPitch, expected_pitch); + dump_format(fmt); + } + + for (i = 0; i < (sizeof(formats)/sizeof(*formats)); i++) + { + if (memcmp(&formats[i], fmt, fmt->dwSize) == 0) return DDENUMRET_OK; + } + + ok(0, "Unexpected Z format enumerated\n"); + dump_format(fmt); + + return DDENUMRET_OK; +} + +static void z_format_test(void) +{ + unsigned int count = 0; + HRESULT hr; + + hr = IDirect3D7_EnumZBufferFormats(lpD3D, &IID_IDirect3DHALDevice, enum_z_fmt_cb, &count); + if (hr == DDERR_NOZBUFFERHW) + { + skip("Z buffers not supported, skipping Z buffer format test\n"); + return; + } + + ok(SUCCEEDED(hr), "IDirect3D7_EnumZBufferFormats failed, hr %#x.\n", hr); + ok(count, "Expected at least one supported Z Buffer format\n"); +} + START_TEST(d3d) { init_function_pointers(); @@ -4387,6 +4491,7 @@ START_TEST(d3d) DeviceLoadTest(); SetRenderTargetTest(); VertexBufferLockRest(); + z_format_test(); ReleaseDirect3D(); } diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 94e4ac0..0bd1ee4 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -559,7 +559,8 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat return WINED3DFMT_D16_UNORM; case 24: - FIXME("24 Bit depth buffer, treating like a 32 bit one\n"); + return WINED3DFMT_X8D24_UNORM; + case 32: if(DDPixelFormat->u3.dwZBitMask == 0x00FFFFFF) { return WINED3DFMT_X8D24_UNORM;
1
0
0
0
Stefan Dösinger : ddraw: Trust wined3d to give us what we asked for.
by Alexandre Julliard
29 Aug '11
29 Aug '11
Module: wine Branch: master Commit: caff742d413bb3579101654bd18d1aa0c7f5bfc2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=caff742d413bb3579101654bd…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Aug 26 02:12:10 2011 +0200 ddraw: Trust wined3d to give us what we asked for. --- dlls/ddraw/surface.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 1f25437..64a8e15 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5112,8 +5112,6 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface) HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddraw, DDSURFACEDESC2 *desc, UINT mip_level, WINED3DSURFTYPE surface_type, UINT version) { - struct wined3d_resource_desc wined3d_desc; - struct wined3d_resource *wined3d_resource; WINED3DPOOL pool = WINED3DPOOL_DEFAULT; enum wined3d_format_id format; DWORD usage = 0; @@ -5215,15 +5213,6 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr return hr; } - wined3d_resource = wined3d_surface_get_resource(surface->wined3d_surface); - wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); - - format = wined3d_desc.format; - if (format == WINED3DFMT_UNKNOWN) - { - FIXME("IWineD3DSurface::GetDesc returned WINED3DFMT_UNKNOWN.\n"); - } - /* Anno 1602 stores the pitch right after surface creation, so make sure * it's there. TODO: Test other fourcc formats. */ if (format == WINED3DFMT_DXT1 || format == WINED3DFMT_DXT2 || format == WINED3DFMT_DXT3 @@ -5232,11 +5221,11 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr surface->surface_desc.dwFlags |= DDSD_LINEARSIZE; if (format == WINED3DFMT_DXT1) { - surface->surface_desc.u1.dwLinearSize = max(4, wined3d_desc.width) * max(4, wined3d_desc.height) / 2; + surface->surface_desc.u1.dwLinearSize = max(4, desc->dwWidth) * max(4, desc->dwHeight) / 2; } else { - surface->surface_desc.u1.dwLinearSize = max(4, wined3d_desc.width) * max(4, wined3d_desc.height); + surface->surface_desc.u1.dwLinearSize = max(4, desc->dwWidth) * max(4, desc->dwHeight); } } else
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
77
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Results per page:
10
25
50
100
200