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 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
838 discussions
Start a n
N
ew thread
Jay Yang : explorer: Fix incorrect cast.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 047124ab94f1e01da95317baac357a7dad09b39a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=047124ab94f1e01da95317baa…
Author: Jay Yang <jkelleyy(a)gmail.com> Date: Tue Jul 5 13:17:45 2011 -0400 explorer: Fix incorrect cast. --- programs/explorer/explorer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index e42065f..60f4157 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -346,7 +346,7 @@ static void make_explorer_window(IShellFolder* startFolder) IExplorerBrowser_Initialize(info->browser,info->main_window,&explorerRect,&fs); IExplorerBrowser_SetOptions(info->browser,EBO_SHOWFRAMES); - SetWindowLongPtrW(info->main_window,EXPLORER_INFO_INDEX,(LONG)info); + SetWindowLongPtrW(info->main_window,EXPLORER_INFO_INDEX,(LONG_PTR)info); /*setup navbar*/ rebar = CreateWindowExW(WS_EX_TOOLWINDOW,REBARCLASSNAMEW,NULL,
1
0
0
0
Alexandre Julliard : msvcp90/tests: Dynamically generate a thunk to call thiscall functions.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 99cdacb93b7d5ccfb4219c8ccbd2923dded4c6ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99cdacb93b7d5ccfb4219c8cc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 5 18:00:50 2011 +0200 msvcp90/tests: Dynamically generate a thunk to call thiscall functions. It's not possible to do this correctly with inline assembly. --- dlls/msvcp90/tests/misc.c | 113 ++++++---------------- dlls/msvcp90/tests/string.c | 226 ++++++++----------------------------------- 2 files changed, 72 insertions(+), 267 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=99cdacb93b7d5ccfb4219…
1
0
0
0
Stefan Dösinger : wined3d: Pass a struct wined3d_fb_state * to context_apply_clear_state.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 718c6149377d1ecdec054a8a64685b2f6abf653e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=718c6149377d1ecdec054a8a6…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jul 2 11:29:28 2011 +0200 wined3d: Pass a struct wined3d_fb_state * to context_apply_clear_state. --- dlls/wined3d/context.c | 11 ++++++----- dlls/wined3d/device.c | 2 +- dlls/wined3d/wined3d_private.h | 14 +++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 94ed896..7895156 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2083,19 +2083,20 @@ static BOOL context_validate_rt_config(UINT rt_count, /* Context activation is done by the caller. */ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device, - UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil) + UINT rt_count, const struct wined3d_fb_state *fb) { const struct StateEntry *state_table = device->StateTable; DWORD rt_mask = 0; UINT i; + struct wined3d_surface **rts = fb->render_targets; - if (!context_validate_rt_config(rt_count, rts, depth_stencil)) + if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil)) return FALSE; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - context_validate_onscreen_formats(device, context, depth_stencil); + context_validate_onscreen_formats(device, context, fb->depth_stencil); ENTER_GL(); @@ -2112,7 +2113,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d context->blit_targets[i] = NULL; ++i; } - context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE); + context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, fb->depth_stencil, SFLAG_INTEXTURE); glReadBuffer(GL_NONE); checkGLcall("glReadBuffer"); } @@ -2124,7 +2125,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d LEAVE_GL(); - /* TODO: This is not necessary if the rts are the device's current targets */ + /* TODO: This is not necessary if the framebuffer is the device's current framebuffer */ context_invalidate_state(context, STATE_FRAMEBUFFER, device->StateTable); } else diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 14e6613..a479119 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -685,7 +685,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count return WINED3D_OK; } - if (!context_apply_clear_state(context, device, rt_count, fb->render_targets, fb->depth_stencil)) + if (!context_apply_clear_state(context, device, rt_count, fb)) { context_release(context); WARN("Failed to apply clear state, skipping clear.\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1b040ff..1fedc9c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1130,6 +1130,12 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; +struct wined3d_fb_state +{ + struct wined3d_surface **render_targets; + struct wined3d_surface *depth_stencil; +}; + typedef void (*APPLYSTATEFUNC)(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *ctx); struct StateEntry @@ -1223,7 +1229,7 @@ void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device, - UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; + UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; @@ -1613,12 +1619,6 @@ void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN; /* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */ #define WINED3DCREATE_MULTITHREADED 0x00000004 -struct wined3d_fb_state -{ - struct wined3d_surface **render_targets; - struct wined3d_surface *depth_stencil; -}; - struct wined3d_device { LONG ref;
1
0
0
0
Stefan Dösinger : wined3d: Pass a struct wined3d_fb_state to device_clear_render_targets.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 053071e343c9b9847f1f8873843c46d112697fef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=053071e343c9b9847f1f88738…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jun 27 18:23:13 2011 +0200 wined3d: Pass a struct wined3d_fb_state to device_clear_render_targets. --- dlls/wined3d/device.c | 28 ++++++++++++++-------------- dlls/wined3d/surface.c | 6 ++++-- dlls/wined3d/wined3d_private.h | 6 +++--- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e9a98c4..14e6613 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -649,12 +649,12 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context } /* Do not call while under the GL lock. */ -HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, struct wined3d_surface **rts, - struct wined3d_surface *depth_stencil, UINT rect_count, const RECT *rects, const RECT *draw_rect, - DWORD flags, const WINED3DCOLORVALUE *color, float depth, DWORD stencil) +HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb, + UINT rect_count, const RECT *rects, const RECT *draw_rect, DWORD flags, const WINED3DCOLORVALUE *color, + float depth, DWORD stencil) { const RECT *clear_rect = (rect_count > 0 && rects) ? (const RECT *)rects : NULL; - struct wined3d_surface *target = rt_count ? rts[0] : NULL; + struct wined3d_surface *target = rt_count ? fb->render_targets[0] : NULL; UINT drawable_width, drawable_height; struct wined3d_context *context; GLbitfield clear_mask = 0; @@ -673,7 +673,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count { for (i = 0; i < rt_count; ++i) { - if (rts[i]) surface_load_location(rts[i], SFLAG_INDRAWABLE, NULL); + if (fb->render_targets[i]) surface_load_location(fb->render_targets[i], SFLAG_INDRAWABLE, NULL); } } @@ -685,7 +685,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count return WINED3D_OK; } - if (!context_apply_clear_state(context, device, rt_count, rts, depth_stencil)) + if (!context_apply_clear_state(context, device, rt_count, fb->render_targets, fb->depth_stencil)) { context_release(context); WARN("Failed to apply clear state, skipping clear.\n"); @@ -700,8 +700,8 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count else { render_offscreen = TRUE; - drawable_width = depth_stencil->pow2Width; - drawable_height = depth_stencil->pow2Height; + drawable_width = fb->depth_stencil->pow2Width; + drawable_height = fb->depth_stencil->pow2Height; } ENTER_GL(); @@ -725,14 +725,14 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count { DWORD location = render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; - if (location == SFLAG_DS_ONSCREEN && depth_stencil != device->onscreen_depth_stencil) + if (location == SFLAG_DS_ONSCREEN && fb->depth_stencil != device->onscreen_depth_stencil) { LEAVE_GL(); - device_switch_onscreen_ds(device, context, depth_stencil); + device_switch_onscreen_ds(device, context, fb->depth_stencil); ENTER_GL(); } - prepare_ds_clear(depth_stencil, context, location, draw_rect, rect_count, clear_rect); - surface_modify_location(depth_stencil, SFLAG_INDRAWABLE, TRUE); + prepare_ds_clear(fb->depth_stencil, context, location, draw_rect, rect_count, clear_rect); + surface_modify_location(fb->depth_stencil, SFLAG_INDRAWABLE, TRUE); glDepthMask(GL_TRUE); device_invalidate_state(device, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); @@ -745,7 +745,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count { for (i = 0; i < rt_count; ++i) { - if (rts[i]) surface_modify_location(rts[i], SFLAG_INDRAWABLE, TRUE); + if (fb->render_targets[i]) surface_modify_location(fb->render_targets[i], SFLAG_INDRAWABLE, TRUE); } glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); @@ -4043,7 +4043,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou device_get_draw_rect(device, &draw_rect); return device_clear_render_targets(device, device->adapter->gl_info.limits.buffers, - device->fb.render_targets, device->fb.depth_stencil, rect_count, rects, + &device->fb, rect_count, rects, &draw_rect, flags, &c, depth, stencil); } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d415159..46d2b84 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -6392,8 +6392,9 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d const RECT *dst_rect, const WINED3DCOLORVALUE *color) { const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; + struct wined3d_fb_state fb = {&dst_surface, NULL}; - return device_clear_render_targets(device, 1, &dst_surface, NULL, + return device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0); } @@ -6402,8 +6403,9 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device, struct wined3d_surface *surface, const RECT *rect, float depth) { const RECT draw_rect = {0, 0, surface->resource.width, surface->resource.height}; + struct wined3d_fb_state fb = {NULL, surface}; - return device_clear_render_targets(device, 0, NULL, surface, + return device_clear_render_targets(device, 0, &fb, 1, rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8f210d8..1b040ff 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1745,9 +1745,9 @@ struct wined3d_device struct WineD3DRectPatch *currentPatch; }; -HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, struct wined3d_surface **rts, - struct wined3d_surface *depth_stencil, UINT rect_count, const RECT *rects, const RECT *draw_rect, - DWORD flags, const WINED3DCOLORVALUE *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; +HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb, + UINT rect_count, const RECT *rects, const RECT *draw_rect, DWORD flags, + const WINED3DCOLORVALUE *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_get_draw_rect(struct wined3d_device *device, RECT *rect) DECLSPEC_HIDDEN;
1
0
0
0
Stefan Dösinger : wined3d: Track framebuffer changes.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: cd96c59d9168fbda25536d328edb24c0bc0e5139 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd96c59d9168fbda25536d328…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Jun 8 00:27:15 2011 +0200 wined3d: Track framebuffer changes. --- dlls/wined3d/context.c | 7 ++++--- dlls/wined3d/device.c | 4 ++++ dlls/wined3d/surface.c | 2 ++ dlls/wined3d/swapchain.c | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index cddd5f0..94ed896 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2061,6 +2061,7 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de LEAVE_GL(); SetupForBlit(device, context); + context_invalidate_state(context, STATE_FRAMEBUFFER, device->StateTable); } static BOOL context_validate_rt_config(UINT rt_count, @@ -2122,6 +2123,9 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d } LEAVE_GL(); + + /* TODO: This is not necessary if the rts are the device's current targets */ + context_invalidate_state(context, STATE_FRAMEBUFFER, device->StateTable); } else { @@ -2265,9 +2269,6 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de state_table[rep].apply(rep, device->stateBlock, context); } - /* FIXME */ - state_table[STATE_FRAMEBUFFER].apply(STATE_FRAMEBUFFER, device->stateBlock, context); - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { context_check_fbo_status(context, GL_FRAMEBUFFER); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f3fceac..e9a98c4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5129,6 +5129,8 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device, device_invalidate_state(device, STATE_SCISSORRECT); } + device_invalidate_state(device, STATE_FRAMEBUFFER); + return WINED3D_OK; } @@ -5179,6 +5181,8 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st device_invalidate_state(device, STATE_RENDER(WINED3DRS_DEPTHBIAS)); } + device_invalidate_state(device, STATE_FRAMEBUFFER); + return WINED3D_OK; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 8fbad09..d415159 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3993,6 +3993,7 @@ static void read_from_framebuffer_texture(struct wined3d_surface *surface, BOOL */ context = context_acquire(device, surface); gl_info = context->gl_info; + device_invalidate_state(device, STATE_FRAMEBUFFER); surface_prepare_texture(surface, gl_info, srgb); surface_bind_and_dirtify(surface, gl_info, srgb); @@ -5104,6 +5105,7 @@ static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREF context_set_draw_buffer(context, GL_COLOR_ATTACHMENT0); } context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER); + device_invalidate_state(device, STATE_FRAMEBUFFER); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE)); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 2242f66..dc1800a 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -309,6 +309,7 @@ static void swapchain_blit(struct wined3d_swapchain *swapchain, context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL); context_set_draw_buffer(context, GL_BACK); + device_invalidate_state(device, STATE_FRAMEBUFFER); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
1
0
0
0
Stefan Dösinger : wined3d: Move FBO application into a state handler.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: d321959dd7ba21b555f27d32937c911fa61117a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d321959dd7ba21b555f27d329…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jul 2 11:24:37 2011 +0200 wined3d: Move FBO application into a state handler. --- dlls/wined3d/context.c | 116 ++++++++++++++++++++++++--------------- dlls/wined3d/state.c | 3 + dlls/wined3d/utils.c | 2 + dlls/wined3d/wined3d_private.h | 9 +++- 4 files changed, 84 insertions(+), 46 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index c46b526..cddd5f0 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2161,79 +2161,96 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d return TRUE; } -/* Context activation is done by the caller. */ -BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) +static inline DWORD find_draw_buffers_mask(struct wined3d_context *context, struct wined3d_device *device) { - const struct StateEntry *state_table = device->StateTable; - const struct wined3d_fb_state *fb = &device->fb; + struct wined3d_shader *ps = device->stateBlock->state.pixel_shader; + struct wined3d_surface **rts = device->fb.render_targets; + DWORD rt_mask, rt_mask_bits; unsigned int i; - DWORD rt_mask; - if (!context_validate_rt_config(context->gl_info->limits.buffers, - fb->render_targets, fb->depth_stencil)) - return FALSE; + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return context_generate_rt_mask_no_fbo(device, rts[0]); + else if (!context->render_offscreen) return context_generate_rt_mask_from_surface(rts[0]); - /* Preload resources before FBO setup. Texture preload in particular may - * result in changes to the current FBO, due to using e.g. FBO blits for - * updating a resource location. */ - device_update_tex_unit_map(device); - device_preload_textures(device); - if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC)) - device_update_stream_info(device, context->gl_info); + rt_mask = ps ? ps->reg_maps.rt_mask : 1; + rt_mask &= device->valid_rt_mask; + rt_mask_bits = rt_mask; + i = 0; + while (rt_mask_bits) + { + rt_mask_bits &= ~(1 << i); + if (!rts[i] || rts[i]->resource.format->id == WINED3DFMT_NULL) + rt_mask &= ~(1 << i); + + i++; + } + + return rt_mask; +} + +/* GL locking and context activation are done by the caller */ +void context_state_fb(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + struct wined3d_device *device = stateblock->device; + const struct wined3d_fb_state *fb = &device->fb; + DWORD rt_mask = find_draw_buffers_mask(context, device); if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - context_validate_onscreen_formats(device, context, fb->depth_stencil); - if (!context->render_offscreen) { - ENTER_GL(); context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, SFLAG_INDRAWABLE); - LEAVE_GL(); - rt_mask = context_generate_rt_mask_from_surface(fb->render_targets[0]); } else { - const struct wined3d_shader *ps = device->stateBlock->state.pixel_shader; - DWORD rt_mask_bits; - struct wined3d_surface **rts = fb->render_targets; - - ENTER_GL(); context_apply_fbo_state(context, GL_FRAMEBUFFER, fb->render_targets, fb->depth_stencil, SFLAG_INTEXTURE); glReadBuffer(GL_NONE); checkGLcall("glReadBuffer"); - LEAVE_GL(); - rt_mask = ps ? ps->reg_maps.rt_mask : 1; - rt_mask &= device->valid_rt_mask; - rt_mask_bits = rt_mask; - i = 0; - while (rt_mask_bits) - { - rt_mask_bits &= ~(1 << i); - if (!rts[i] || rts[i]->resource.format->id == WINED3DFMT_NULL) - rt_mask &= ~(1 << i); - - i++; - } } } - else - { - rt_mask = context_generate_rt_mask_no_fbo(device, fb->render_targets[0]); - } - ENTER_GL(); if (context->draw_buffers_mask != rt_mask) { context_apply_draw_buffers(context, rt_mask); context->draw_buffers_mask = rt_mask; } +} - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) +/* GL locking and context activation are done by the caller */ +void context_state_drawbuf(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + DWORD rt_mask; + struct wined3d_device *device = stateblock->device; + + if (isStateDirty(context, STATE_FRAMEBUFFER)) return; + + rt_mask = find_draw_buffers_mask(context, device); + if (context->draw_buffers_mask != rt_mask) { - context_check_fbo_status(context, GL_FRAMEBUFFER); + context_apply_draw_buffers(context, rt_mask); + context->draw_buffers_mask = rt_mask; } +} +/* Context activation is done by the caller. */ +BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) +{ + const struct StateEntry *state_table = device->StateTable; + const struct wined3d_fb_state *fb = &device->fb; + unsigned int i; + + if (!context_validate_rt_config(context->gl_info->limits.buffers, + fb->render_targets, fb->depth_stencil)) + return FALSE; + + /* Preload resources before FBO setup. Texture preload in particular may + * result in changes to the current FBO, due to using e.g. FBO blits for + * updating a resource location. */ + device_update_tex_unit_map(device); + device_preload_textures(device); + if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC)) + device_update_stream_info(device, context->gl_info); + + ENTER_GL(); if (context->last_was_blit) { device->frag_pipe->enable_extension(TRUE); @@ -2247,6 +2264,15 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de context->isStateDirty[idx] &= ~(1 << shift); state_table[rep].apply(rep, device->stateBlock, context); } + + /* FIXME */ + state_table[STATE_FRAMEBUFFER].apply(STATE_FRAMEBUFFER, device->stateBlock, context); + + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + context_check_fbo_status(context, GL_FRAMEBUFFER); + } + LEAVE_GL(); context->numDirtyEntries = 0; /* This makes the whole list clean */ context->last_was_blit = FALSE; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index ab6a7d7..3fe2ddf 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5098,6 +5098,8 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_SAMPLER(19), /* Vertex sampler 3 */ { STATE_SAMPLER(19), sampler }, WINED3D_GL_EXT_NONE }, { STATE_BASEVERTEXINDEX, { STATE_BASEVERTEXINDEX, state_nop, }, ARB_DRAW_ELEMENTS_BASE_VERTEX }, { STATE_BASEVERTEXINDEX, { STATE_STREAMSRC, NULL, }, WINED3D_GL_EXT_NONE }, + { STATE_FRAMEBUFFER, { STATE_FRAMEBUFFER, context_state_fb }, WINED3D_GL_EXT_NONE }, + { STATE_PIXELSHADER, { STATE_PIXELSHADER, context_state_drawbuf},WINED3D_GL_EXT_NONE }, {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; @@ -5761,6 +5763,7 @@ static void validate_state_table(struct StateEntry *state_table) STATE_FRONTFACE, STATE_POINTSPRITECOORDORIGIN, STATE_BASEVERTEXINDEX, + STATE_FRAMEBUFFER }; unsigned int i, current; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 25cb4ee..11a52b6 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2249,6 +2249,8 @@ const char *debug_d3dstate(DWORD state) return "STATE_POINTSPRITECOORDORIGIN"; if (STATE_IS_BASEVERTEXINDEX(state)) return "STATE_BASEVERTEXINDEX"; + if (STATE_IS_FRAMEBUFFER(state)) + return "STATE_FRAMEBUFFER"; return wine_dbg_sprintf("UNKNOWN_STATE(%#x)", state); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f4947f1..8f210d8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -998,7 +998,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC #define STATE_BASEVERTEXINDEX (STATE_POINTSPRITECOORDORIGIN + 1) #define STATE_IS_BASEVERTEXINDEX(a) ((a) == STATE_BASEVERTEXINDEX) -#define STATE_HIGHEST (STATE_BASEVERTEXINDEX) +#define STATE_FRAMEBUFFER (STATE_BASEVERTEXINDEX + 1) +#define STATE_IS_FRAMEBUFFER(a) ((a) == STATE_FRAMEBUFFER) + +#define STATE_HIGHEST (STATE_FRAMEBUFFER) enum fogsource { FOGSOURCE_FFP, @@ -1243,6 +1246,10 @@ void context_resource_unloaded(const struct wined3d_device *device, BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN; void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) DECLSPEC_HIDDEN; void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN; +void context_state_drawbuf(DWORD state, struct wined3d_stateblock *stateblock, + struct wined3d_context *context) DECLSPEC_HIDDEN; +void context_state_fb(DWORD state, struct wined3d_stateblock *stateblock, + struct wined3d_context *context) DECLSPEC_HIDDEN; void context_surface_update(struct wined3d_context *context, const struct wined3d_surface *surface) DECLSPEC_HIDDEN; /*****************************************************************************
1
0
0
0
Stefan Dösinger : wined3d: Rename the rt mask generation functions.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 1aa85c96a984af8094b8ec0fe382b4a45f7c21f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1aa85c96a984af8094b8ec0fe…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Jun 30 23:21:03 2011 +0200 wined3d: Rename the rt mask generation functions. --- dlls/wined3d/context.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index ed80b78..c46b526 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1232,13 +1232,13 @@ static int WineD3D_ChoosePixelFormat(struct wined3d_device *device, HDC hdc, return iPixelFormat; } -static inline DWORD generate_rt_mask(GLenum buffer) +static inline DWORD context_generate_rt_mask(GLenum buffer) { /* Should take care of all the GL_FRONT/GL_BACK/GL_AUXi/GL_NONE... cases */ return buffer ? (1 << 31) | buffer : 0; } -static inline DWORD generate_rt_mask_from_surface(const struct wined3d_surface *target) +static inline DWORD context_generate_rt_mask_from_surface(const struct wined3d_surface *target) { return (1 << 31) | surface_get_gl_buffer(target); } @@ -1379,7 +1379,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, ret->tid = GetCurrentThreadId(); ret->render_offscreen = surface_is_offscreen(target); - ret->draw_buffers_mask = generate_rt_mask(GL_BACK); + ret->draw_buffers_mask = context_generate_rt_mask(GL_BACK); ret->valid = 1; ret->glCtx = ctx; @@ -1948,7 +1948,7 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) { glDrawBuffer(buffer); checkGLcall("glDrawBuffer()"); - context->draw_buffers_mask = generate_rt_mask(buffer); + context->draw_buffers_mask = context_generate_rt_mask(buffer); } static inline void context_set_render_offscreen(struct wined3d_context *context, const struct StateEntry *StateTable, @@ -2003,14 +2003,14 @@ static void context_validate_onscreen_formats(struct wined3d_device *device, context_set_render_offscreen(context, device->StateTable, TRUE); } -static DWORD generate_rt_mask_no_fbo(const struct wined3d_device *device, const struct wined3d_surface *rt) +static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_device *device, const struct wined3d_surface *rt) { if (!rt || rt->resource.format->id == WINED3DFMT_NULL) return 0; else if (rt->container.type == WINED3D_CONTAINER_SWAPCHAIN) - return generate_rt_mask_from_surface(rt); + return context_generate_rt_mask_from_surface(rt); else - return generate_rt_mask(device->offscreenBuffer); + return context_generate_rt_mask(device->offscreenBuffer); } /* Context activation is done by the caller. */ @@ -2039,12 +2039,12 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de ENTER_GL(); context_bind_fbo(context, GL_FRAMEBUFFER, NULL); LEAVE_GL(); - rt_mask = generate_rt_mask_from_surface(context->current_rt); + rt_mask = context_generate_rt_mask_from_surface(context->current_rt); } } else { - rt_mask = generate_rt_mask_no_fbo(device, context->current_rt); + rt_mask = context_generate_rt_mask_no_fbo(device, context->current_rt); } ENTER_GL(); @@ -2118,14 +2118,14 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d else { context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, SFLAG_INDRAWABLE); - rt_mask = generate_rt_mask_from_surface(rts[0]); + rt_mask = context_generate_rt_mask_from_surface(rts[0]); } LEAVE_GL(); } else { - rt_mask = generate_rt_mask_no_fbo(device, rts[0]); + rt_mask = context_generate_rt_mask_no_fbo(device, rts[0]); } ENTER_GL(); @@ -2190,7 +2190,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de ENTER_GL(); context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, SFLAG_INDRAWABLE); LEAVE_GL(); - rt_mask = generate_rt_mask_from_surface(fb->render_targets[0]); + rt_mask = context_generate_rt_mask_from_surface(fb->render_targets[0]); } else { @@ -2219,7 +2219,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de } else { - rt_mask = generate_rt_mask_no_fbo(device, fb->render_targets[0]); + rt_mask = context_generate_rt_mask_no_fbo(device, fb->render_targets[0]); } ENTER_GL();
1
0
0
0
André Hentschel : mountmgr.sys: Better fixme for unsupported ioctls.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 9752bf8f0421c3d53f8c49be87083f5b3e7ae40a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9752bf8f0421c3d53f8c49be8…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Jul 4 22:06:24 2011 +0200 mountmgr.sys: Better fixme for unsupported ioctls. --- dlls/mountmgr.sys/device.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 8b91be6..a3aa81c 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -938,10 +938,14 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp ) break; } default: - FIXME( "unsupported ioctl %x\n", irpsp->Parameters.DeviceIoControl.IoControlCode ); + { + ULONG code = irpsp->Parameters.DeviceIoControl.IoControlCode; + FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n", + code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3); irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED; break; } + } LeaveCriticalSection( &device_section ); IoCompleteRequest( irp, IO_NO_INCREMENT );
1
0
0
0
André Hentschel : shdocvw: Add ITaskbarList[34] Interface.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 8b733dd31348e26a0fdf47775eca0cec68aa25f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b733dd31348e26a0fdf47775…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jul 3 13:35:51 2011 +0200 shdocvw: Add ITaskbarList[34] Interface. --- dlls/shdocvw/taskbarlist.c | 178 +++++++++++++++++++++++++++++++++++++++----- 1 files changed, 160 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8b733dd31348e26a0fdf4…
1
0
0
0
Vincent Povirk : user32: Notify the user driver of hotkey changes.
by Alexandre Julliard
05 Jul '11
05 Jul '11
Module: wine Branch: master Commit: 8c0d568c32c4ce5938e825a35e92356af5829060 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c0d568c32c4ce5938e825a35…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Jun 23 12:34:26 2011 -0500 user32: Notify the user driver of hotkey changes. --- dlls/user32/driver.c | 25 +++++++++++++++++++++++++ dlls/user32/input.c | 25 ++++++++++++++++++++----- dlls/user32/user_private.h | 2 ++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index d152f86..6e21ca2 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -80,8 +80,10 @@ static const USER_DRIVER *load_driver(void) GET_USER_FUNC(GetKeyboardLayoutName); GET_USER_FUNC(LoadKeyboardLayout); GET_USER_FUNC(MapVirtualKeyEx); + GET_USER_FUNC(RegisterHotKey); GET_USER_FUNC(ToUnicodeEx); GET_USER_FUNC(UnloadKeyboardLayout); + GET_USER_FUNC(UnregisterHotKey); GET_USER_FUNC(VkKeyScanEx); GET_USER_FUNC(CreateCursorIcon); GET_USER_FUNC(DestroyCursorIcon); @@ -193,6 +195,11 @@ static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout ) return 0; } +static BOOL CDECL nulldrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) +{ + return TRUE; +} + static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str, int size, UINT flags, HKL layout ) { @@ -204,6 +211,10 @@ static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout ) return 0; } +static void CDECL nulldrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) +{ +} + static SHORT CDECL nulldrv_VkKeyScanEx( WCHAR ch, HKL layout ) { return -1; @@ -430,8 +441,10 @@ static USER_DRIVER null_driver = nulldrv_GetKeyboardLayoutName, nulldrv_LoadKeyboardLayout, nulldrv_MapVirtualKeyEx, + nulldrv_RegisterHotKey, nulldrv_ToUnicodeEx, nulldrv_UnloadKeyboardLayout, + nulldrv_UnregisterHotKey, nulldrv_VkKeyScanEx, /* cursor/icon functions */ nulldrv_CreateCursorIcon, @@ -528,6 +541,11 @@ static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout ) return load_driver()->pMapVirtualKeyEx( code, type, layout ); } +static BOOL CDECL loaderdrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) +{ + return load_driver()->pRegisterHotKey( hwnd, modifiers, vk ); +} + static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str, int size, UINT flags, HKL layout ) { @@ -539,6 +557,11 @@ static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout ) return load_driver()->pUnloadKeyboardLayout( layout ); } +static void CDECL loaderdrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk ) +{ + load_driver()->pUnregisterHotKey( hwnd, modifiers, vk ); +} + static SHORT CDECL loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout ) { return load_driver()->pVkKeyScanEx( ch, layout ); @@ -765,8 +788,10 @@ static USER_DRIVER lazy_load_driver = loaderdrv_GetKeyboardLayoutName, loaderdrv_LoadKeyboardLayout, loaderdrv_MapVirtualKeyEx, + loaderdrv_RegisterHotKey, loaderdrv_ToUnicodeEx, loaderdrv_UnloadKeyboardLayout, + loaderdrv_UnregisterHotKey, loaderdrv_VkKeyScanEx, /* cursor/icon functions */ loaderdrv_CreateCursorIcon, diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 335be1f..1ffce8d 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -984,10 +984,13 @@ UINT WINAPI GetKeyboardLayoutList(INT nBuff, HKL *layouts) BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) { BOOL ret; + int replaced=0; TRACE_(keyboard)("(%p,%d,0x%08x,%X)\n",hwnd,id,modifiers,vk); - /* FIXME: Register hotkey with user driver. */ + if ((hwnd == NULL || WIN_IsCurrentThread(hwnd)) && + !USER_Driver->pRegisterHotKey(hwnd, modifiers, vk)) + return FALSE; SERVER_START_REQ( register_hotkey ) { @@ -995,11 +998,17 @@ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) req->id = id; req->flags = modifiers; req->vkey = vk; - ret = !wine_server_call_err( req ); + if ((ret = !wine_server_call_err( req ))) + { + replaced = reply->replaced; + modifiers = reply->flags; + vk = reply->vkey; + } } SERVER_END_REQ; - /* FIXME: Unregister new or replaced hotkey with user driver if necessary. */ + if (ret && replaced) + USER_Driver->pUnregisterHotKey(hwnd, modifiers, vk); return ret; } @@ -1010,6 +1019,7 @@ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { BOOL ret; + UINT modifiers, vk; TRACE_(keyboard)("(%p,%d)\n",hwnd,id); @@ -1017,11 +1027,16 @@ BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { req->window = wine_server_user_handle( hwnd ); req->id = id; - ret = !wine_server_call_err( req ); + if ((ret = !wine_server_call_err( req ))) + { + modifiers = reply->flags; + vk = reply->vkey; + } } SERVER_END_REQ; - /* FIXME: Unregister hotkey with user driver if necessary. */ + if (ret) + USER_Driver->pUnregisterHotKey(hwnd, modifiers, vk); return ret; } diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 92b52a3..399974e 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -62,8 +62,10 @@ typedef struct tagUSER_DRIVER { BOOL (CDECL *pGetKeyboardLayoutName)(LPWSTR); HKL (CDECL *pLoadKeyboardLayout)(LPCWSTR, UINT); UINT (CDECL *pMapVirtualKeyEx)(UINT, UINT, HKL); + BOOL (CDECL *pRegisterHotKey)(HWND, UINT, UINT); INT (CDECL *pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL); BOOL (CDECL *pUnloadKeyboardLayout)(HKL); + void (CDECL *pUnregisterHotKey)(HWND, UINT, UINT); SHORT (CDECL *pVkKeyScanEx)(WCHAR, HKL); /* cursor/icon functions */ void (CDECL *pCreateCursorIcon)(HCURSOR);
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
84
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
Results per page:
10
25
50
100
200