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
July
June
May
April
March
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
May 2010
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
3 participants
955 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Attach the surfaces from the fbo_entry instead of the ones from the device .
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: ff6cf84c40c76cbce3ee0b059c8443b0b177baa5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff6cf84c40c76cbce3ee0b059…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 3 22:03:31 2010 +0200 wined3d: Attach the surfaces from the fbo_entry instead of the ones from the device. Currently these are always the same, but that doesn't make it right. --- dlls/wined3d/context.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d1aa3e9..1d366a7 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -413,16 +413,16 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_ /* Apply render targets */ for (i = 0; i < gl_info->limits.buffers; ++i) { - context_attach_surface_fbo(context, GL_FRAMEBUFFER, i, device->render_targets[i]); + context_attach_surface_fbo(context, GL_FRAMEBUFFER, i, entry->render_targets[i]); } /* Apply depth targets */ - if (device->depth_stencil) + if (entry->depth_stencil) { - surface_set_compatible_renderbuffer(device->depth_stencil, - device->render_targets[0]->pow2Width, device->render_targets[0]->pow2Height); + surface_set_compatible_renderbuffer(entry->depth_stencil, + entry->render_targets[0]->pow2Width, entry->render_targets[0]->pow2Height); } - context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, device->depth_stencil, TRUE); + context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, entry->depth_stencil, TRUE); entry->attached = TRUE; } @@ -430,11 +430,11 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_ { for (i = 0; i < gl_info->limits.buffers; ++i) { - if (device->render_targets[i]) - context_apply_attachment_filter_states(device->render_targets[i]); + if (entry->render_targets[i]) + context_apply_attachment_filter_states(entry->render_targets[i]); } - if (device->depth_stencil) - context_apply_attachment_filter_states(device->depth_stencil); + if (entry->depth_stencil) + context_apply_attachment_filter_states(entry->depth_stencil); } for (i = 0; i < gl_info->limits.buffers; ++i)
1
0
0
0
Henri Verbeet : d3d9/tests: Allow D3DFMT_A2R10G10B10 as supported adapter mode.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: 3ab491f810e5038c9da1e86cf26f5fe4f8fe20e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ab491f810e5038c9da1e86cf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 3 22:03:30 2010 +0200 d3d9/tests: Allow D3DFMT_A2R10G10B10 as supported adapter mode. This is in the list of allowed formats in the documentation, and some drivers report this on Windows. --- dlls/d3d9/tests/device.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 0004715..e21f8ad 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1226,7 +1226,6 @@ static void test_display_modes(void) TEST_FMT(D3DFMT_A8B8G8R8, D3DERR_INVALIDCALL); TEST_FMT(D3DFMT_X8B8G8R8, D3DERR_INVALIDCALL); TEST_FMT(D3DFMT_G16R16, D3DERR_INVALIDCALL); - TEST_FMT(D3DFMT_A2R10G10B10, D3DERR_INVALIDCALL); TEST_FMT(D3DFMT_A16B16G16R16, D3DERR_INVALIDCALL); TEST_FMT(D3DFMT_A8P8, D3DERR_INVALIDCALL);
1
0
0
0
Henri Verbeet : wined3d: Remove a redundant check from prepare_ds_clear().
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: 312bacec96ef63d3eb47bbaf0be650a0b31da99a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=312bacec96ef63d3eb47bbaf0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 3 22:03:29 2010 +0200 wined3d: Remove a redundant check from prepare_ds_clear(). The rectangle count doesn't really matter. If the first rectangle doesn't cover the entire draw_rect we need to load the depth/stencil surface. --- dlls/wined3d/device.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a59cf02..585edd5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4404,16 +4404,6 @@ static void prepare_ds_clear(IWineD3DSurfaceImpl *ds, struct wined3d_context *co return; } - if (rect_count > 1) - { - /* Multiple clear rects, full load. Strictly speaking this can - * also be a full draw_rect clear, but it's probably rare enough - * that we don't care. */ - surface_load_ds_location(ds, context, location); - surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); - return; - } - IntersectRect(&r, draw_rect, clear_rect); if (EqualRect(&r, draw_rect)) {
1
0
0
0
Henri Verbeet : wined3d: Separate context acquisition and state application .
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: 49e076eabdfca5d27e3ce8448dc0532e314f0e75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49e076eabdfca5d27e3ce8448…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 3 22:03:28 2010 +0200 wined3d: Separate context acquisition and state application. --- dlls/wined3d/arb_program_shader.c | 7 +++-- dlls/wined3d/basetexture.c | 4 +- dlls/wined3d/buffer.c | 8 +++--- dlls/wined3d/context.c | 33 +++-------------------- dlls/wined3d/cubetexture.c | 2 +- dlls/wined3d/device.c | 50 +++++++++++++++++++----------------- dlls/wined3d/drawprim.c | 7 +++- dlls/wined3d/glsl_shader.c | 4 +- dlls/wined3d/query.c | 20 +++++++------- dlls/wined3d/surface.c | 40 +++++++++++++++++------------ dlls/wined3d/swapchain.c | 13 +++++---- dlls/wined3d/texture.c | 2 +- dlls/wined3d/volumetexture.c | 2 +- dlls/wined3d/wined3d_private.h | 19 +++++--------- 14 files changed, 98 insertions(+), 113 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=49e076eabdfca5d27e3ce…
1
0
0
0
Henri Verbeet : wined3d: Split context_apply_state() into separate functions for each usage.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: be43c867a5fd06dc6b9f5b686abb22a1e17a712e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be43c867a5fd06dc6b9f5b686…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 3 22:03:27 2010 +0200 wined3d: Split context_apply_state() into separate functions for each usage. --- dlls/wined3d/context.c | 221 +++++++++++++++++++++++++++--------------------- 1 files changed, 124 insertions(+), 97 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index ccb3174..71030ba 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1977,117 +1977,124 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device, struct } /* Context activation is done by the caller. */ -static void context_apply_state(struct wined3d_context *context, IWineD3DDeviceImpl *device, enum ContextUsage usage) +static void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) { - const struct StateEntry *state_table = device->StateTable; - unsigned int i; + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + if (context->render_offscreen) + { + FIXME("Applying blit state for an offscreen target with ORM_FBO. This should be avoided.\n"); + surface_internal_preload(context->current_rt, SRGB_RGB); - switch (usage) { - case CTXUSAGE_CLEAR: - case CTXUSAGE_DRAWPRIM: - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - if (!context->render_offscreen) context_validate_onscreen_formats(device, context); - ENTER_GL(); - context_apply_fbo_state(context); - LEAVE_GL(); - } - if (context->draw_buffer_dirty) { - context_apply_draw_buffer(context, FALSE); - context->draw_buffer_dirty = FALSE; - } - break; + ENTER_GL(); + context_bind_fbo(context, GL_FRAMEBUFFER, &context->dst_fbo); + context_attach_surface_fbo(context, GL_FRAMEBUFFER, 0, context->current_rt); + context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, NULL, FALSE); + LEAVE_GL(); + } + else + { + context_validate_onscreen_formats(device, context); - case CTXUSAGE_BLIT: - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - if (!context->render_offscreen) context_validate_onscreen_formats(device, context); - if (context->render_offscreen) - { - FIXME("Activating for CTXUSAGE_BLIT for an offscreen target with ORM_FBO. This should be avoided.\n"); - surface_internal_preload(context->current_rt, SRGB_RGB); - - ENTER_GL(); - context_bind_fbo(context, GL_FRAMEBUFFER, &context->dst_fbo); - context_attach_surface_fbo(context, GL_FRAMEBUFFER, 0, context->current_rt); - context_attach_depth_stencil_fbo(context, GL_FRAMEBUFFER, NULL, FALSE); - LEAVE_GL(); - } else { - ENTER_GL(); - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); - LEAVE_GL(); - } - context->draw_buffer_dirty = TRUE; - } - if (context->draw_buffer_dirty) { - context_apply_draw_buffer(context, TRUE); - if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) { - context->draw_buffer_dirty = FALSE; - } - } - break; + ENTER_GL(); + context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + LEAVE_GL(); + } - default: - break; + context->draw_buffer_dirty = TRUE; } - switch(usage) { - case CTXUSAGE_RESOURCELOAD: - /* This does not require any special states to be set up */ - break; + if (context->draw_buffer_dirty) + { + context_apply_draw_buffer(context, TRUE); + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) + context->draw_buffer_dirty = FALSE; + } - case CTXUSAGE_CLEAR: - if(context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); - } + SetupForBlit(device, context); +} - /* Blending and clearing should be orthogonal, but tests on the nvidia driver show that disabling - * blending when clearing improves the clearing performance incredibly. - */ - ENTER_GL(); - glDisable(GL_BLEND); - LEAVE_GL(); - Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_table); +/* Context activation is done by the caller. */ +static void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) +{ + const struct StateEntry *state_table = device->StateTable; - ENTER_GL(); - glEnable(GL_SCISSOR_TEST); - checkGLcall("glEnable GL_SCISSOR_TEST"); - LEAVE_GL(); - context->last_was_blit = FALSE; - Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE), state_table); - Context_MarkStateDirty(context, STATE_SCISSORRECT, state_table); - break; + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + if (!context->render_offscreen) context_validate_onscreen_formats(device, context); + ENTER_GL(); + context_apply_fbo_state(context); + LEAVE_GL(); + } - case CTXUSAGE_DRAWPRIM: - /* This needs all dirty states applied */ - if(context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); - } + if (context->draw_buffer_dirty) + { + context_apply_draw_buffer(context, FALSE); + context->draw_buffer_dirty = FALSE; + } - IWineD3DDeviceImpl_FindTexUnitMap(device); - device_preload_textures(device); - if (isStateDirty(context, STATE_VDECL)) - device_update_stream_info(device, context->gl_info); + if (context->last_was_blit) + { + device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + } - ENTER_GL(); - for (i = 0; i < context->numDirtyEntries; ++i) - { - DWORD rep = context->dirtyArray[i]; - DWORD idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT); - BYTE shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); - context->isStateDirty[idx] &= ~(1 << shift); - state_table[rep].apply(rep, device->stateBlock, context); - } - LEAVE_GL(); - context->numDirtyEntries = 0; /* This makes the whole list clean */ - context->last_was_blit = FALSE; - break; + /* Blending and clearing should be orthogonal, but tests on the nvidia + * driver show that disabling blending when clearing improves the clearing + * performance incredibly. */ + ENTER_GL(); + glDisable(GL_BLEND); + glEnable(GL_SCISSOR_TEST); + checkGLcall("glEnable GL_SCISSOR_TEST"); + LEAVE_GL(); - case CTXUSAGE_BLIT: - SetupForBlit(device, context); - break; + context->last_was_blit = FALSE; + Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_table); + Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE), state_table); + Context_MarkStateDirty(context, STATE_SCISSORRECT, state_table); +} - default: - FIXME("Unexpected context usage requested\n"); +/* Context activation is done by the caller. */ +static void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) +{ + const struct StateEntry *state_table = device->StateTable; + unsigned int i; + + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + if (!context->render_offscreen) context_validate_onscreen_formats(device, context); + ENTER_GL(); + context_apply_fbo_state(context); + LEAVE_GL(); + } + + if (context->draw_buffer_dirty) + { + context_apply_draw_buffer(context, FALSE); + context->draw_buffer_dirty = FALSE; } + + if (context->last_was_blit) + { + device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + } + + IWineD3DDeviceImpl_FindTexUnitMap(device); + device_preload_textures(device); + if (isStateDirty(context, STATE_VDECL)) + device_update_stream_info(device, context->gl_info); + + ENTER_GL(); + for (i = 0; i < context->numDirtyEntries; ++i) + { + DWORD rep = context->dirtyArray[i]; + DWORD idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT); + BYTE shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); + context->isStateDirty[idx] &= ~(1 << shift); + state_table[rep].apply(rep, device->stateBlock, context); + } + LEAVE_GL(); + context->numDirtyEntries = 0; /* This makes the whole list clean */ + context->last_was_blit = FALSE; } static void context_setup_target(IWineD3DDeviceImpl *device, @@ -2220,7 +2227,27 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, } } - context_apply_state(context, device, usage); + switch (usage) + { + case CTXUSAGE_BLIT: + context_apply_blit_state(context, device); + break; + + case CTXUSAGE_CLEAR: + context_apply_clear_state(context, device); + break; + + case CTXUSAGE_DRAWPRIM: + context_apply_draw_state(context, device); + break; + + case CTXUSAGE_RESOURCELOAD: + break; + + default: + FIXME("Unexpected context usage requested.\n"); + break; + } return context; }
1
0
0
0
Andrew Nguyen : rundll32: Convert rundll32 to Unicode.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: b8b1a565e04dd3a3653cff50d5ae2a6dcc940526 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8b1a565e04dd3a3653cff50d…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Mon May 3 14:22:25 2010 -0500 rundll32: Convert rundll32 to Unicode. --- programs/rundll32/Makefile.in | 3 ++- programs/rundll32/rundll32.c | 36 +++++++++++++++--------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/programs/rundll32/Makefile.in b/programs/rundll32/Makefile.in index c7798a3..6e2eddb 100644 --- a/programs/rundll32/Makefile.in +++ b/programs/rundll32/Makefile.in @@ -3,8 +3,9 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = rundll32.exe -APPMODE = -mwindows +APPMODE = -mwindows -municode IMPORTS = user32 kernel32 +EXTRADEFS = -DWINE_NO_UNICODE_MACROS C_SRCS = \ rundll32.c diff --git a/programs/rundll32/rundll32.c b/programs/rundll32/rundll32.c index e26f5de..e8ac8a5 100644 --- a/programs/rundll32/rundll32.c +++ b/programs/rundll32/rundll32.c @@ -53,8 +53,10 @@ typedef void (WINAPI *EntryPointA)(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine * Control_RunDLL needs to have a window. So lets make us a very * simple window class. */ -static const TCHAR *szTitle = "rundll32"; -static const TCHAR *szWindowClass = "class_rundll32"; +static const WCHAR szTitle[] = {'r','u','n','d','l','l','3','2',0}; +static const WCHAR szWindowClass[] = {'c','l','a','s','s','_','r','u','n','d','l','l','3','2',0}; +static const WCHAR kernel32[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; +static const WCHAR shell32[] = {'s','h','e','l','l','3','2','.','d','l','l',0}; static HINSTANCE16 (WINAPI *pLoadLibrary16)(LPCSTR libname); static FARPROC16 (WINAPI *pGetProcAddress16)(HMODULE16 hModule, LPCSTR name); @@ -63,23 +65,23 @@ static void (WINAPI *pRunDLL_CallEntry16)( FARPROC proc, HWND hwnd, HINSTANCE in static ATOM register_class(void) { - WNDCLASSEX wcex; + WNDCLASSEXW wcex; - wcex.cbSize = sizeof(WNDCLASSEX); + wcex.cbSize = sizeof(WNDCLASSEXW); wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = DefWindowProc; + wcex.lpfnWndProc = DefWindowProcW; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = NULL; wcex.hIcon = NULL; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = NULL; wcex.lpszClassName = szWindowClass; wcex.hIconSm = NULL; - return RegisterClassEx(&wcex); + return RegisterClassExW(&wcex); } static HINSTANCE16 load_dll16( LPCWSTR dll ) @@ -91,7 +93,7 @@ static HINSTANCE16 load_dll16( LPCWSTR dll ) if (dllA) { WideCharToMultiByte( CP_ACP, 0, dll, -1, dllA, len, NULL, NULL ); - pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)35 ); + pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleW(kernel32), (LPCSTR)35 ); if (pLoadLibrary16) ret = pLoadLibrary16( dllA ); HeapFree( GetProcessHeap(), 0, dllA ); } @@ -107,7 +109,7 @@ static FARPROC16 get_entry_point16( HINSTANCE16 inst, LPCWSTR entry ) if (entryA) { WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL ); - pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)37 ); + pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleW(kernel32), (LPCSTR)37 ); if (pGetProcAddress16) ret = pGetProcAddress16( inst, entryA ); HeapFree( GetProcessHeap(), 0, entryA ); } @@ -223,10 +225,9 @@ static LPWSTR get_next_arg(LPWSTR *cmdline) return arg; } -int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, int nCmdShow) +int WINAPI wWinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPWSTR szCmdLine, int nCmdShow) { HWND hWnd; - LPWSTR szCmdLine; LPWSTR szDllName,szEntryPoint; void *entry_point; BOOL unicode = FALSE, win16; @@ -239,19 +240,12 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, /* Initialize the rundll32 class */ register_class(); - hWnd = CreateWindow(szWindowClass, szTitle, + hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW|WS_VISIBLE, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL); - /* Skip the rundll32.exe path */ - szCmdLine=GetCommandLineW(); - WINE_TRACE("CmdLine=%s\n",wine_dbgstr_w(szCmdLine)); - szDllName = get_next_arg(&szCmdLine); - if (!szDllName || *szDllName==0) - goto CLEANUP; - HeapFree(GetProcessHeap(),0,szDllName); - /* Get the dll name and API EntryPoint */ + WINE_TRACE("CmdLine=%s\n",wine_dbgstr_w(szCmdLine)); szDllName = get_next_arg(&szCmdLine); if (!szDllName || *szDllName==0) goto CLEANUP; @@ -318,7 +312,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, if (win16) { - HMODULE shell = LoadLibraryA( "shell32.dll" ); + HMODULE shell = LoadLibraryW( shell32 ); if (shell) pRunDLL_CallEntry16 = (void *)GetProcAddress( shell, (LPCSTR)122 ); if (pRunDLL_CallEntry16) pRunDLL_CallEntry16( entry_point, hWnd, instance, cmdline, info.wShowWindow );
1
0
0
0
Andrew Nguyen : rundll32: Check more heap allocation failure paths for consistency.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: e6bd6d120167068acffe55794498502cb149b320 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6bd6d120167068acffe55794…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Mon May 3 14:22:17 2010 -0500 rundll32: Check more heap allocation failure paths for consistency. --- programs/rundll32/rundll32.c | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/programs/rundll32/rundll32.c b/programs/rundll32/rundll32.c index f3105c4..e26f5de 100644 --- a/programs/rundll32/rundll32.c +++ b/programs/rundll32/rundll32.c @@ -87,10 +87,14 @@ static HINSTANCE16 load_dll16( LPCWSTR dll ) HINSTANCE16 ret = 0; DWORD len = WideCharToMultiByte( CP_ACP, 0, dll, -1, NULL, 0, NULL, NULL ); char *dllA = HeapAlloc( GetProcessHeap(), 0, len ); - WideCharToMultiByte( CP_ACP, 0, dll, -1, dllA, len, NULL, NULL ); - pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)35 ); - if (pLoadLibrary16) ret = pLoadLibrary16( dllA ); - HeapFree( GetProcessHeap(), 0, dllA ); + + if (dllA) + { + WideCharToMultiByte( CP_ACP, 0, dll, -1, dllA, len, NULL, NULL ); + pLoadLibrary16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)35 ); + if (pLoadLibrary16) ret = pLoadLibrary16( dllA ); + HeapFree( GetProcessHeap(), 0, dllA ); + } return ret; } @@ -99,10 +103,14 @@ static FARPROC16 get_entry_point16( HINSTANCE16 inst, LPCWSTR entry ) FARPROC16 ret = 0; DWORD len = WideCharToMultiByte( CP_ACP, 0, entry, -1, NULL, 0, NULL, NULL ); char *entryA = HeapAlloc( GetProcessHeap(), 0, len ); - WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL ); - pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)37 ); - if (pGetProcAddress16) ret = pGetProcAddress16( inst, entryA ); - HeapFree( GetProcessHeap(), 0, entryA ); + + if (entryA) + { + WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL ); + pGetProcAddress16 = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"), (LPCSTR)37 ); + if (pGetProcAddress16) ret = pGetProcAddress16( inst, entryA ); + HeapFree( GetProcessHeap(), 0, entryA ); + } return ret; } @@ -111,6 +119,10 @@ static void *get_entry_point32( HMODULE module, LPCWSTR entry, BOOL *unicode ) void *ret; DWORD len = WideCharToMultiByte( CP_ACP, 0, entry, -1, NULL, 0, NULL, NULL ); char *entryA = HeapAlloc( GetProcessHeap(), 0, len + 1 ); + + if (!entryA) + return NULL; + WideCharToMultiByte( CP_ACP, 0, entry, -1, entryA, len, NULL, NULL ); /* first try the W version */ @@ -217,7 +229,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, LPWSTR szCmdLine; LPWSTR szDllName,szEntryPoint; void *entry_point; - BOOL unicode, win16; + BOOL unicode = FALSE, win16; STARTUPINFOW info; HMODULE hDll; @@ -295,6 +307,10 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, { DWORD len = WideCharToMultiByte( CP_ACP, 0, szCmdLine, -1, NULL, 0, NULL, NULL ); char *cmdline = HeapAlloc( GetProcessHeap(), 0, len ); + + if (!cmdline) + goto CLEANUP; + WideCharToMultiByte( CP_ACP, 0, szCmdLine, -1, cmdline, len, NULL, NULL ); WINE_TRACE( "Calling %s (%p,%p,%s,%d)\n", wine_dbgstr_w(szEntryPoint),
1
0
0
0
Damjan Jovanovic : winemenubuilder: Read the registry in the unix codepage when cleaning up menus.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: 228e5f1ac383c7bba1c66d63c60e46858685f5ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=228e5f1ac383c7bba1c66d63c…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Mon May 3 20:58:16 2010 +0200 winemenubuilder: Read the registry in the unix codepage when cleaning up menus. --- programs/winemenubuilder/winemenubuilder.c | 48 +++++++++++++++++++++------- 1 files changed, 36 insertions(+), 12 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 9532a2e..51f0adb 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -1434,6 +1434,16 @@ static char* wchars_to_utf8_chars(LPCWSTR string) return ret; } +static char* wchars_to_unix_chars(LPCWSTR string) +{ + char *ret; + INT size = WideCharToMultiByte(CP_UNIXCP, 0, string, -1, NULL, 0, NULL, NULL); + ret = HeapAlloc(GetProcessHeap(), 0, size); + if (ret) + WideCharToMultiByte(CP_UNIXCP, 0, string, -1, ret, size, NULL, NULL); + return ret; +} + static char *slashes_to_minuses(const char *string) { int i; @@ -2660,20 +2670,20 @@ static void cleanup_menus(void) LSTATUS lret = ERROR_SUCCESS; for (i = 0; lret == ERROR_SUCCESS; ) { - char *value = NULL; - char *data = NULL; + WCHAR *value = NULL; + WCHAR *data = NULL; DWORD valueSize = 4096; DWORD dataSize = 4096; while (1) { lret = ERROR_OUTOFMEMORY; - value = HeapAlloc(GetProcessHeap(), 0, valueSize); + value = HeapAlloc(GetProcessHeap(), 0, valueSize * sizeof(WCHAR)); if (value == NULL) break; - data = HeapAlloc(GetProcessHeap(), 0, dataSize); + data = HeapAlloc(GetProcessHeap(), 0, dataSize * sizeof(WCHAR)); if (data == NULL) break; - lret = RegEnumValueA(hkey, i, value, &valueSize, NULL, NULL, (BYTE*)data, &dataSize); + lret = RegEnumValueW(hkey, i, value, &valueSize, NULL, NULL, (BYTE*)data, &dataSize); if (lret == ERROR_SUCCESS || lret != ERROR_MORE_DATA) break; valueSize *= 2; @@ -2684,18 +2694,32 @@ static void cleanup_menus(void) } if (lret == ERROR_SUCCESS) { - struct stat filestats; - if (stat(data, &filestats) < 0 && errno == ENOENT) + char *unix_file; + char *windows_file; + unix_file = wchars_to_unix_chars(value); + windows_file = wchars_to_unix_chars(data); + if (unix_file != NULL && windows_file != NULL) { - WINE_TRACE("removing menu related file %s\n", value); - remove(value); - RegDeleteValueA(hkey, value); + struct stat filestats; + if (stat(windows_file, &filestats) < 0 && errno == ENOENT) + { + WINE_TRACE("removing menu related file %s\n", unix_file); + remove(unix_file); + RegDeleteValueW(hkey, value); + } + else + i++; } else - i++; + { + WINE_ERR("out of memory enumerating menus\n"); + lret = ERROR_OUTOFMEMORY; + } + HeapFree(GetProcessHeap(), 0, unix_file); + HeapFree(GetProcessHeap(), 0, windows_file); } else if (lret != ERROR_NO_MORE_ITEMS) - WINE_WARN("error %d reading registry\n", lret); + WINE_ERR("error %d reading registry\n", lret); HeapFree(GetProcessHeap(), 0, value); HeapFree(GetProcessHeap(), 0, data); }
1
0
0
0
Maarten Lankhorst : mmdevapi: Try to detect openal 1.11, and do not blacklist pulseaudio on it.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: d440eb7ff2bf0ab8be8d7f0d224dd93f530d393e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d440eb7ff2bf0ab8be8d7f0d2…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon May 3 19:36:51 2010 +0200 mmdevapi: Try to detect openal 1.11, and do not blacklist pulseaudio on it. --- dlls/mmdevapi/devenum.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 281faf5..85eeb5e 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -759,24 +759,50 @@ static int blacklist(const char *dev) { return 0; } -static void pulse_fixup(const char *devstr, const char **defstr) { +static void pulse_fixup(const char *devstr, const char **defstr, int render) { static int warned; + int default_pulse; - if (!blacklist_pulse && !local_contexts) + if (render && !blacklist_pulse && !local_contexts) blacklist_pulse = 1; - if (!blacklist_pulse || !devstr || strncmp(*defstr, "PulseAudio ", 11)) + if (!blacklist_pulse || !devstr || !*devstr) return; + default_pulse = !strncmp(*defstr, "PulseAudio ", 11); + + while (*devstr && !strncmp(devstr, "PulseAudio ", 11)) + devstr += strlen(devstr) + 1; + + /* Could still be a newer version, so check for 1.11 if more devices are enabled */ + if (render && *devstr) { + ALCdevice *dev = palcOpenDevice(devstr); + ALCcontext *ctx = palcCreateContext(dev, NULL); + if (ctx) { + const char *ver; + + setALContext(ctx); + ver = palGetString(AL_VERSION); + popALContext(); + palcDestroyContext(ctx); + + if (!strcmp(ver, "1.1 ALSOFT 1.11.753")) { + blacklist_pulse = 0; + palcCloseDevice(dev); + return; + } + } + if (dev) + palcCloseDevice(dev); + } + if (!warned++) { ERR("Disabling pulseaudio because of old openal version\n"); ERR("Please upgrade to openal-soft v1.12 or newer\n"); } - while (*devstr && !strncmp(devstr, "PulseAudio ", 11)) { - devstr += strlen(devstr) + 1; - } TRACE("New default: %s\n", devstr); - *defstr = devstr; + if (default_pulse) + *defstr = devstr; } static void openal_scanrender(void) @@ -793,7 +819,7 @@ static void openal_scanrender(void) defaultstr = palcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); devstr = palcGetString(NULL, ALC_DEVICE_SPECIFIER); } - pulse_fixup(devstr, &defaultstr); + pulse_fixup(devstr, &defaultstr, 1); defblacklisted = blacklist(defaultstr); if (defblacklisted) WARN("Disabling blacklist because %s is blacklisted\n", defaultstr); @@ -834,7 +860,7 @@ static void openal_scancapture(void) EnterCriticalSection(&openal_crst); devstr = palcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER); defaultstr = palcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER); - pulse_fixup(devstr, &defaultstr); + pulse_fixup(devstr, &defaultstr, 0); defblacklisted = blacklist(defaultstr); if (defblacklisted) WARN("Disabling blacklist because %s is blacklisted\n", defaultstr);
1
0
0
0
Maarten Lankhorst : msvcrt: Add float functions based on their double versions.
by Alexandre Julliard
04 May '10
04 May '10
Module: wine Branch: master Commit: af9f9cb361fa9a238d8ce46ba81d11d586a7a08f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af9f9cb361fa9a238d8ce46ba…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sat May 1 16:32:19 2010 +0200 msvcrt: Add float functions based on their double versions. --- dlls/msvcrt/math.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 22 +++++ 2 files changed, 229 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=af9f9cb361fa9a238d8ce…
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
...
96
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
91
92
93
94
95
96
Results per page:
10
25
50
100
200