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
April 2010
----- 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
898 discussions
Start a n
N
ew thread
Michael Stefaniuc : wineconsole: Use the explicit W types/functions in user .c.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: f6217640beb5df871f9cd75467fd660ea3da60cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6217640beb5df871f9cd7546…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Apr 28 01:07:52 2010 +0200 wineconsole: Use the explicit W types/functions in user.c. --- programs/wineconsole/user.c | 162 +++++++++++++++++++++--------------------- 1 files changed, 81 insertions(+), 81 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f6217640beb5df871f9cd…
1
0
0
0
Michael Stefaniuc : wineconsole: Use the explicit W-form of the registry functions.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: cb2f2447ff4cae9a99b7b19824e1c0a37027af63 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb2f2447ff4cae9a99b7b1982…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Apr 28 01:07:32 2010 +0200 wineconsole: Use the explicit W-form of the registry functions. --- programs/wineconsole/registry.c | 64 +++++++++++++++++++------------------- 1 files changed, 32 insertions(+), 32 deletions(-) diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c index 67f7577..2805f2a 100644 --- a/programs/wineconsole/registry.c +++ b/programs/wineconsole/registry.c @@ -88,64 +88,64 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg) DWORD val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszCursorSize, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszCursorSize, 0, &type, (LPBYTE)&val, &count)) cfg->cursor_size = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszCursorVisible, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszCursorVisible, 0, &type, (LPBYTE)&val, &count)) cfg->cursor_visible = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszEditionMode, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszEditionMode, 0, &type, (LPBYTE)&val, &count)) cfg->edition_mode = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszExitOnDie, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszExitOnDie, 0, &type, (LPBYTE)&val, &count)) cfg->exit_on_die = val; count = sizeof(cfg->face_name); - RegQueryValueEx(hConKey, wszFaceName, 0, &type, (LPBYTE)&cfg->face_name, &count); + RegQueryValueExW(hConKey, wszFaceName, 0, &type, (LPBYTE)&cfg->face_name, &count); count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszFontSize, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszFontSize, 0, &type, (LPBYTE)&val, &count)) { cfg->cell_height = HIWORD(val); cfg->cell_width = LOWORD(val); } count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszFontWeight, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszFontWeight, 0, &type, (LPBYTE)&val, &count)) cfg->font_weight = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszHistoryBufferSize, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszHistoryBufferSize, 0, &type, (LPBYTE)&val, &count)) cfg->history_size = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszHistoryNoDup, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszHistoryNoDup, 0, &type, (LPBYTE)&val, &count)) cfg->history_nodup = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszMenuMask, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszMenuMask, 0, &type, (LPBYTE)&val, &count)) cfg->menu_mask = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszQuickEdit, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszQuickEdit, 0, &type, (LPBYTE)&val, &count)) cfg->quick_edit = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszScreenBufferSize, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszScreenBufferSize, 0, &type, (LPBYTE)&val, &count)) { cfg->sb_height = HIWORD(val); cfg->sb_width = LOWORD(val); } count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszScreenColors, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszScreenColors, 0, &type, (LPBYTE)&val, &count)) cfg->def_attr = val; count = sizeof(val); - if (!RegQueryValueEx(hConKey, wszWindowSize, 0, &type, (LPBYTE)&val, &count)) + if (!RegQueryValueExW(hConKey, wszWindowSize, 0, &type, (LPBYTE)&val, &count)) { cfg->win_height = HIWORD(val); cfg->win_width = LOWORD(val); @@ -188,7 +188,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg) cfg->registry = NULL; /* then read global settings */ - if (!RegOpenKey(HKEY_CURRENT_USER, wszConsole, &hConKey)) + if (!RegOpenKeyW(HKEY_CURRENT_USER, wszConsole, &hConKey)) { WINECON_RegLoadHelper(hConKey, cfg); /* if requested, load part related to console title */ @@ -197,7 +197,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg) HKEY hAppKey; cfg->registry = WINECON_CreateKeyName(appname); - if (!RegOpenKey(hConKey, cfg->registry, &hAppKey)) + if (!RegOpenKeyW(hConKey, cfg->registry, &hAppKey)) { WINECON_RegLoadHelper(hAppKey, cfg); RegCloseKey(hAppKey); @@ -220,45 +220,45 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg) WINECON_DumpConfig("save", cfg); val = cfg->cursor_size; - RegSetValueEx(hConKey, wszCursorSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszCursorSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->cursor_visible; - RegSetValueEx(hConKey, wszCursorVisible, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszCursorVisible, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->edition_mode; - RegSetValueEx(hConKey, wszEditionMode, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszEditionMode, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->exit_on_die; - RegSetValueEx(hConKey, wszExitOnDie, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszExitOnDie, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); - RegSetValueEx(hConKey, wszFaceName, 0, REG_SZ, (LPBYTE)&cfg->face_name, sizeof(cfg->face_name)); + RegSetValueExW(hConKey, wszFaceName, 0, REG_SZ, (LPBYTE)&cfg->face_name, sizeof(cfg->face_name)); val = MAKELONG(cfg->cell_width, cfg->cell_height); - RegSetValueEx(hConKey, wszFontSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszFontSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->font_weight; - RegSetValueEx(hConKey, wszFontWeight, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszFontWeight, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->history_size; - RegSetValueEx(hConKey, wszHistoryBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszHistoryBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->history_nodup; - RegSetValueEx(hConKey, wszHistoryNoDup, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszHistoryNoDup, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->menu_mask; - RegSetValueEx(hConKey, wszMenuMask, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszMenuMask, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->quick_edit; - RegSetValueEx(hConKey, wszQuickEdit, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszQuickEdit, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = MAKELONG(cfg->sb_width, cfg->sb_height); - RegSetValueEx(hConKey, wszScreenBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszScreenBufferSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = cfg->def_attr; - RegSetValueEx(hConKey, wszScreenColors, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszScreenColors, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); val = MAKELONG(cfg->win_width, cfg->win_height); - RegSetValueEx(hConKey, wszWindowSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + RegSetValueExW(hConKey, wszWindowSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); } /****************************************************************** @@ -271,7 +271,7 @@ void WINECON_RegSave(const struct config_data* cfg) HKEY hConKey; WINE_TRACE("saving registry settings.\n"); - if (RegCreateKey(HKEY_CURRENT_USER, wszConsole, &hConKey)) + if (RegCreateKeyW(HKEY_CURRENT_USER, wszConsole, &hConKey)) { WINE_ERR("Can't open registry for saving\n"); } @@ -281,7 +281,7 @@ void WINECON_RegSave(const struct config_data* cfg) { HKEY hAppKey; - if (RegCreateKey(hConKey, cfg->registry, &hAppKey)) + if (RegCreateKeyW(hConKey, cfg->registry, &hAppKey)) { WINE_ERR("Can't open registry for saving\n"); }
1
0
0
0
Michael Stefaniuc : progman: Use LANGUAGE as a global setting and not per resource.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 11b8ffc2c925cc6747ad6a85a8af972fdab857e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11b8ffc2c925cc6747ad6a85a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Apr 28 01:07:20 2010 +0200 progman: Use LANGUAGE as a global setting and not per resource. --- programs/progman/Cs.rc | 13 ++++--------- programs/progman/De.rc | 15 +++++---------- programs/progman/En.rc | 15 +++++---------- programs/progman/Fr.rc | 7 +++---- programs/progman/Hu.rc | 13 ++++--------- programs/progman/It.rc | 16 +++++----------- programs/progman/Ko.rc | 15 +++++---------- programs/progman/Nl.rc | 13 ++++--------- programs/progman/No.rc | 15 +++++---------- programs/progman/Si.rc | 15 +++++---------- programs/progman/Sv.rc | 19 +++++++------------ programs/progman/Tr.rc | 13 ++++--------- 12 files changed, 56 insertions(+), 113 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=11b8ffc2c925cc6747ad6…
1
0
0
0
Henri Verbeet : wined3d: Check if the depth/ stencil surface has any valid location at the start of surface_load_ds_location ().
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 83cf1ce8e1c39221013a8f1b2fee751fd59b0cc2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83cf1ce8e1c39221013a8f1b2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 28 00:08:52 2010 +0200 wined3d: Check if the depth/stencil surface has any valid location at the start of surface_load_ds_location(). --- dlls/wined3d/surface.c | 159 +++++++++++++++++++++++------------------------ 1 files changed, 78 insertions(+), 81 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 2e2a925..8a934a8 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4146,106 +4146,103 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_conte return; } + if (!(surface->Flags & SFLAG_LOCATIONS)) + { + FIXME("No up to date depth stencil location.\n"); + surface->Flags |= location; + return; + } + if (location == SFLAG_DS_OFFSCREEN) { - if (surface->Flags & SFLAG_DS_ONSCREEN) - { - GLint old_binding = 0; - GLenum bind_target; + GLint old_binding = 0; + GLenum bind_target; - TRACE("Copying onscreen depth buffer to depth texture.\n"); + TRACE("Copying onscreen depth buffer to depth texture.\n"); - ENTER_GL(); + ENTER_GL(); - if (!device->depth_blt_texture) { - glGenTextures(1, &device->depth_blt_texture); - } + if (!device->depth_blt_texture) + { + glGenTextures(1, &device->depth_blt_texture); + } - /* Note that we use depth_blt here as well, rather than glCopyTexImage2D - * directly on the FBO texture. That's because we need to flip. */ - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); - if (surface->texture_target == GL_TEXTURE_RECTANGLE_ARB) - { - glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); - bind_target = GL_TEXTURE_RECTANGLE_ARB; - } else { - glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); - bind_target = GL_TEXTURE_2D; - } - glBindTexture(bind_target, device->depth_blt_texture); - glCopyTexImage2D(bind_target, surface->texture_level, surface->resource.format_desc->glInternal, - 0, 0, surface->currentDesc.Width, surface->currentDesc.Height, 0); - glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(bind_target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - glTexParameteri(bind_target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); - glBindTexture(bind_target, old_binding); - - /* Setup the destination */ - if (!device->depth_blt_rb) { - gl_info->fbo_ops.glGenRenderbuffers(1, &device->depth_blt_rb); - checkGLcall("glGenRenderbuffersEXT"); - } - if (device->depth_blt_rb_w != surface->currentDesc.Width - || device->depth_blt_rb_h != surface->currentDesc.Height) - { - gl_info->fbo_ops.glBindRenderbuffer(GL_RENDERBUFFER, device->depth_blt_rb); - checkGLcall("glBindRenderbufferEXT"); - gl_info->fbo_ops.glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA8, - surface->currentDesc.Width, surface->currentDesc.Height); - checkGLcall("glRenderbufferStorageEXT"); - device->depth_blt_rb_w = surface->currentDesc.Width; - device->depth_blt_rb_h = surface->currentDesc.Height; - } + /* Note that we use depth_blt here as well, rather than glCopyTexImage2D + * directly on the FBO texture. That's because we need to flip. */ + context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + if (surface->texture_target == GL_TEXTURE_RECTANGLE_ARB) + { + glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); + bind_target = GL_TEXTURE_RECTANGLE_ARB; + } + else + { + glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); + bind_target = GL_TEXTURE_2D; + } + glBindTexture(bind_target, device->depth_blt_texture); + glCopyTexImage2D(bind_target, surface->texture_level, surface->resource.format_desc->glInternal, + 0, 0, surface->currentDesc.Width, surface->currentDesc.Height, 0); + glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(bind_target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + glTexParameteri(bind_target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); + glBindTexture(bind_target, old_binding); + + /* Setup the destination */ + if (!device->depth_blt_rb) + { + gl_info->fbo_ops.glGenRenderbuffers(1, &device->depth_blt_rb); + checkGLcall("glGenRenderbuffersEXT"); + } + if (device->depth_blt_rb_w != surface->currentDesc.Width + || device->depth_blt_rb_h != surface->currentDesc.Height) + { + gl_info->fbo_ops.glBindRenderbuffer(GL_RENDERBUFFER, device->depth_blt_rb); + checkGLcall("glBindRenderbufferEXT"); + gl_info->fbo_ops.glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA8, + surface->currentDesc.Width, surface->currentDesc.Height); + checkGLcall("glRenderbufferStorageEXT"); + device->depth_blt_rb_w = surface->currentDesc.Width; + device->depth_blt_rb_h = surface->currentDesc.Height; + } - context_bind_fbo(context, GL_FRAMEBUFFER, &context->dst_fbo); - gl_info->fbo_ops.glFramebufferRenderbuffer(GL_FRAMEBUFFER, - GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, device->depth_blt_rb); - checkGLcall("glFramebufferRenderbufferEXT"); - context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, surface, FALSE); + context_bind_fbo(context, GL_FRAMEBUFFER, &context->dst_fbo); + gl_info->fbo_ops.glFramebufferRenderbuffer(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, device->depth_blt_rb); + checkGLcall("glFramebufferRenderbufferEXT"); + context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, surface, FALSE); - /* Do the actual blit */ - surface_depth_blt(surface, gl_info, device->depth_blt_texture, - surface->currentDesc.Width, surface->currentDesc.Height, bind_target); - checkGLcall("depth_blt"); + /* Do the actual blit */ + surface_depth_blt(surface, gl_info, device->depth_blt_texture, + surface->currentDesc.Width, surface->currentDesc.Height, bind_target); + checkGLcall("depth_blt"); - if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); - else context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); + else context_bind_fbo(context, GL_FRAMEBUFFER, NULL); - LEAVE_GL(); + LEAVE_GL(); - if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ - } - else - { - FIXME("No up to date depth stencil location\n"); - } + if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ } else if (location == SFLAG_DS_ONSCREEN) { - if (surface->Flags & SFLAG_DS_OFFSCREEN) - { - TRACE("Copying depth texture to onscreen depth buffer.\n"); + TRACE("Copying depth texture to onscreen depth buffer.\n"); - ENTER_GL(); + ENTER_GL(); - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); - surface_depth_blt(surface, gl_info, surface->texture_name, - surface->currentDesc.Width, surface->currentDesc.Height, surface->texture_target); - checkGLcall("depth_blt"); + context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + surface_depth_blt(surface, gl_info, surface->texture_name, + surface->currentDesc.Width, surface->currentDesc.Height, surface->texture_target); + checkGLcall("depth_blt"); - if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); + if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); - LEAVE_GL(); + LEAVE_GL(); - if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ - } - else - { - FIXME("No up to date depth stencil location\n"); - } + if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ } else {
1
0
0
0
Henri Verbeet : wined3d: Make "clear_rect" a RECT in IWineD3DDeviceImpl_ClearSurface().
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 7b80c7d8c02a9efa2617de90f21cd6c3177a3ac5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b80c7d8c02a9efa2617de90f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 28 00:08:51 2010 +0200 wined3d: Make "clear_rect" a RECT in IWineD3DDeviceImpl_ClearSurface(). --- dlls/wined3d/device.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8e9e225..f285053 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4354,7 +4354,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, return WINED3D_OK; } -static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, const WINED3DRECT *clear_rect) +static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, const RECT *clear_rect) { /* partial draw rect */ if (draw_rect->left || draw_rect->top @@ -4363,9 +4363,9 @@ static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, co return FALSE; /* partial clear rect */ - if (clear_rect && (clear_rect->x1 > 0 || clear_rect->y1 > 0 - || clear_rect->x2 < target->currentDesc.Width - || clear_rect->y2 < target->currentDesc.Height)) + if (clear_rect && (clear_rect->left > 0 || clear_rect->top > 0 + || clear_rect->right < target->currentDesc.Width + || clear_rect->bottom < target->currentDesc.Height)) return FALSE; return TRUE; @@ -4375,7 +4375,7 @@ static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, co HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count, const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) { - const WINED3DRECT *clear_rect = (Count > 0 && pRects) ? pRects : NULL; + const RECT *clear_rect = (Count > 0 && pRects) ? (const RECT *)pRects : NULL; IWineD3DSurfaceImpl *depth_stencil = This->depth_stencil; GLbitfield glMask = 0; unsigned int i; @@ -4506,10 +4506,10 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac for (i = 0; i < Count; ++i) { /* Note gl uses lower left, width/height */ - IntersectRect(¤t_rect, &draw_rect, (const RECT *)&clear_rect[i]); + IntersectRect(¤t_rect, &draw_rect, &clear_rect[i]); TRACE("clear_rect[%u] %s, current_rect %s.\n", i, - wine_dbgstr_rect((const RECT *)&clear_rect[i]), + wine_dbgstr_rect(&clear_rect[i]), wine_dbgstr_rect(¤t_rect)); /* Tests show that rectangles where x1 > x2 or y1 > y2 are ignored silently.
1
0
0
0
Henri Verbeet : wined3d: Introduce device_get_draw_rect() to calculate the effective viewport.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 772fe683fa9021959430e48b84d7c908974268cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=772fe683fa9021959430e48b8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 28 00:08:50 2010 +0200 wined3d: Introduce device_get_draw_rect() to calculate the effective viewport. --- dlls/wined3d/device.c | 108 +++++++++++++++++++++++++----------------------- 1 files changed, 56 insertions(+), 52 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a2b2c3e..8e9e225 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -563,6 +563,19 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c device->contexts = new_array; } +static void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) +{ + IWineD3DStateBlockImpl *stateblock = device->stateBlock; + WINED3DVIEWPORT *vp = &stateblock->viewport; + + SetRect(rect, vp->X, vp->Y, vp->X + vp->Width, vp->Y + vp->Height); + + if (stateblock->renderState[WINED3DRS_SCISSORTESTENABLE]) + { + IntersectRect(rect, rect, &stateblock->scissorRect); + } +} + void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, struct wined3d_context *context, IWineD3DSurfaceImpl *depth_stencil) { @@ -4341,19 +4354,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, return WINED3D_OK; } -static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const WINED3DVIEWPORT *viewport, - const RECT *scissor_rect, const WINED3DRECT *clear_rect) +static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, const WINED3DRECT *clear_rect) { - /* partial viewport*/ - if (viewport->X != 0 || viewport->Y != 0 - || viewport->Width < target->currentDesc.Width - || viewport->Height < target->currentDesc.Height) - return FALSE; - - /* partial scissor rect */ - if (scissor_rect && (scissor_rect->left > 0 || scissor_rect->top > 0 - || scissor_rect->right < target->currentDesc.Width - || scissor_rect->bottom < target->currentDesc.Height)) + /* partial draw rect */ + if (draw_rect->left || draw_rect->top + || draw_rect->right < target->currentDesc.Width + || draw_rect->bottom < target->currentDesc.Height) return FALSE; /* partial clear rect */ @@ -4369,17 +4375,15 @@ static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const WINED3DVIEWPORT *vi HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count, const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) { - IWineD3DStateBlockImpl *stateblock = This->stateBlock; - const RECT *scissor_rect = stateblock->renderState[WINED3DRS_SCISSORTESTENABLE] ? &stateblock->scissorRect : NULL; const WINED3DRECT *clear_rect = (Count > 0 && pRects) ? pRects : NULL; IWineD3DSurfaceImpl *depth_stencil = This->depth_stencil; - const WINED3DVIEWPORT *vp = &stateblock->viewport; GLbitfield glMask = 0; unsigned int i; - WINED3DRECT curRect; - RECT vp_rect; UINT drawable_width, drawable_height; struct wined3d_context *context; + RECT draw_rect; + + device_get_draw_rect(This, &draw_rect); /* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the * drawable. After the clear we'll mark the drawable up to date, so we have to make sure that this is true @@ -4392,7 +4396,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac */ if (Flags & WINED3DCLEAR_TARGET && !(target->Flags & SFLAG_INDRAWABLE)) { - if (!is_full_clear(target, vp, scissor_rect, clear_rect)) + if (!is_full_clear(target, &draw_rect, clear_rect)) IWineD3DSurface_LoadLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, NULL); } @@ -4453,7 +4457,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac if (location == SFLAG_DS_ONSCREEN && depth_stencil != This->onscreen_depth_stencil) device_switch_onscreen_ds(This, context, depth_stencil); - if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect)) + if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, &draw_rect, clear_rect)) surface_load_ds_location(depth_stencil, context, location); surface_modify_ds_location(depth_stencil, location); @@ -4478,54 +4482,54 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac glMask = glMask | GL_COLOR_BUFFER_BIT; } - vp_rect.left = vp->X; - vp_rect.top = vp->Y; - vp_rect.right = vp->X + vp->Width; - vp_rect.bottom = vp->Y + vp->Height; - if (!(Count > 0 && pRects)) { - if(This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE]) { - IntersectRect(&vp_rect, &vp_rect, &This->stateBlock->scissorRect); - } + if (!clear_rect) + { if (context->render_offscreen) { - glScissor(vp_rect.left, vp_rect.top, - vp_rect.right - vp_rect.left, vp_rect.bottom - vp_rect.top); - } else { - glScissor(vp_rect.left, drawable_height - vp_rect.bottom, - vp_rect.right - vp_rect.left, vp_rect.bottom - vp_rect.top); + glScissor(draw_rect.left, draw_rect.top, + draw_rect.right - draw_rect.left, draw_rect.bottom - draw_rect.top); + } + else + { + glScissor(draw_rect.left, drawable_height - draw_rect.bottom, + draw_rect.right - draw_rect.left, draw_rect.bottom - draw_rect.top); } checkGLcall("glScissor"); glClear(glMask); checkGLcall("glClear"); - } else { - /* Now process each rect in turn */ - for (i = 0; i < Count; i++) { + } + else + { + RECT current_rect; + + /* Now process each rect in turn. */ + for (i = 0; i < Count; ++i) + { /* Note gl uses lower left, width/height */ - IntersectRect((RECT *)&curRect, &vp_rect, (const RECT *)&pRects[i]); - if(This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE]) { - IntersectRect((RECT *) &curRect, (RECT *) &curRect, &This->stateBlock->scissorRect); - } - TRACE("(%p) Rect=(%d,%d)->(%d,%d) glRect=(%d,%d), len=%d, hei=%d\n", This, - pRects[i].x1, pRects[i].y1, pRects[i].x2, pRects[i].y2, - curRect.x1, (target->currentDesc.Height - curRect.y2), - curRect.x2 - curRect.x1, curRect.y2 - curRect.y1); + IntersectRect(¤t_rect, &draw_rect, (const RECT *)&clear_rect[i]); + + TRACE("clear_rect[%u] %s, current_rect %s.\n", i, + wine_dbgstr_rect((const RECT *)&clear_rect[i]), + wine_dbgstr_rect(¤t_rect)); /* Tests show that rectangles where x1 > x2 or y1 > y2 are ignored silently. * The rectangle is not cleared, no error is returned, but further rectanlges are - * still cleared if they are valid - */ - if(curRect.x1 > curRect.x2 || curRect.y1 > curRect.y2) { - TRACE("Rectangle with negative dimensions, ignoring\n"); + * still cleared if they are valid. */ + if (current_rect.left > current_rect.right || current_rect.top > current_rect.bottom) + { + TRACE("Rectangle with negative dimensions, ignoring.\n"); continue; } if (context->render_offscreen) { - glScissor(curRect.x1, curRect.y1, - curRect.x2 - curRect.x1, curRect.y2 - curRect.y1); - } else { - glScissor(curRect.x1, drawable_height - curRect.y2, - curRect.x2 - curRect.x1, curRect.y2 - curRect.y1); + glScissor(current_rect.left, current_rect.top, + current_rect.right - current_rect.left, current_rect.bottom - current_rect.top); + } + else + { + glScissor(current_rect.left, drawable_height - current_rect.bottom, + current_rect.right - current_rect.left, current_rect.bottom - current_rect.top); } checkGLcall("glScissor");
1
0
0
0
Henri Verbeet : wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_release_client_storage ().
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 0d86323778d7e456f64cbacedb3b2098b0ba8da3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d86323778d7e456f64cbaced…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 28 00:08:49 2010 +0200 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_release_client_storage(). --- dlls/wined3d/surface.c | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d3fe566..2e2a925 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1993,35 +1993,34 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { return WINED3D_OK; } -static void surface_release_client_storage(IWineD3DSurface *iface) +static void surface_release_client_storage(IWineD3DSurfaceImpl *surface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; struct wined3d_context *context; - context = context_acquire(This->resource.device, NULL, CTXUSAGE_RESOURCELOAD); + context = context_acquire(surface->resource.device, NULL, CTXUSAGE_RESOURCELOAD); ENTER_GL(); glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - if(This->texture_name) + if (surface->texture_name) { - surface_bind_and_dirtify(This, FALSE); - glTexImage2D(This->texture_target, This->texture_level, - GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + surface_bind_and_dirtify(surface, FALSE); + glTexImage2D(surface->texture_target, surface->texture_level, + GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); } - if(This->texture_name_srgb) + if (surface->texture_name_srgb) { - surface_bind_and_dirtify(This, TRUE); - glTexImage2D(This->texture_target, This->texture_level, - GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + surface_bind_and_dirtify(surface, TRUE); + glTexImage2D(surface->texture_target, surface->texture_level, + GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); } glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); LEAVE_GL(); context_release(context); - IWineD3DSurface_ModifyLocation(iface, SFLAG_INSRGBTEX, FALSE); - IWineD3DSurface_ModifyLocation(iface, SFLAG_INTEXTURE, FALSE); - surface_force_reload(This); + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)surface, SFLAG_INSRGBTEX, FALSE); + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)surface, SFLAG_INTEXTURE, FALSE); + surface_force_reload(surface); } static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) @@ -2052,7 +2051,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD if(!This->hDC) { if(This->Flags & SFLAG_CLIENT) { IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL); - surface_release_client_storage(iface); + surface_release_client_storage(This); } hr = IWineD3DBaseSurfaceImpl_CreateDIBSection(iface); if(FAILED(hr)) return WINED3DERR_INVALIDCALL; @@ -2828,9 +2827,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE); /* For client textures opengl has to be notified */ - if(This->Flags & SFLAG_CLIENT) { - surface_release_client_storage(iface); - } + if (This->Flags & SFLAG_CLIENT) + surface_release_client_storage(This); /* Now free the old memory if any */ HeapFree(GetProcessHeap(), 0, release); @@ -2841,9 +2839,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *M if(This->resource.heapMemory != NULL) ERR("User pointer surface has heap memory allocated\n"); This->Flags &= ~SFLAG_USERPTR; - if(This->Flags & SFLAG_CLIENT) { - surface_release_client_storage(iface); - } + if (This->Flags & SFLAG_CLIENT) + surface_release_client_storage(This); } return WINED3D_OK; }
1
0
0
0
Henri Verbeet : wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_init_sysmem().
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 23a377f02b82a39605cc0735130b315a4c3b7bf1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23a377f02b82a39605cc07351…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 28 00:08:48 2010 +0200 wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_init_sysmem(). --- dlls/wined3d/device.c | 2 +- dlls/wined3d/surface.c | 25 +++++++++++++------------ dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 062fb20..a2b2c3e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6234,7 +6234,7 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES /* Put all surfaces into sysmem - the drawable might disappear if the backbuffer was rendered * to a FBO */ - if(!surface_init_sysmem((IWineD3DSurface *) surface)) + if (!surface_init_sysmem(surface)) { return E_OUTOFMEMORY; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fcdfec8..d3fe566 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1141,27 +1141,26 @@ static void surface_remove_pbo(IWineD3DSurfaceImpl *This, const struct wined3d_g This->Flags &= ~SFLAG_PBO; } -BOOL surface_init_sysmem(IWineD3DSurface *iface) +BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - - if(!This->resource.allocatedMemory) + if (!surface->resource.allocatedMemory) { - This->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size + RESOURCE_ALIGNMENT); - if(!This->resource.heapMemory) + surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + surface->resource.size + RESOURCE_ALIGNMENT); + if (!surface->resource.heapMemory) { ERR("Out of memory\n"); return FALSE; } - This->resource.allocatedMemory = - (BYTE *)(((ULONG_PTR) This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + surface->resource.allocatedMemory = + (BYTE *)(((ULONG_PTR)surface->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); } else { - memset(This->resource.allocatedMemory, 0, This->resource.size); + memset(surface->resource.allocatedMemory, 0, surface->resource.size); } - IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE); + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)surface, SFLAG_INSYSMEM, TRUE); return TRUE; } @@ -1186,8 +1185,10 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) { * or the depth stencil into an FBO the texture or render buffer will be removed * and all flags get lost */ - surface_init_sysmem(iface); - } else { + surface_init_sysmem(This); + } + else + { /* Load the surface into system memory */ IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL); IWineD3DSurface_ModifyLocation(iface, SFLAG_INDRAWABLE, FALSE); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 70ecb22..3e54ad8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1873,7 +1873,7 @@ typedef struct IWineD3DBaseTextureClass } IWineD3DBaseTextureClass; void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; -BOOL surface_init_sysmem(IWineD3DSurface *iface) DECLSPEC_HIDDEN; +BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN; BOOL surface_is_offscreen(IWineD3DSurfaceImpl *iface) DECLSPEC_HIDDEN; void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : ole32: Use LoadCursorW instead of -A version.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 5ac7b165e69387163a5b08fa2d9180822b34b17d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ac7b165e69387163a5b08fa2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 28 01:32:37 2010 +0400 ole32: Use LoadCursorW instead of -A version. --- dlls/ole32/ole2.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 0bb7437..45f2220 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2119,24 +2119,28 @@ static void OLEDD_TrackMouseMove(TrackerWindowInfo* trackerInfo) * when that's the case, we must display the standard drag and drop * cursors. */ - if (hr==DRAGDROP_S_USEDEFAULTCURSORS) + if (hr == DRAGDROP_S_USEDEFAULTCURSORS) { + HCURSOR hCur; + if (*trackerInfo->pdwEffect & DROPEFFECT_MOVE) { - SetCursor(LoadCursorA(hProxyDll, MAKEINTRESOURCEA(1))); + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(1)); } else if (*trackerInfo->pdwEffect & DROPEFFECT_COPY) { - SetCursor(LoadCursorA(hProxyDll, MAKEINTRESOURCEA(2))); + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(2)); } else if (*trackerInfo->pdwEffect & DROPEFFECT_LINK) { - SetCursor(LoadCursorA(hProxyDll, MAKEINTRESOURCEA(3))); + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(3)); } else { - SetCursor(LoadCursorA(hProxyDll, MAKEINTRESOURCEA(0))); + hCur = LoadCursorW(hProxyDll, MAKEINTRESOURCEW(0)); } + + SetCursor(hCur); } }
1
0
0
0
Nikolay Sivov : ole32: Avoid uninitialized value to be potentialy passed to UnhookWindowsHookEx.
by Alexandre Julliard
28 Apr '10
28 Apr '10
Module: wine Branch: master Commit: 16bd9d53b91df0adef75aa2cf9a518137f242964 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16bd9d53b91df0adef75aa2cf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Apr 27 23:45:07 2010 +0400 ole32: Avoid uninitialized value to be potentialy passed to UnhookWindowsHookEx. --- dlls/ole32/ole2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 6c0f8c1..0bb7437 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -1197,6 +1197,7 @@ static BOOL OLEMenu_InstallHooks( DWORD tid ) pHookItem->tid = tid; pHookItem->hHeap = GetProcessHeap(); + pHookItem->CallWndProc_hHook = NULL; /* Install a thread scope message hook for WH_GETMESSAGE */ pHookItem->GetMsg_hHook = SetWindowsHookExW( WH_GETMESSAGE, OLEMenu_GetMsgProc,
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
90
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
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200