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
December 2014
----- 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
319 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Do more initialization in create_plugin_host.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 5bce6044519a2ccc4d0958842bfd40510545632a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bce6044519a2ccc4d0958842…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 11 16:26:09 2014 +0100 mshtml: Do more initialization in create_plugin_host. --- dlls/mshtml/pluginhost.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 8e12865..b6fcf72 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -182,7 +182,7 @@ static void load_plugin(PluginHost *host) FIXME("No IPersistPropertyBag iface\n"); } -static void activate_plugin(PluginHost *host) +static void initialize_plugin_object(PluginHost *host) { IClientSecurity *client_security; IQuickActivate *quick_activate; @@ -191,12 +191,8 @@ static void activate_plugin(PluginHost *host) IViewObjectEx *view_obj; IDispatchEx *dispex; IDispatch *disp; - RECT rect; HRESULT hres; - if(!host->plugin_unk) - return; - /* Note native calls QI on plugin for an undocumented IID and CLSID_HTMLDocument */ /* FIXME: call FreezeEvents(TRUE) */ @@ -281,6 +277,13 @@ static void activate_plugin(PluginHost *host) FIXME("Use IOleCommandTarget\n"); IOleCommandTarget_Release(cmdtrg); } +} + +static void embed_plugin_object(PluginHost *host) +{ + IOleObject *ole_obj; + RECT rect; + HRESULT hres; hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IOleObject, (void**)&ole_obj); if(FAILED(hres)) { @@ -288,13 +291,11 @@ static void activate_plugin(PluginHost *host) return; } - if(ole_obj) { - get_pos_rect(host, &rect); - hres = IOleObject_DoVerb(ole_obj, OLEIVERB_INPLACEACTIVATE, NULL, &host->IOleClientSite_iface, 0, host->hwnd, &rect); - IOleObject_Release(ole_obj); - if(FAILED(hres)) - WARN("DoVerb failed: %08x\n", hres); - } + get_pos_rect(host, &rect); + hres = IOleObject_DoVerb(ole_obj, OLEIVERB_INPLACEACTIVATE, NULL, &host->IOleClientSite_iface, 0, host->hwnd, &rect); + IOleObject_Release(ole_obj); + if(FAILED(hres)) + WARN("DoVerb failed: %08x\n", hres); if(host->ip_object) { HWND hwnd; @@ -323,7 +324,7 @@ void update_plugin_window(PluginHost *host, HWND hwnd, const RECT *rect) if(!host->hwnd) { host->hwnd = hwnd; - activate_plugin(host); + embed_plugin_object(host); } if(rect_changed && host->ip_object) @@ -2103,5 +2104,8 @@ HRESULT create_plugin_host(HTMLDocumentNode *doc, HTMLPluginContainer *container container->plugin_host = host; host->element = container; + + initialize_plugin_object(host); + return S_OK; }
1
0
0
0
Jacek Caban : mshtml: Create ActiveX object inside create_plugin_host.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 2ff987322f63a9f9765fd67d710447c176f10c58 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ff987322f63a9f9765fd67d7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 11 16:26:04 2014 +0100 mshtml: Create ActiveX object inside create_plugin_host. --- dlls/mshtml/npplugin.c | 388 +---------------------------------------------- dlls/mshtml/pluginhost.c | 387 +++++++++++++++++++++++++++++++++++++++++++++- dlls/mshtml/pluginhost.h | 2 +- 3 files changed, 390 insertions(+), 387 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2ff987322f63a9f9765fd…
1
0
0
0
Jacek Caban : mshtml: Pass HTMLPluginContainer to create_plugin_host.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: a545fe08ad9a52ac2ad84ef444be630955dc15af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a545fe08ad9a52ac2ad84ef44…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 11 16:25:49 2014 +0100 mshtml: Pass HTMLPluginContainer to create_plugin_host. --- dlls/mshtml/npplugin.c | 27 ++++++++++++++++++++------- dlls/mshtml/pluginhost.c | 37 +++++-------------------------------- dlls/mshtml/pluginhost.h | 2 +- 3 files changed, 26 insertions(+), 40 deletions(-) diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c index ca0d9fd..7c31a24 100644 --- a/dlls/mshtml/npplugin.c +++ b/dlls/mshtml/npplugin.c @@ -639,11 +639,14 @@ static IUnknown *create_activex_object(HTMLInnerWindow *window, nsIDOMHTMLElemen static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, INT16 argc, char **argn, char **argv, NPSavedData *saved) { + HTMLPluginContainer *container; nsIDOMHTMLElement *nselem; HTMLInnerWindow *window; + HTMLDOMNode *node; IUnknown *obj; CLSID clsid; NPError err = NPERR_NO_ERROR; + HRESULT hres; TRACE("(%s %p %x %d %p %p %p)\n", debugstr_a(pluginType), instance, mode, argc, argn, argv, saved); @@ -660,22 +663,32 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I return NPERR_GENERIC_ERROR; } - obj = create_activex_object(window, nselem, &clsid); - if(obj) { - PluginHost *host; - HRESULT hres; + hres = get_node(window->doc, (nsIDOMNode*)nselem, TRUE, &node); + nsIDOMHTMLElement_Release(nselem); + if(FAILED(hres)) + return NPERR_GENERIC_ERROR; - hres = create_plugin_host(window->doc, (nsIDOMElement*)nselem, obj, &clsid, &host); + hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_HTMLPluginContainer, + (void**)&container); + node_release(node); + if(FAILED(hres)) { + ERR("Not an object element\n"); + return NPERR_GENERIC_ERROR; + } + + obj = create_activex_object(window, container->element.nselem, &clsid); + if(obj) { + hres = create_plugin_host(window->doc, container, obj, &clsid); IUnknown_Release(obj); if(SUCCEEDED(hres)) - instance->pdata = host; + instance->pdata = container->plugin_host; else err = NPERR_GENERIC_ERROR; }else { err = NPERR_GENERIC_ERROR; } - nsIDOMHTMLElement_Release(nselem); + node_release(&container->element.node); return err; } diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 7c1b760..2d71264 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -1634,29 +1634,6 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { PHServiceProvider_QueryService }; -static HRESULT assoc_element(PluginHost *host, HTMLDocumentNode *doc, nsIDOMElement *nselem) -{ - HTMLPluginContainer *container_elem; - HTMLDOMNode *node; - HRESULT hres; - - hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node); - if(FAILED(hres)) - return hres; - - hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_HTMLPluginContainer, - (void**)&container_elem); - node_release(node); - if(FAILED(hres)) { - ERR("Not an object element\n"); - return hres; - } - - container_elem->plugin_host = host; - host->element = container_elem; - return S_OK; -} - void detach_plugin_host(PluginHost *host) { HRESULT hres; @@ -1717,10 +1694,11 @@ void detach_plugin_host(PluginHost *host) host->doc = NULL; } -HRESULT create_plugin_host(HTMLDocumentNode *doc, nsIDOMElement *nselem, IUnknown *unk, const CLSID *clsid, PluginHost **ret) +HRESULT create_plugin_host(HTMLDocumentNode *doc, HTMLPluginContainer *container, IUnknown *unk, const CLSID *clsid) { PluginHost *host; - HRESULT hres; + + assert(!container->plugin_host); host = heap_alloc_zero(sizeof(*host)); if(!host) @@ -1737,12 +1715,6 @@ HRESULT create_plugin_host(HTMLDocumentNode *doc, nsIDOMElement *nselem, IUnknow host->ref = 1; - hres = assoc_element(host, doc, nselem); - if(FAILED(hres)) { - heap_free(host); - return hres; - } - IUnknown_AddRef(unk); host->plugin_unk = unk; host->clsid = *clsid; @@ -1750,6 +1722,7 @@ HRESULT create_plugin_host(HTMLDocumentNode *doc, nsIDOMElement *nselem, IUnknow host->doc = doc; list_add_tail(&doc->plugin_hosts, &host->entry); - *ret = host; + container->plugin_host = host; + host->element = container; return S_OK; } diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index 5cc5ad0..f1c0a74 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -60,7 +60,7 @@ struct HTMLPluginContainer { extern const IID IID_HTMLPluginContainer DECLSPEC_HIDDEN; -HRESULT create_plugin_host(HTMLDocumentNode*,nsIDOMElement*,IUnknown*,const CLSID*,PluginHost**) DECLSPEC_HIDDEN; +HRESULT create_plugin_host(HTMLDocumentNode*,HTMLPluginContainer*,IUnknown*,const CLSID*) DECLSPEC_HIDDEN; void update_plugin_window(PluginHost*,HWND,const RECT*) DECLSPEC_HIDDEN; void detach_plugin_host(PluginHost*) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : dwrite: Block creation of unsupported face types.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 44bb2ba295fa010e2a886e981a9a282224d06197 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44bb2ba295fa010e2a886e981…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 11 12:33:29 2014 +0300 dwrite: Block creation of unsupported face types. --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/main.c | 26 +++++++++++--- dlls/dwrite/opentype.c | 27 +++++++++----- dlls/dwrite/tests/font.c | 86 +++++++++++++++++++++++++++++++++++--------- 4 files changed, 109 insertions(+), 31 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=44bb2ba295fa010e2a886…
1
0
0
0
Erich E. Hoover : ddraw: Fix inverted logic for enumerating secondary devices.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 3d5fe2074e569a9d846a6018792d68d76d3eb38d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d5fe2074e569a9d846a60187…
Author: Erich E. Hoover <erich.e.hoover(a)gmail.com> Date: Thu Nov 13 09:20:15 2014 -0700 ddraw: Fix inverted logic for enumerating secondary devices. --- dlls/ddraw/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index 68bf3e3..eb52360 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -430,7 +430,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex cont_enum = callback(NULL, driver_desc, driver_name, context, 0); /* The
Battle.net
System Checker expects both a NULL device and a GUID-based device */ - if (cont_enum && (flags & ~DDENUM_ATTACHEDSECONDARYDEVICES)) + if (cont_enum && (flags & DDENUM_ATTACHEDSECONDARYDEVICES)) ddraw_enumerate_secondary_devices(wined3d, callback, context); } __EXCEPT_PAGE_FAULT
1
0
0
0
Martin Storsjo : msvcp120_app: Add forwarding dll.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 69269a7f01da5c628d49148546aa6aa5239e1654 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69269a7f01da5c628d4914854…
Author: Martin Storsjo <martin(a)martin.st> Date: Wed Dec 10 15:44:04 2014 +0200 msvcp120_app: Add forwarding dll. --- configure | 2 + configure.ac | 1 + dlls/msvcp120_app/Makefile.in | 1 + dlls/msvcp120_app/msvcp120_app.spec | 3846 +++++++++++++++++++++++++++++++++++ tools/make_specfiles | 4 + 5 files changed, 3854 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=69269a7f01da5c628d491…
1
0
0
0
Bruno Jesus : winmm/tests: Add joystick tests.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 2a5f5b89fd6ab9c41265ccf45a05453b39bee50b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a5f5b89fd6ab9c41265ccf45…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Dec 11 02:54:36 2014 -0200 winmm/tests: Add joystick tests. --- dlls/winmm/tests/Makefile.in | 1 + dlls/winmm/tests/joystick.c | 205 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) diff --git a/dlls/winmm/tests/Makefile.in b/dlls/winmm/tests/Makefile.in index 887a695..5d81e38 100644 --- a/dlls/winmm/tests/Makefile.in +++ b/dlls/winmm/tests/Makefile.in @@ -4,6 +4,7 @@ IMPORTS = winmm user32 advapi32 C_SRCS = \ capture.c \ generated.c \ + joystick.c \ mci.c \ mcicda.c \ midi.c \ diff --git a/dlls/winmm/tests/joystick.c b/dlls/winmm/tests/joystick.c new file mode 100644 index 0000000..21e90e3 --- /dev/null +++ b/dlls/winmm/tests/joystick.c @@ -0,0 +1,205 @@ +/* + * Unit tests for joystick APIs + * + * Copyright 2014 Bruno Jesus + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "mmsystem.h" +#include "wine/test.h" + +static HWND window; + +static LRESULT CALLBACK proc_window(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + return DefWindowProcA(hwnd, msg, wparam, lparam); +} + +static void create_window(void) +{ + const char name[] = "Joystick Test"; + WNDCLASSA wc; + + memset(&wc, 0, sizeof(wc)); + wc.lpfnWndProc = proc_window; + wc.hInstance = 0; + wc.lpszClassName = name; + RegisterClassA(&wc); + window = CreateWindowExA(0, name, name, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + NULL, NULL, NULL, NULL); + ok(window != NULL, "Expected CreateWindowEx to work, error %d\n", GetLastError()); +} + +static void destroy_window(void) +{ + DestroyWindow(window); + window = NULL; +} + +static void test_api(void) +{ + MMRESULT ret; + JOYCAPSA jc; + JOYCAPSW jcw; + JOYINFO info; + union _infoex + { + JOYINFOEX ex; + char buffer[sizeof(JOYINFOEX) * 2]; + } infoex; + UINT i, par, devices, joyid, win98 = 0, win8 = 0; + UINT period[] = {0, 1, 9, 10, 100, 1000, 1001, 10000, 65535, 65536, 0xFFFFFFFF}; + UINT threshold_error = 0x600, period_win8_error = 0x7CE; + UINT flags[] = { JOY_RETURNALL, JOY_RETURNBUTTONS, JOY_RETURNCENTERED, JOY_RETURNPOV, + JOY_RETURNPOVCTS, JOY_RETURNR, JOY_RETURNRAWDATA, JOY_RETURNU, + JOY_RETURNV, JOY_RETURNX, JOY_RETURNY, JOY_RETURNZ }; + + devices = joyGetNumDevs(); + joyid = -1; + /* joyGetNumDevs does NOT return the number of joysticks connected, only slots in the OS */ + for (i = 0; i < devices; i++) + { + memset(&jc, 0, sizeof(jc)); + ret = joyGetDevCapsA(JOYSTICKID1 + i, &jc, sizeof(jc)); + if (ret == JOYERR_NOERROR) + { + joyid = JOYSTICKID1 + i; + trace("Joystick[%d] - name: '%s', axes: %d, buttons: %d, period range: %d - %d\n", + JOYSTICKID1 + i, jc.szPname, jc.wNumAxes, jc.wNumButtons, jc.wPeriodMin, jc.wPeriodMax); + ret = joyGetDevCapsW(JOYSTICKID1 + i, &jcw, sizeof(jcw)); + if (ret != MMSYSERR_NOTSUPPORTED) /* Win 98 */ + { + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + ok(jc.wNumAxes == jcw.wNumAxes, "Expected %d == %d\n", jc.wNumAxes, jcw.wNumAxes); + ok(jc.wNumButtons == jcw.wNumButtons, "Expected %d == %d\n", jc.wNumButtons, jcw.wNumButtons); + } + else win98++; + break; + } + else + { + ok(ret == JOYERR_PARMS, "Expected %d, got %d\n", JOYERR_PARMS, ret); + ret = joyGetDevCapsW(JOYSTICKID1 + i, &jcw, sizeof(jcw)); + ok(ret == JOYERR_PARMS || (ret == MMSYSERR_NOTSUPPORTED) /* Win 98 */, + "Expected %d, got %d\n", JOYERR_PARMS, ret); + } + } + /* Test invalid joystick - If no joystick is present the driver is not initialized, + * so a NODRIVER error is returned, if at least one joystick is present the error is + * about invalid parameters. */ + ret = joyGetDevCapsA(joyid + devices, &jc, sizeof(jc)); + ok(ret == MMSYSERR_NODRIVER || ret == JOYERR_PARMS, + "Expected %d or %d, got %d\n", MMSYSERR_NODRIVER, JOYERR_PARMS, ret); + + if (joyid == -1) + { + skip("This test requires a real joystick.\n"); + return; + } + + /* Capture tests */ + ret = joySetCapture(NULL, joyid, 100, FALSE); + ok(ret == JOYERR_PARMS || broken(win98 && ret == MMSYSERR_INVALPARAM) /* Win 98 */, + "Expected %d, got %d\n", JOYERR_PARMS, ret); + ret = joySetCapture(window, joyid, 100, FALSE); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + ret = joySetCapture(window, joyid, 100, FALSE); /* double capture */ + if (ret == JOYERR_NOCANDO) + { + todo_wine + ok(broken(1), "Expected double capture using joySetCapture to work\n"); + if (!win98 && broken(1)) win8++; /* Windows 98 or 8 cannot cope with that */ + } + else ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + ret = joyReleaseCapture(joyid); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + ret = joyReleaseCapture(joyid); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); /* double release */ + + /* Try some unusual period values for joySetCapture and unusual threshold values for joySetThreshold. + * Windows XP allows almost all test values, Windows 8 will return error on most test values, Windows + * 98 allows anything but cuts the values to their maximum supported values internally. */ + for (i = 0; i < sizeof(period) / sizeof(period[0]); i++) + { + ret = joySetCapture(window, joyid, period[i], FALSE); + if (win8 && ((1 << i) & period_win8_error)) + ok(ret == JOYERR_NOCANDO, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOCANDO, ret); + else + ok(ret == JOYERR_NOERROR, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOERROR, ret); + ret = joyReleaseCapture(joyid); + ok(ret == JOYERR_NOERROR, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOERROR, ret); + /* Reuse the periods to test the threshold */ + ret = joySetThreshold(joyid, period[i]); + if (!win98 && (1 << i) & threshold_error) + ok(ret == MMSYSERR_INVALPARAM, "Test [%d]: Expected %d, got %d\n", i, MMSYSERR_INVALPARAM, ret); + else + ok(ret == JOYERR_NOERROR, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOERROR, ret); + par = 0xdead; + ret = joyGetThreshold(joyid, &par); + ok(ret == JOYERR_NOERROR, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOERROR, ret); + if (!win98 || (win98 && i < 8)) + { + if ((1 << i) & threshold_error) + ok(par == period[8], "Test [%d]: Expected %d, got %d\n", i, period[8], par); + else + ok(par == period[i], "Test [%d]: Expected %d, got %d\n", i, period[i], par); + } + } + + /* Position tests */ + ret = joyGetPos(joyid, NULL); + ok(ret == MMSYSERR_INVALPARAM, "Expected %d, got %d\n", MMSYSERR_INVALPARAM, ret); + ret = joyGetPos(joyid, &info); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + ret = joyGetPosEx(joyid, NULL); + ok(ret == MMSYSERR_INVALPARAM || broken(win8 && ret == JOYERR_PARMS) /* Win 8 */, + "Expected %d, got %d\n", MMSYSERR_INVALPARAM, ret); + memset(&infoex, 0, sizeof(infoex)); + ret = joyGetPosEx(joyid, &infoex.ex); + ok(ret == JOYERR_PARMS || broken(win98 && ret == MMSYSERR_INVALPARAM), + "Expected %d, got %d\n", JOYERR_PARMS, ret); + infoex.ex.dwSize = sizeof(infoex.ex); + ret = joyGetPosEx(joyid, &infoex.ex); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + infoex.ex.dwSize = sizeof(infoex.ex) - 1; + ret = joyGetPosEx(joyid, &infoex.ex); + ok(ret == JOYERR_PARMS || broken(win98 && ret == MMSYSERR_INVALPARAM), + "Expected %d, got %d\n", JOYERR_PARMS, ret); + infoex.ex.dwSize = sizeof(infoex); + ret = joyGetPosEx(joyid, &infoex.ex); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + + infoex.ex.dwSize = sizeof(infoex.ex); + for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) + { + infoex.ex.dwFlags = flags[i]; + ret = joyGetPosEx(joyid, &infoex.ex); + ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); + } +} + +START_TEST(joystick) +{ + create_window(); + test_api(); + destroy_window(); +}
1
0
0
0
Bruno Jesus : winmm: Handle invalid threshold values in joySetThreshold.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 125b0f74c5e57350f29062f02452270a8d893b1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=125b0f74c5e57350f29062f02…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Dec 11 02:54:01 2014 -0200 winmm: Handle invalid threshold values in joySetThreshold. --- dlls/winmm/joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index d3dcfa5..6ac67f4 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -325,7 +325,7 @@ MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold) { TRACE("(%04X, %d);\n", wID, wThreshold); - if (wID >= MAXJOYSTICK) return MMSYSERR_INVALPARAM; + if (wID >= MAXJOYSTICK || wThreshold > 65535) return MMSYSERR_INVALPARAM; JOY_Sticks[wID].threshold = wThreshold;
1
0
0
0
Bruno Jesus : winmm: Allow any period value for setJoyCapture.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 9c8978cf5c4ace98d92103029cc371db9cd02dd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c8978cf5c4ace98d92103029…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Dec 11 02:53:55 2014 -0200 winmm: Allow any period value for setJoyCapture. --- dlls/winmm/joystick.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index f4870fe..d3dcfa5 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -299,7 +299,8 @@ MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged) TRACE("(%p, %04X, %d, %d);\n", hWnd, wID, wPeriod, bChanged); if (wID >= MAXJOYSTICK || hWnd == 0) return JOYERR_PARMS; - if (wPeriod<JOY_PERIOD_MIN || wPeriod>JOY_PERIOD_MAX) return JOYERR_PARMS; + if (wPeriod<JOY_PERIOD_MIN) wPeriod = JOY_PERIOD_MIN; + else if(wPeriod>JOY_PERIOD_MAX) wPeriod = JOY_PERIOD_MAX; if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER; if (JOY_Sticks[wID].hCapture || !IsWindow(hWnd))
1
0
0
0
Bruno Jesus : winmm: The dwSize paramater of JOYINFOEX must be set correctly.
by Alexandre Julliard
11 Dec '14
11 Dec '14
Module: wine Branch: master Commit: 135f929a39e10ca1b373bcbd5a1400b7aecd7545 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=135f929a39e10ca1b373bcbd5…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Dec 11 02:53:48 2014 -0200 winmm: The dwSize paramater of JOYINFOEX must be set correctly. --- dlls/winmm/joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index 9c06fc2..f4870fe 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -220,7 +220,7 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo) TRACE("(%d, %p);\n", wID, lpInfo); if (!lpInfo) return MMSYSERR_INVALPARAM; - if (wID >= MAXJOYSTICK) return JOYERR_PARMS; + if (wID >= MAXJOYSTICK || lpInfo->dwSize < sizeof(JOYINFOEX)) return JOYERR_PARMS; if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER; lpInfo->dwXpos = 0;
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
32
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
Results per page:
10
25
50
100
200