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
July 2012
----- 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
712 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Use proper task_magic in async_open.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 35710be1284f3d9be1668ebb1306ea3a79862d67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35710be1284f3d9be1668ebb1…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 13 14:44:24 2012 +0200 mshtml: Use proper task_magic in async_open. --- dlls/mshtml/nsio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 483f41d..b2a8aaa 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1027,7 +1027,7 @@ static nsresult async_open(nsChannel *This, HTMLOuterWindow *window, BOOL is_doc task->window = window->base.inner_window; task->bscallback = bscallback; - push_task(&task->header, start_binding_proc, start_binding_task_destr, window->base.inner_window->doc->basedoc.task_magic); + push_task(&task->header, start_binding_proc, start_binding_task_destr, window->base.inner_window->task_magic); } return NS_OK;
1
0
0
0
Henri Verbeet : winex11: Fix the virtual desktop check in update_desktop_fullscreen().
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 401d12085bc897e973badee3260aa41389c63c8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=401d12085bc897e973badee32…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 13 12:53:11 2012 +0200 winex11: Fix the virtual desktop check in update_desktop_fullscreen(). --- dlls/winex11.drv/desktop.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 81a64b1..c75c54c 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -208,7 +208,7 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height) Display *display = thread_display(); XEvent xev; - if (!display || root_window != DefaultRootWindow( display )) return; + if (!display || root_window == DefaultRootWindow( display )) return; xev.xclient.type = ClientMessage; xev.xclient.window = root_window;
1
0
0
0
Henri Verbeet : winex11: Simplify the XRandR mode matching code a bit.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 92e04256a91b77483cfa7dd6ca17459091046862 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92e04256a91b77483cfa7dd6c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 13 12:53:10 2012 +0200 winex11: Simplify the XRandR mode matching code a bit. --- dlls/winex11.drv/xrandr.c | 130 +++++++++++++++++++-------------------------- 1 files changed, 54 insertions(+), 76 deletions(-) diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 83137a4..dfe392e 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -50,12 +50,8 @@ MAKE_FUNCPTR(XRRSizes) extern int usexrandr; static struct x11drv_mode_info *dd_modes; -static unsigned int dd_mode_count; -static XRRScreenSize *real_xrandr_sizes; -static short **real_xrandr_rates; -static int real_xrandr_sizes_count; -static int *real_xrandr_rates_count; -static unsigned int real_xrandr_modes_count; +static SizeID *xrandr_modes; +static unsigned int xrandr_mode_count; static int load_xrandr(void) { @@ -112,15 +108,13 @@ static int X11DRV_XRandR_GetCurrentMode(void) rate = pXRRConfigCurrentRate (sc); pXRRFreeScreenConfigInfo(sc); wine_tsx11_unlock(); - for (i = 0; i < real_xrandr_modes_count; i++) + for (i = 0; i < xrandr_mode_count; ++i) { - if ( (dd_modes[i].width == real_xrandr_sizes[size].width ) && - (dd_modes[i].height == real_xrandr_sizes[size].height) && - (dd_modes[i].refresh_rate == rate ) ) - { - res = i; - break; - } + if (xrandr_modes[i] == size && dd_modes[i].refresh_rate == rate) + { + res = i; + break; + } } if (res == -1) { @@ -136,52 +130,28 @@ static LONG X11DRV_XRandR_SetCurrentMode(int mode) Rotation rot; Window root; XRRScreenConfiguration *sc; - Status stat = RRSetConfigSuccess; + Status stat; short rate; - unsigned int i; - int j; wine_tsx11_lock(); root = RootWindow (gdi_display, DefaultScreen(gdi_display)); sc = pXRRGetScreenInfo (gdi_display, root); size = pXRRConfigCurrentConfiguration (sc, &rot); - mode = mode%real_xrandr_modes_count; + mode = mode % xrandr_mode_count; TRACE("Changing Resolution to %dx%d @%d Hz\n", dd_modes[mode].width, dd_modes[mode].height, dd_modes[mode].refresh_rate); - for (i = 0; i < real_xrandr_sizes_count; i++) - { - if ( (dd_modes[mode].width == real_xrandr_sizes[i].width ) && - (dd_modes[mode].height == real_xrandr_sizes[i].height) ) - { - size = i; - if (real_xrandr_rates_count[i]) - { - for (j=0; j < real_xrandr_rates_count[i]; j++) - { - if (dd_modes[mode].refresh_rate == real_xrandr_rates[i][j]) - { - rate = real_xrandr_rates[i][j]; - TRACE("Resizing X display to %dx%d @%d Hz\n", - dd_modes[mode].width, dd_modes[mode].height, rate); - stat = pXRRSetScreenConfigAndRate (gdi_display, sc, root, - size, rot, rate, CurrentTime); - break; - } - } - } - else - { - TRACE("Resizing X display to %dx%d <default Hz>\n", - dd_modes[mode].width, dd_modes[mode].height); - stat = pXRRSetScreenConfig (gdi_display, sc, root, size, rot, CurrentTime); - } - break; - } - } + size = xrandr_modes[mode]; + rate = dd_modes[mode].refresh_rate; + + if (rate) + stat = pXRRSetScreenConfigAndRate( gdi_display, sc, root, size, rot, rate, CurrentTime ); + else + stat = pXRRSetScreenConfig( gdi_display, sc, root, size, rot, CurrentTime ); + pXRRFreeScreenConfigInfo(sc); wine_tsx11_unlock(); if (stat == RRSetConfigSuccess) @@ -196,30 +166,29 @@ static LONG X11DRV_XRandR_SetCurrentMode(int mode) static void xrandr_init_modes(void) { + XRRScreenSize *sizes; + int sizes_count; int i, j, nmodes = 0; - real_xrandr_sizes = pXRRSizes( gdi_display, DefaultScreen(gdi_display), &real_xrandr_sizes_count); - if (real_xrandr_sizes_count <= 0) return; + sizes = pXRRSizes( gdi_display, DefaultScreen(gdi_display), &sizes_count ); + if (sizes_count <= 0) return; - TRACE("XRandR: found %u sizes.\n", real_xrandr_sizes_count); - real_xrandr_rates = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(short *) * real_xrandr_sizes_count ); - real_xrandr_rates_count = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(int) * real_xrandr_sizes_count ); - for (i = 0; i < real_xrandr_sizes_count; ++i) + TRACE("XRandR: found %d sizes.\n", sizes_count); + for (i = 0; i < sizes_count; ++i) { - real_xrandr_rates[i] = pXRRRates( gdi_display, DefaultScreen(gdi_display), - i, &real_xrandr_rates_count[i] ); - TRACE("- at %d: %dx%d (%d rates):", i, real_xrandr_sizes[i].width, - real_xrandr_sizes[i].height, real_xrandr_rates_count[i]); - if (real_xrandr_rates_count[i]) + int rates_count; + short *rates; + + rates = pXRRRates( gdi_display, DefaultScreen(gdi_display), i, &rates_count ); + TRACE("- at %d: %dx%d (%d rates):", i, sizes[i].width, sizes[i].height, rates_count); + if (rates_count) { - nmodes += real_xrandr_rates_count[i]; - for (j = 0; j < real_xrandr_rates_count[i]; ++j) + nmodes += rates_count; + for (j = 0; j < rates_count; ++j) { if (j > 0) TRACE(","); - TRACE(" %d", real_xrandr_rates[i][j]); + TRACE(" %d", rates[j]); } } else @@ -230,37 +199,46 @@ static void xrandr_init_modes(void) TRACE(" Hz\n"); } - real_xrandr_modes_count = nmodes; TRACE("XRandR modes: count=%d\n", nmodes); + if (!(xrandr_modes = HeapAlloc( GetProcessHeap(), 0, sizeof(*xrandr_modes) * nmodes ))) + { + ERR("Failed to allocate xrandr mode info array.\n"); + return; + } + dd_modes = X11DRV_Settings_SetHandlers( "XRandR", X11DRV_XRandR_GetCurrentMode, X11DRV_XRandR_SetCurrentMode, nmodes, 1 ); - for (i = 0; i < real_xrandr_sizes_count; ++i) + xrandr_mode_count = 0; + for (i = 0; i < sizes_count; ++i) { - if (real_xrandr_rates_count[i]) + int rates_count; + short *rates; + + rates = pXRRRates( gdi_display, DefaultScreen(gdi_display), i, &rates_count ); + + if (rates_count) { - for (j = 0; j < real_xrandr_rates_count[i]; ++j) + for (j = 0; j < rates_count; ++j) { - X11DRV_Settings_AddOneMode( real_xrandr_sizes[i].width, - real_xrandr_sizes[i].height, - 0, real_xrandr_rates[i][j] ); + X11DRV_Settings_AddOneMode( sizes[i].width, sizes[i].height, 0, rates[j] ); + xrandr_modes[xrandr_mode_count++] = i; } } else { - X11DRV_Settings_AddOneMode( real_xrandr_sizes[i].width, - real_xrandr_sizes[i].height, - 0, 0 ); + X11DRV_Settings_AddOneMode( sizes[i].width, sizes[i].height, 0, 0 ); + xrandr_modes[xrandr_mode_count++] = i; } } X11DRV_Settings_AddDepthModes(); - dd_mode_count = X11DRV_Settings_GetModeCount(); + nmodes = X11DRV_Settings_GetModeCount(); - TRACE("Available DD modes: count=%d\n", dd_mode_count); + TRACE("Available DD modes: count=%d\n", nmodes); TRACE("Enabling XRandR\n"); }
1
0
0
0
Henri Verbeet : ddraw: Create texture surfaces from device_parent_create_texture_surface().
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: e5bb2e7d8bcaf4bf1d1da28773ba19686232aeff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5bb2e7d8bcaf4bf1d1da2877…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 13 12:53:09 2012 +0200 ddraw: Create texture surfaces from device_parent_create_texture_surface(). Instead of creating them in advance and hoping we can find them back later. --- dlls/ddraw/ddraw.c | 246 ++++++++++++++++++-------------------------------- dlls/ddraw/surface.c | 39 ++++++++- 2 files changed, 124 insertions(+), 161 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e5bb2e7d8bcaf4bf1d1da…
1
0
0
0
Henri Verbeet : ddraw: Get rid of some redundant TRACE_ON invocations.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: d4fa0d8de292db5c25563646a8797e0d0c2b7ca0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4fa0d8de292db5c25563646a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 13 12:53:08 2012 +0200 ddraw: Get rid of some redundant TRACE_ON invocations. --- dlls/ddraw/surface.c | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 3f9f78f..bb594be 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -712,14 +712,11 @@ static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *ifa surf = This->complex_array[i]; if(!surf) break; - if (TRACE_ON(ddraw)) - { - TRACE("Surface: (%p) caps: %x,%x,%x,%x\n", surf, - surf->surface_desc.ddsCaps.dwCaps, - surf->surface_desc.ddsCaps.dwCaps2, - surf->surface_desc.ddsCaps.dwCaps3, - surf->surface_desc.ddsCaps.dwCaps4); - } + TRACE("Surface: (%p) caps: %#x, %#x, %#x, %#x.\n", surf, + surf->surface_desc.ddsCaps.dwCaps, + surf->surface_desc.ddsCaps.dwCaps2, + surf->surface_desc.ddsCaps.dwCaps3, + surf->surface_desc.ddsCaps.dwCaps4); if (((surf->surface_desc.ddsCaps.dwCaps & our_caps.dwCaps) == our_caps.dwCaps) && ((surf->surface_desc.ddsCaps.dwCaps2 & our_caps.dwCaps2) == our_caps.dwCaps2)) { @@ -745,14 +742,11 @@ static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *ifa while( (surf = surf->next_attached) ) { - if (TRACE_ON(ddraw)) - { - TRACE("Surface: (%p) caps: %x,%x,%x,%x\n", surf, - surf->surface_desc.ddsCaps.dwCaps, - surf->surface_desc.ddsCaps.dwCaps2, - surf->surface_desc.ddsCaps.dwCaps3, - surf->surface_desc.ddsCaps.dwCaps4); - } + TRACE("Surface: (%p) caps: %#x, %#x, %#x, %#x.\n", surf, + surf->surface_desc.ddsCaps.dwCaps, + surf->surface_desc.ddsCaps.dwCaps2, + surf->surface_desc.ddsCaps.dwCaps3, + surf->surface_desc.ddsCaps.dwCaps4); if (((surf->surface_desc.ddsCaps.dwCaps & our_caps.dwCaps) == our_caps.dwCaps) && ((surf->surface_desc.ddsCaps.dwCaps2 & our_caps.dwCaps2) == our_caps.dwCaps2)) {
1
0
0
0
Henri Verbeet : ddraw: Get rid of the "tex_root" hack.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 46a9a7e54814a28cb57a5ed3675bcef909cdf8af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46a9a7e54814a28cb57a5ed36…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jul 13 12:53:07 2012 +0200 ddraw: Get rid of the "tex_root" hack. --- dlls/ddraw/ddraw.c | 13 +++++-------- dlls/ddraw/ddraw_private.h | 3 --- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 7b72e5e..838652f 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -3093,11 +3093,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, /* Create a WineD3DTexture if a texture was requested */ if (desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE) - { - ddraw->tex_root = object; ddraw_surface_create_texture(object); - ddraw->tex_root = NULL; - } return hr; } @@ -5364,15 +5360,16 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, enum wined3d_pool pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface) { - struct ddraw *ddraw = ddraw_from_device_parent(device_parent); + struct ddraw_surface *tex_root = container_parent; struct ddraw_surface *surf = NULL; + DDSCAPS2 searchcaps; UINT i = 0; - DDSCAPS2 searchcaps = ddraw->tex_root->surface_desc.ddsCaps; TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" "\tpool %#x, level %u, face %u, surface %p.\n", device_parent, container_parent, width, height, format, usage, pool, level, face, surface); + searchcaps = tex_root->surface_desc.ddsCaps; searchcaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES; switch (face) { @@ -5382,7 +5379,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ { searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX; } - surf = ddraw->tex_root; break; + surf = tex_root; break; case WINED3D_CUBEMAP_FACE_NEGATIVE_X: TRACE("Asked for negative x\n"); searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEX; break; @@ -5405,7 +5402,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ if (!surf) { IDirectDrawSurface7 *attached; - IDirectDrawSurface7_GetAttachedSurface(&ddraw->tex_root->IDirectDrawSurface7_iface, &searchcaps, &attached); + IDirectDrawSurface7_GetAttachedSurface(&tex_root->IDirectDrawSurface7_iface, &searchcaps, &attached); surf = unsafe_impl_from_IDirectDrawSurface7(attached); IDirectDrawSurface7_Release(attached); } diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 0688d07..563377f 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -92,9 +92,6 @@ struct ddraw HWND devicewindow; HWND dest_window; - /* Helpers for surface creation */ - struct ddraw_surface *tex_root; - /* For the dll unload cleanup code */ struct list ddraw_list_entry; /* The surface list - can't relay this to WineD3D
1
0
0
0
Nikolay Sivov : ole32: COM cleanup for IStorage interface of base storage implementation.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 0c658860b12213d4ce6d972cde27398da5398e3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c658860b12213d4ce6d972cd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 13 14:37:58 2012 +0400 ole32: COM cleanup for IStorage interface of base storage implementation. --- dlls/ole32/stg_prop.c | 2 +- dlls/ole32/storage32.c | 135 +++++++++++++++++++++-------------------------- dlls/ole32/storage32.h | 16 ++---- 3 files changed, 66 insertions(+), 87 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0c658860b12213d4ce6d9…
1
0
0
0
Nikolay Sivov : ole32: Simplify storage root entry name initialization.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 08303391e91deefbf6785ca202d653f638910eb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08303391e91deefbf6785ca20…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 13 12:01:53 2012 +0400 ole32: Simplify storage root entry name initialization. --- dlls/ole32/storage32.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 47341f7..584f492 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -65,8 +65,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage); static const BYTE STORAGE_magic[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1}; static const BYTE STORAGE_oldmagic[8] ={0xd0,0xcf,0x11,0xe0,0x0e,0x11,0xfc,0x0d}; -static const char rootEntryName[] = "Root Entry"; - /**************************************************************************** * Storage32InternalImpl definitions. * @@ -2874,21 +2872,21 @@ static HRESULT StorageImpl_Construct( */ if (create) { + static const WCHAR rootentryW[] = {'R','o','o','t',' ','E','n','t','r','y',0}; DirEntry rootEntry; /* * Initialize the directory table */ memset(&rootEntry, 0, sizeof(rootEntry)); - MultiByteToWideChar( CP_ACP, 0, rootEntryName, -1, rootEntry.name, - sizeof(rootEntry.name)/sizeof(WCHAR) ); - rootEntry.sizeOfNameString = (strlenW(rootEntry.name)+1) * sizeof(WCHAR); + strcpyW(rootEntry.name, rootentryW); + rootEntry.sizeOfNameString = sizeof(rootentryW); rootEntry.stgType = STGTY_ROOT; - rootEntry.leftChild = DIRENTRY_NULL; - rootEntry.rightChild = DIRENTRY_NULL; + rootEntry.leftChild = DIRENTRY_NULL; + rootEntry.rightChild = DIRENTRY_NULL; rootEntry.dirRootEntry = DIRENTRY_NULL; rootEntry.startingBlock = BLOCK_END_OF_CHAIN; - rootEntry.size.u.HighPart = 0; - rootEntry.size.u.LowPart = 0; + rootEntry.size.u.HighPart = 0; + rootEntry.size.u.LowPart = 0; StorageImpl_WriteDirEntry(This, 0, &rootEntry); }
1
0
0
0
Nikolay Sivov : ole32: Implement GetConvertStg().
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: 7b373edb81306fa82385fde5501df69166d3d406 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b373edb81306fa82385fde55…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 13 11:56:26 2012 +0400 ole32: Implement GetConvertStg(). --- dlls/ole32/storage32.c | 36 +++++++++++++++++++++++++++++++++--- dlls/ole32/tests/storage32.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 95850d1..47341f7 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9400,12 +9400,42 @@ HRESULT WINAPI OleConvertIStorageToOLESTREAM ( return hRes; } +enum stream_1ole_flags { + OleStream_LinkedObject = 0x00000001, + OleStream_Convert = 0x00000100 +}; + /*********************************************************************** * GetConvertStg (OLE32.@) */ -HRESULT WINAPI GetConvertStg(IStorage *stg) { - FIXME("unimplemented stub!\n"); - return E_FAIL; +HRESULT WINAPI GetConvertStg(IStorage *stg) +{ + static const WCHAR stream_1oleW[] = {1,'O','l','e',0}; + static const DWORD version_magic = 0x02000001; + DWORD header[2]; + IStream *stream; + HRESULT hr; + ULONG len; + + TRACE("%p\n", stg); + + if (!stg) return E_INVALIDARG; + + hr = IStorage_OpenStream(stg, stream_1oleW, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream); + if (FAILED(hr)) return hr; + + len = 0; + hr = IStream_Read(stream, header, sizeof(header), &len); + IStream_Release(stream); + if (FAILED(hr)) return hr; + + if (header[0] != version_magic) + { + ERR("got wrong version magic for \1Ole stream, 0x%08x\n", header[0]); + return E_FAIL; + } + + return header[1] & OleStream_Convert ? S_OK : S_FALSE; } /****************************************************************************** diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index bc0cc25..86b8d8e 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -2995,6 +2995,34 @@ static void test_hglobal_storage_creation(void) ILockBytes_Release(ilb); } +static void test_convert(void) +{ + static const WCHAR filename[] = {'s','t','o','r','a','g','e','.','s','t','g',0}; + IStorage *stg; + HRESULT hr; + + hr = GetConvertStg(NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); + ok(hr == S_OK, "StgCreateDocfile failed\n"); + hr = GetConvertStg(stg); + ok(hr == STG_E_FILENOTFOUND, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, TRUE); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = GetConvertStg(stg); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = GetConvertStg(stg); + ok(hr == S_FALSE, "got 0x%08x\n", hr); +} + IStorage_Release(stg); + + DeleteFileW(filename); +} + START_TEST(storage32) { CHAR temp[MAX_PATH]; @@ -3038,4 +3066,5 @@ START_TEST(storage32) test_copyto_locking(); test_copyto_recursive(); test_hglobal_storage_creation(); + test_convert(); }
1
0
0
0
Nikolay Sivov : ole32: COM cleanup of storage IStream implementation.
by Alexandre Julliard
13 Jul '12
13 Jul '12
Module: wine Branch: master Commit: ea196ef0eb8994530929ea56576e2e67eaf934dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea196ef0eb8994530929ea565…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 13 09:45:37 2012 +0400 ole32: COM cleanup of storage IStream implementation. --- dlls/ole32/stg_stream.c | 58 +++++++++++++++------------------------------- dlls/ole32/storage32.c | 23 ++++++++++++------ dlls/ole32/storage32.h | 17 ++++++------- 3 files changed, 42 insertions(+), 56 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index b09ba5b..019a789 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -74,9 +74,6 @@ static void StgStreamImpl_Destroy(StgStreamImpl* This) This->parentStorage = 0; - /* - * Finally, free the memory used-up by the class. - */ HeapFree(GetProcessHeap(), 0, This); } @@ -89,41 +86,24 @@ static HRESULT WINAPI StgStreamImpl_QueryInterface( REFIID riid, /* [in] */ void** ppvObject) /* [iid_is][out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); - /* - * Perform a sanity check on the parameters. - */ if (ppvObject==0) return E_INVALIDARG; - /* - * Initialize the return parameter. - */ *ppvObject = 0; - /* - * Compare the riid with the interface IDs implemented by this object. - */ if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IPersist, riid) || IsEqualIID(&IID_IPersistStream, riid) || IsEqualIID(&IID_ISequentialStream, riid) || IsEqualIID(&IID_IStream, riid)) { - *ppvObject = This; + *ppvObject = &This->IStream_iface; } - - /* - * Check that we obtained an interface. - */ - if ((*ppvObject)==0) + else return E_NOINTERFACE; - /* - * Query Interface always increases the reference count by one when it is - * successful - */ IStream_AddRef(iface); return S_OK; @@ -136,7 +116,7 @@ static HRESULT WINAPI StgStreamImpl_QueryInterface( static ULONG WINAPI StgStreamImpl_AddRef( IStream* iface) { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); return InterlockedIncrement(&This->ref); } @@ -147,7 +127,7 @@ static ULONG WINAPI StgStreamImpl_AddRef( static ULONG WINAPI StgStreamImpl_Release( IStream* iface) { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); ULONG ref; @@ -179,7 +159,7 @@ static HRESULT WINAPI StgStreamImpl_Read( ULONG cb, /* [in] */ ULONG* pcbRead) /* [out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); ULONG bytesReadBuffer; HRESULT res; @@ -235,7 +215,7 @@ static HRESULT WINAPI StgStreamImpl_Write( ULONG cb, /* [in] */ ULONG* pcbWritten) /* [out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); ULONG bytesWritten = 0; HRESULT res; @@ -316,7 +296,7 @@ static HRESULT WINAPI StgStreamImpl_Seek( DWORD dwOrigin, /* [in] */ ULARGE_INTEGER* plibNewPosition) /* [out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); ULARGE_INTEGER newPosition; DirEntry currentEntry; @@ -389,7 +369,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize( IStream* iface, ULARGE_INTEGER libNewSize) /* [in] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); HRESULT hr; @@ -441,7 +421,7 @@ static HRESULT WINAPI StgStreamImpl_CopyTo( ULARGE_INTEGER* pcbRead, /* [out] */ ULARGE_INTEGER* pcbWritten) /* [out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); HRESULT hr = S_OK; BYTE tmpBuffer[128]; ULONG bytesRead, bytesWritten, copySize; @@ -516,7 +496,7 @@ static HRESULT WINAPI StgStreamImpl_Commit( IStream* iface, DWORD grfCommitFlags) /* [in] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); if (!This->parentStorage) { @@ -547,7 +527,7 @@ static HRESULT WINAPI StgStreamImpl_LockRegion( ULARGE_INTEGER cb, /* [in] */ DWORD dwLockType) /* [in] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); if (!This->parentStorage) { @@ -565,7 +545,7 @@ static HRESULT WINAPI StgStreamImpl_UnlockRegion( ULARGE_INTEGER cb, /* [in] */ DWORD dwLockType) /* [in] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); if (!This->parentStorage) { @@ -590,7 +570,7 @@ static HRESULT WINAPI StgStreamImpl_Stat( STATSTG* pstatstg, /* [out] */ DWORD grfStatFlag) /* [in] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); DirEntry currentEntry; HRESULT hr; @@ -650,7 +630,7 @@ static HRESULT WINAPI StgStreamImpl_Clone( IStream* iface, IStream** ppstm) /* [out] */ { - StgStreamImpl* const This=(StgStreamImpl*)iface; + StgStreamImpl* This = impl_from_IStream(iface); HRESULT hres; StgStreamImpl* new_stream; LARGE_INTEGER seek_pos; @@ -672,7 +652,7 @@ static HRESULT WINAPI StgStreamImpl_Clone( if (!new_stream) return STG_E_INSUFFICIENTMEMORY; /* Currently the only reason for new_stream=0 */ - *ppstm = (IStream*) new_stream; + *ppstm = &new_stream->IStream_iface; IStream_AddRef(*ppstm); seek_pos.QuadPart = This->currentPosition.QuadPart; @@ -687,7 +667,7 @@ static HRESULT WINAPI StgStreamImpl_Clone( /* * Virtual function table for the StgStreamImpl class. */ -static const IStreamVtbl StgStreamImpl_Vtbl = +static const IStreamVtbl StgStreamVtbl = { StgStreamImpl_QueryInterface, StgStreamImpl_AddRef, @@ -725,12 +705,12 @@ StgStreamImpl* StgStreamImpl_Construct( newStream = HeapAlloc(GetProcessHeap(), 0, sizeof(StgStreamImpl)); - if (newStream!=0) + if (newStream) { /* * Set-up the virtual function table and reference count. */ - newStream->lpVtbl = &StgStreamImpl_Vtbl; + newStream->IStream_iface.lpVtbl = &StgStreamVtbl; newStream->ref = 0; newStream->parentStorage = parentStorage; diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index f233b61..95850d1 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -524,10 +524,10 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream( newStream = StgStreamImpl_Construct(This, grfMode, streamEntryRef); - if (newStream!=0) + if (newStream) { newStream->grfMode = grfMode; - *ppstm = (IStream*)newStream; + *ppstm = &newStream->IStream_iface; IStream_AddRef(*ppstm); @@ -1007,10 +1007,9 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( */ newStream = StgStreamImpl_Construct(This, grfMode, newStreamEntryRef); - if (newStream != 0) + if (newStream) { - *ppstm = (IStream*)newStream; - + *ppstm = &newStream->IStream_iface; IStream_AddRef(*ppstm); } else @@ -1684,11 +1683,19 @@ static HRESULT StorageBaseImpl_CopyChildEntryTo(StorageBaseImpl *This, */ if (hr == S_OK) { - pstrChild = (IStream*)StgStreamImpl_Construct(This, STGM_READ|STGM_SHARE_EXCLUSIVE, srcEntry); - if (pstrChild) - IStream_AddRef(pstrChild); + StgStreamImpl *streamimpl = StgStreamImpl_Construct(This, STGM_READ|STGM_SHARE_EXCLUSIVE, srcEntry); + + if (streamimpl) + { + pstrChild = &streamimpl->IStream_iface; + if (pstrChild) + IStream_AddRef(pstrChild); + } else + { + pstrChild = NULL; hr = E_OUTOFMEMORY; + } } if (hr == S_OK) diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 938bf7b..1e512ef 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -418,26 +418,20 @@ SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks( /**************************************************************************** * StgStreamImpl definitions. * - * This class implements the IStream32 interface and represents a stream + * This class implements the IStream interface and represents a stream * located inside a storage object. */ struct StgStreamImpl { - const IStreamVtbl *lpVtbl; /* Needs to be the first item in the struct - * since we want to cast this to an IStream pointer */ + IStream IStream_iface; + LONG ref; /* * We are an entry in the storage object's stream handler list */ - struct list StrmListEntry; /* - * Reference count - */ - LONG ref; - - /* * Storage that is the parent(owner) of the stream */ StorageBaseImpl* parentStorage; @@ -458,6 +452,11 @@ struct StgStreamImpl ULARGE_INTEGER currentPosition; }; +static inline StgStreamImpl *impl_from_IStream( IStream *iface ) +{ + return CONTAINING_RECORD(iface, StgStreamImpl, IStream_iface); +} + /* * Method definition for the StgStreamImpl class. */
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
72
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
Results per page:
10
25
50
100
200