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
October 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
3 participants
783 discussions
Start a n
N
ew thread
Ken Thomases : winecoreaudio: Fix a leak.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: 9162c3d32d0aa6baa010b6dd42a561e87ea54b4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9162c3d32d0aa6baa010b6dd4…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Thu Oct 20 23:23:37 2011 -0500 winecoreaudio: Fix a leak. --- dlls/winecoreaudio.drv/mmdevdrv.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 4421967..414aaf5 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -344,8 +344,10 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, buffers = HeapAlloc(GetProcessHeap(), 0, size); if(!buffers){ HeapFree(GetProcessHeap(), 0, devices); - for(j = 0; j < *num; ++j) + for(j = 0; j < *num; ++j){ HeapFree(GetProcessHeap(), 0, (*ids)[j]); + HeapFree(GetProcessHeap(), 0, (*keys)[j]); + } HeapFree(GetProcessHeap(), 0, *keys); HeapFree(GetProcessHeap(), 0, *ids); return E_OUTOFMEMORY;
1
0
0
0
Andrew Talbot : ws2_32: Replace switch statement with more suitable if statement.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: 35555862fcdc6f489b6b27a62d12dbfaf3bda838 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35555862fcdc6f489b6b27a62…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Oct 20 21:37:09 2011 +0100 ws2_32: Replace switch statement with more suitable if statement. --- dlls/ws2_32/socket.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e8f781f..219e954 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5356,14 +5356,18 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, } if ( af == AF_UNSPEC) /* did they not specify the address family? */ - switch(protocol) - { - case IPPROTO_TCP: - if (type == SOCK_STREAM) { af = AF_INET; break; } - case IPPROTO_UDP: - if (type == SOCK_DGRAM) { af = AF_INET; break; } - default: SetLastError(WSAEPROTOTYPE); return INVALID_SOCKET; + { + if ((protocol == IPPROTO_TCP && type == SOCK_STREAM) || + (protocol == IPPROTO_UDP && type == SOCK_DGRAM)) + { + af = AF_INET; } + else + { + SetLastError(WSAEPROTOTYPE); + return INVALID_SOCKET; + } + } SERVER_START_REQ( create_socket ) {
1
0
0
0
Andrew Talbot : ws2_32: Mark a fall-through in a switch statement.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: 4bebe6287c88a87e32fe401243e9ea5303503d77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bebe6287c88a87e32fe40124…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Oct 20 21:37:04 2011 +0100 ws2_32: Mark a fall-through in a switch statement. --- dlls/ws2_32/socket.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 7a1947f..e8f781f 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4345,6 +4345,7 @@ int WINAPI WS_shutdown(SOCKET s, int how) break; case 2: /* drop all */ clear_flags |= FD_READ|FD_WRITE; + /*fall through */ default: clear_flags |= FD_WINE_LISTENING; }
1
0
0
0
Andrew Eikum : dsound: Always enumerate the default device first.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: c8c6cc97bcaab5441ea200041bb7cc99c4ba01fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8c6cc97bcaab5441ea200041…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Oct 20 15:15:09 2011 -0500 dsound: Always enumerate the default device first. --- dlls/dsound/dsound_main.c | 92 +++++++++++++++++++++++++++++-------------- dlls/dsound/tests/dsound8.c | 74 ++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 30 deletions(-) diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 02edf88..c5b6dce 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -478,6 +478,47 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) return DSERR_INVALIDPARAM; } +static BOOL send_device(IMMDevice *device, GUID *guid, + LPDSENUMCALLBACKW cb, void *user) +{ + IPropertyStore *ps; + PROPVARIANT pv; + BOOL keep_going; + HRESULT hr; + + PropVariantInit(&pv); + + hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps); + if(FAILED(hr)){ + WARN("OpenPropertyStore failed: %08x\n", hr); + return TRUE; + } + + hr = get_mmdevice_guid(device, ps, guid); + if(FAILED(hr)){ + IPropertyStore_Release(ps); + return TRUE; + } + + hr = IPropertyStore_GetValue(ps, + (const PROPERTYKEY *)&DEVPKEY_Device_FriendlyName, &pv); + if(FAILED(hr)){ + IPropertyStore_Release(ps); + WARN("GetValue(FriendlyName) failed: %08x\n", hr); + return TRUE; + } + + TRACE("Calling back with %s (%s)\n", wine_dbgstr_guid(guid), + wine_dbgstr_w(pv.u.pwszVal)); + + keep_going = cb(guid, pv.u.pwszVal, wine_vxd_drv, user); + + PropVariantClear(&pv); + IPropertyStore_Release(ps); + + return keep_going; +} + /* S_FALSE means the callback returned FALSE at some point * S_OK means the callback always returned TRUE */ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, @@ -485,7 +526,8 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, { IMMDeviceEnumerator *devenum; IMMDeviceCollection *coll; - UINT count, i; + IMMDevice *defdev = NULL; + UINT count, i, n; BOOL keep_going; HRESULT hr; @@ -514,14 +556,24 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, if(count == 0) return DS_OK; + TRACE("Calling back with NULL (%s)\n", wine_dbgstr_w(primary_desc)); keep_going = cb(NULL, primary_desc, empty_drv, user); + /* always send the default device first */ + if(keep_going){ + hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(devenum, flow, + eMultimedia, &defdev); + if(FAILED(hr)){ + defdev = NULL; + n = 0; + }else{ + keep_going = send_device(defdev, &guids[0], cb, user); + n = 1; + } + } + for(i = 0; keep_going && i < count; ++i){ IMMDevice *device; - IPropertyStore *ps; - PROPVARIANT pv; - - PropVariantInit(&pv); hr = IMMDeviceCollection_Item(coll, i, &device); if(FAILED(hr)){ @@ -529,36 +581,16 @@ HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, continue; } - hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps); - if(FAILED(hr)){ - IMMDevice_Release(device); - WARN("OpenPropertyStore failed: %08x\n", hr); - continue; - } - - hr = get_mmdevice_guid(device, ps, &guids[i]); - if(FAILED(hr)){ - IPropertyStore_Release(ps); - IMMDevice_Release(device); - continue; + if(device != defdev){ + send_device(device, &guids[n], cb, user); + ++n; } - hr = IPropertyStore_GetValue(ps, - (const PROPERTYKEY *)&DEVPKEY_Device_FriendlyName, &pv); - if(FAILED(hr)){ - IPropertyStore_Release(ps); - IMMDevice_Release(device); - WARN("GetValue(FriendlyName) failed: %08x\n", hr); - continue; - } - - keep_going = cb(&guids[i], pv.u.pwszVal, wine_vxd_drv, user); - - PropVariantClear(&pv); - IPropertyStore_Release(ps); IMMDevice_Release(device); } + if(defdev) + IMMDevice_Release(defdev); IMMDeviceCollection_Release(coll); return (keep_going == TRUE) ? S_OK : S_FALSE; diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 9489970..c1e672f 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -25,6 +25,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define COBJMACROS +#define NONAMELESSUNION #include <windows.h> #include <stdio.h> @@ -35,6 +37,13 @@ #include "ks.h" #include "ksmedia.h" +#include "initguid.h" +#include "wingdi.h" +#include "mmdeviceapi.h" +#include "audioclient.h" +#include "propkey.h" +#include "devpkey.h" + #include "dsound_test.h" static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; @@ -1043,6 +1052,70 @@ static void test_hw_buffers(void) IDirectSound8_Release(ds); } +static struct { + UINT dev_count; + GUID guid; +} default_info = { 0 }; + +static BOOL WINAPI default_device_cb(GUID *guid, const char *desc, + const char *module, void *user) +{ + trace("guid: %p, desc: %s\n", guid, desc); + if(!guid) + ok(default_info.dev_count == 0, "Got NULL GUID not in first position\n"); + else{ + if(default_info.dev_count == 0){ + ok(IsEqualGUID(guid, &default_info.guid), "Expected default device GUID\n"); + }else{ + ok(!IsEqualGUID(guid, &default_info.guid), "Got default GUID at unexpected location: %u\n", + default_info.dev_count); + } + + /* only count real devices */ + ++default_info.dev_count; + } + + return TRUE; +} + +static void test_first_device(void) +{ + IMMDeviceEnumerator *devenum; + IMMDevice *defdev; + IPropertyStore *ps; + PROPVARIANT pv; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, + CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&devenum); + if(FAILED(hr)){ + win_skip("MMDevAPI is not available, skipping default device test\n"); + return; + } + + hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(devenum, eRender, + eMultimedia, &defdev); + ok(hr == S_OK, "GetDefaultAudioEndpoint failed: %08x\n", hr); + + hr = IMMDevice_OpenPropertyStore(defdev, STGM_READ, &ps); + ok(hr == S_OK, "OpenPropertyStore failed: %08x\n", hr); + + PropVariantInit(&pv); + + hr = IPropertyStore_GetValue(ps, &PKEY_AudioEndpoint_GUID, &pv); + ok(hr == S_OK, "GetValue failed: %08x\n", hr); + + CLSIDFromString(pv.u.pwszVal, &default_info.guid); + + PropVariantClear(&pv); + IPropertyStore_Release(ps); + IMMDevice_Release(defdev); + IMMDeviceEnumerator_Release(devenum); + + hr = pDirectSoundEnumerateA(&default_device_cb, NULL); + ok(hr == S_OK, "DirectSoundEnumerateA failed: %08x\n", hr); +} + START_TEST(dsound8) { HMODULE hDsound; @@ -1062,6 +1135,7 @@ START_TEST(dsound8) IDirectSound8_tests(); dsound8_tests(); test_hw_buffers(); + test_first_device(); } else skip("dsound8 test skipped\n");
1
0
0
0
André Hentschel : msvcr90: Add x86_64 stubs and forwards.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: f05a8f89f4682097022a52148c4571cce2a8c357 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f05a8f89f4682097022a52148…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Oct 20 22:13:02 2011 +0200 msvcr90: Add x86_64 stubs and forwards. --- dlls/msvcr90/msvcr90.spec | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 385b866..e40d2e9 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -375,6 +375,7 @@ @ cdecl _controlfp(long long) msvcrt._controlfp @ cdecl _controlfp_s(ptr long long) msvcrt._controlfp_s @ cdecl _copysign(double double) msvcrt._copysign +# stub -arch=win64 _copysignf(float float) @ varargs _cprintf(str) msvcrt._cprintf @ stub _cprintf_l @ stub _cprintf_p @@ -459,10 +460,12 @@ @ cdecl _findnext64(long ptr) msvcrt._findnext64 @ cdecl _findnext64i32(long ptr) msvcrt._findnext64i32 @ cdecl _finite(double) msvcrt._finite +# stub -arch=win64 _finitef(float) @ cdecl _flsbuf(long ptr) msvcrt._flsbuf @ cdecl _flushall() msvcrt._flushall @ extern _fmode msvcrt._fmode @ cdecl _fpclass(double) msvcrt._fpclass +# stub -arch=win64 _fpclassf(float) @ cdecl _fpieee_flt(long ptr ptr) msvcrt._fpieee_flt @ cdecl _fpreset() msvcrt._fpreset @ stub _fprintf_l @@ -648,6 +651,7 @@ @ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail @ stub _ismbstrail_l @ cdecl _isnan(double) msvcrt._isnan +# stub -arch=win64 _isnanf(float) @ cdecl _isprint_l(long ptr) msvcrt._isprint_l @ stub _ispunct_l @ cdecl _isspace_l(long ptr) msvcrt._isspace_l @@ -689,6 +693,7 @@ @ cdecl _lock_file(ptr) msvcrt._lock_file @ cdecl _locking(long long long) msvcrt._locking @ cdecl _logb(double) msvcrt._logb +# stub _logbf(float) @ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex @ cdecl _lrotl(long long) msvcrt._lrotl @ cdecl _lrotr(long long) msvcrt._lrotr @@ -851,6 +856,7 @@ @ cdecl _mktime64(ptr) msvcrt._mktime64 @ cdecl _msize(ptr) msvcrt._msize @ cdecl _nextafter(double double) msvcrt._nextafter +# stub -arch=win64 _nextafterf(float float) @ cdecl _onexit(ptr) msvcrt._onexit @ varargs _open(str long) msvcrt._open @ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle @@ -892,6 +898,7 @@ @ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem @ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1 @ cdecl _scalb(double long) msvcrt._scalb +@ cdecl -arch=x86_64 _scalbf(float long) msvcrt._scalbf @ varargs _scanf_l(str ptr) msvcrt._scanf_l @ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l @ varargs _scprintf(str) msvcrt._scprintf @@ -1263,11 +1270,15 @@ @ cdecl abort() msvcrt.abort @ cdecl abs(long) msvcrt.abs @ cdecl acos(double) msvcrt.acos +@ cdecl -arch=x86_64 acosf(float) msvcrt.acosf @ cdecl asctime(ptr) msvcrt.asctime @ stub asctime_s @ cdecl asin(double) msvcrt.asin @ cdecl atan(double) msvcrt.atan @ cdecl atan2(double double) msvcrt.atan2 +@ cdecl -arch=x86_64 asinf(float) msvcrt.asinf +@ cdecl -arch=x86_64 atan2f(float float) msvcrt.atan2f +@ cdecl -arch=x86_64 atanf(float) msvcrt.atanf @ cdecl atexit(ptr) msvcrt.atexit @ cdecl atof(str) msvcrt.atof @ cdecl atoi(str) msvcrt.atoi @@ -1277,14 +1288,18 @@ @ cdecl btowc(long) msvcrt.btowc @ cdecl calloc(long long) msvcrt.calloc @ cdecl ceil(double) msvcrt.ceil +@ cdecl -arch=x86_64 ceilf(float) msvcrt.ceilf @ cdecl clearerr(ptr) msvcrt.clearerr @ stub clearerr_s @ cdecl clock() msvcrt.clock @ cdecl cos(double) msvcrt.cos @ cdecl cosh(double) msvcrt.cosh +@ cdecl -arch=x86_64 cosf(float) msvcrt.cosf +@ cdecl -arch=x86_64 coshf(float) msvcrt.coshf @ cdecl -ret64 div(long long) msvcrt.div @ cdecl exit(long) msvcrt.exit @ cdecl exp(double) msvcrt.exp +@ cdecl -arch=x86_64 expf(float) msvcrt.expf @ cdecl fabs(double) msvcrt.fabs @ cdecl fclose(ptr) msvcrt.fclose @ cdecl feof(ptr) msvcrt.feof @@ -1296,7 +1311,9 @@ @ cdecl fgetwc(ptr) msvcrt.fgetwc @ cdecl fgetws(ptr long ptr) msvcrt.fgetws @ cdecl floor(double) msvcrt.floor +@ cdecl -arch=x86_64 floorf(float) msvcrt.floorf @ cdecl fmod(double double) msvcrt.fmod +@ cdecl -arch=x86_64 fmodf(float float) msvcrt.fmodf @ cdecl fopen(str str) msvcrt.fopen @ cdecl fopen_s(ptr str str) msvcrt.fopen_s @ varargs fprintf(ptr str) msvcrt.fprintf @@ -1361,6 +1378,8 @@ @ cdecl localeconv() msvcrt.localeconv @ cdecl log(double) msvcrt.log @ cdecl log10(double) msvcrt.log10 +@ cdecl -arch=x86_64 log10f(float) msvcrt.log10f +@ cdecl -arch=x86_64 logf(float) msvcrt.logf @ cdecl -arch=i386,x86_64 longjmp(ptr long) msvcrt.longjmp @ cdecl malloc(long) msvcrt.malloc @ cdecl mblen(ptr long) msvcrt.mblen @@ -1379,8 +1398,10 @@ @ cdecl memmove_s(ptr long ptr long) msvcrt.memmove_s @ cdecl memset(ptr long long) msvcrt.memset @ cdecl modf(double ptr) msvcrt.modf +@ cdecl -arch=x86_64 modff(float ptr) msvcrt.modff @ cdecl perror(str) msvcrt.perror @ cdecl pow(double double) msvcrt.pow +@ cdecl -arch=x86_64 powf(float float) msvcrt.powf @ varargs printf(str) msvcrt.printf @ varargs printf_s(str) msvcrt.printf_s @ cdecl putc(long ptr) msvcrt.putc @@ -1400,14 +1421,18 @@ @ varargs scanf(str) msvcrt.scanf @ varargs scanf_s(str) msvcrt.scanf_s @ cdecl setbuf(ptr ptr) msvcrt.setbuf +@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp @ cdecl setlocale(long str) msvcrt.setlocale @ cdecl setvbuf(ptr str long long) msvcrt.setvbuf @ cdecl signal(long long) msvcrt.signal @ cdecl sin(double) msvcrt.sin @ cdecl sinh(double) msvcrt.sinh +@ cdecl -arch=x86_64 sinf(float) msvcrt.sinf +@ cdecl -arch=x86_64 sinhf(float) msvcrt.sinhf @ varargs sprintf(ptr str) msvcrt.sprintf @ varargs sprintf_s(ptr long str) msvcrt.sprintf_s @ cdecl sqrt(double) msvcrt.sqrt +@ cdecl -arch=x86_64 sqrtf(float) msvcrt.sqrtf @ cdecl srand(long) msvcrt.srand @ varargs sscanf(str str) msvcrt.sscanf @ varargs sscanf_s(str str) msvcrt.sscanf_s @@ -1444,7 +1469,9 @@ @ varargs swscanf_s(wstr wstr) msvcrt.swscanf_s @ cdecl system(str) msvcrt.system @ cdecl tan(double) msvcrt.tan +@ cdecl -arch=x86_64 tanf(float) msvcrt.tanf @ cdecl tanh(double) msvcrt.tanh +@ cdecl -arch=x86_64 tanhf(float) msvcrt.tanhf @ cdecl tmpfile() msvcrt.tmpfile @ stub tmpfile_s @ cdecl tmpnam(ptr) msvcrt.tmpnam
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to context_choose_pixel_format() const.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: f28ba9007ef8ded508c0076e062812b7cfaa3ae5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f28ba9007ef8ded508c0076e0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Oct 20 21:42:59 2011 +0200 wined3d: Make the device parameter to context_choose_pixel_format() const. --- dlls/wined3d/context.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index fc66a98..2c26728 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1119,7 +1119,7 @@ void context_invalidate_state(struct wined3d_context *context, DWORD state) } /* This function takes care of wined3d pixel format selection. */ -static int context_choose_pixel_format(struct wined3d_device *device, HDC hdc, +static int context_choose_pixel_format(const struct wined3d_device *device, HDC hdc, const struct wined3d_format *color_format, const struct wined3d_format *ds_format, BOOL auxBuffers, BOOL findCompatible) {
1
0
0
0
Henri Verbeet : wined3d: Make the device parameter to wined3d_device_get_surface_from_dc() const.
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: a2c754dde80477d74e86e49675ab8837046ac93d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2c754dde80477d74e86e4967…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Oct 20 21:42:58 2011 +0200 wined3d: Make the device parameter to wined3d_device_get_surface_from_dc() const. --- dlls/wined3d/device.c | 2 +- include/wine/wined3d.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6f43715..cffe5f7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5981,7 +5981,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso TRACE("Resource released.\n"); } -HRESULT CDECL wined3d_device_get_surface_from_dc(struct wined3d_device *device, +HRESULT CDECL wined3d_device_get_surface_from_dc(const struct wined3d_device *device, HDC dc, struct wined3d_surface **surface) { struct wined3d_resource *resource; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 97df749..e4ca4c4 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2249,7 +2249,7 @@ HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *de UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride); HRESULT __cdecl wined3d_device_get_stream_source_freq(const struct wined3d_device *device, UINT stream_idx, UINT *divider); -HRESULT __cdecl wined3d_device_get_surface_from_dc(struct wined3d_device *device, +HRESULT __cdecl wined3d_device_get_surface_from_dc(const struct wined3d_device *device, HDC dc, struct wined3d_surface **surface); HRESULT __cdecl wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_swapchain **swapchain);
1
0
0
0
Henri Verbeet : d3d9/tests: Add a small test for IDirect3DDevice9:: SetCursorPosition().
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: 002447357c2b1feca5ef2649429fc55f70238901 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=002447357c2b1feca5ef26494…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Oct 20 21:42:57 2011 +0200 d3d9/tests: Add a small test for IDirect3DDevice9::SetCursorPosition(). --- dlls/d3d9/tests/device.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 124 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index affbe08..9d1da3d 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -21,6 +21,7 @@ */ #define COBJMACROS +#include <windowsx.h> #include <d3d9.h> #include "wine/test.h" @@ -3125,6 +3126,128 @@ done: DestroyWindow(focus_window); } +static const POINT *expect_pos; + +static LRESULT CALLBACK test_cursor_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) +{ + if (message == WM_MOUSEMOVE) + { + if (expect_pos && expect_pos->x && expect_pos->y) + { + POINT p = {GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)}; + + ClientToScreen(window, &p); + if (expect_pos->x == p.x && expect_pos->y == p.y) + ++expect_pos; + } + } + + return DefWindowProcA(window, message, wparam, lparam); +} + +static void test_cursor_pos(void) +{ + IDirect3DSurface9 *cursor; + IDirect3DDevice9 *device; + WNDCLASSA wc = {0}; + IDirect3D9 *d3d9; + UINT refcount; + HWND window; + HRESULT hr; + BOOL ret; + + /* Note that we don't check for movement we're not supposed to receive. + * That's because it's hard to distinguish from the user accidentally + * moving the mouse. */ + static const POINT points[] = + { + {50, 50}, + {75, 75}, + {100, 100}, + {125, 125}, + {150, 150}, + {125, 125}, + {150, 150}, + {150, 150}, + {0, 0}, + }; + + if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) + { + skip("Failed to create IDirect3D9 object, skipping cursor tests.\n"); + return; + } + + wc.lpfnWndProc = test_cursor_proc; + wc.lpszClassName = "d3d9_test_cursor_wc"; + ok(RegisterClassA(&wc), "Failed to register window class.\n"); + window = CreateWindow("d3d9_test_cursor_wc", "d3d9_test", WS_OVERLAPPEDWINDOW, + 0, 0, 320, 240, NULL, NULL, NULL, NULL); + ShowWindow(window, SW_SHOW); + + device = create_device(d3d9, window, window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, + D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &cursor, NULL); + ok(SUCCEEDED(hr), "Failed to create cursor surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetCursorProperties(device, 0, 0, cursor); + ok(SUCCEEDED(hr), "Failed to set cursor properties, hr %#x.\n", hr); + IDirect3DSurface9_Release(cursor); + ret = IDirect3DDevice9_ShowCursor(device, TRUE); + ok(!ret, "Failed to show cursor, hr %#x.\n", ret); + + flush_events(); + expect_pos = points; + + ret = SetCursorPos(50, 50); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + + IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0); + flush_events(); + /* SetCursorPosition() eats duplicates. */ + IDirect3DDevice9_SetCursorPosition(device, 75, 75, 0); + flush_events(); + + ret = SetCursorPos(100, 100); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + /* Even if the position was set with SetCursorPos(). */ + IDirect3DDevice9_SetCursorPosition(device, 100, 100, 0); + flush_events(); + + IDirect3DDevice9_SetCursorPosition(device, 125, 125, 0); + flush_events(); + ret = SetCursorPos(150, 150); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + IDirect3DDevice9_SetCursorPosition(device, 125, 125, 0); + flush_events(); + + IDirect3DDevice9_SetCursorPosition(device, 150, 150, 0); + flush_events(); + /* SetCursorPos() doesn't. */ + ret = SetCursorPos(150, 150); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + + ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n", + expect_pos - points, expect_pos->x, expect_pos->y); + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + DestroyWindow(window); + UnregisterClassA("d3d9_test_cursor_wc", GetModuleHandleA(NULL)); + if (d3d9) + IDirect3D9_Release(d3d9); +} + START_TEST(device) { HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" ); @@ -3164,6 +3287,7 @@ START_TEST(device) test_mipmap_levels(); test_checkdevicemultisampletype(); test_cursor(); + test_cursor_pos(); test_reset_fullscreen(); test_reset(); test_scene();
1
0
0
0
Henri Verbeet : d3d8/tests: Add a small test for IDirect3DDevice8:: SetCursorPosition().
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: b42ec21d76d42ced33fecc7ffc1c356ca72cb7e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b42ec21d76d42ced33fecc7ff…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Oct 20 21:42:56 2011 +0200 d3d8/tests: Add a small test for IDirect3DDevice8::SetCursorPosition(). --- dlls/d3d8/tests/device.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 123 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 42d4dd0..3771f33 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -18,6 +18,7 @@ */ #define COBJMACROS +#include <windowsx.h> #include <initguid.h> #include <d3d8.h> #include "wine/test.h" @@ -782,6 +783,127 @@ cleanup: DestroyWindow(hwnd); } +static const POINT *expect_pos; + +static LRESULT CALLBACK test_cursor_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) +{ + if (message == WM_MOUSEMOVE) + { + if (expect_pos && expect_pos->x && expect_pos->y) + { + POINT p = {GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)}; + + ClientToScreen(window, &p); + if (expect_pos->x == p.x && expect_pos->y == p.y) + ++expect_pos; + } + } + + return DefWindowProcA(window, message, wparam, lparam); +} + +static void test_cursor_pos(void) +{ + IDirect3DSurface8 *cursor; + IDirect3DDevice8 *device; + WNDCLASSA wc = {0}; + IDirect3D8 *d3d8; + UINT refcount; + HWND window; + HRESULT hr; + BOOL ret; + + /* Note that we don't check for movement we're not supposed to receive. + * That's because it's hard to distinguish from the user accidentally + * moving the mouse. */ + static const POINT points[] = + { + {50, 50}, + {75, 75}, + {100, 100}, + {125, 125}, + {150, 150}, + {125, 125}, + {150, 150}, + {150, 150}, + {0, 0}, + }; + + if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) + { + skip("Failed to create IDirect3D8 object, skipping cursor tests.\n"); + return; + } + + wc.lpfnWndProc = test_cursor_proc; + wc.lpszClassName = "d3d8_test_cursor_wc"; + ok(RegisterClassA(&wc), "Failed to register window class.\n"); + window = CreateWindow("d3d8_test_cursor_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, + 0, 0, 320, 240, NULL, NULL, NULL, NULL); + ShowWindow(window, SW_SHOW); + + device = create_device(d3d8, window, window, TRUE); + if (!device) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice8_CreateImageSurface(device, 32, 32, D3DFMT_A8R8G8B8, &cursor); + ok(SUCCEEDED(hr), "Failed to create cursor surface, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetCursorProperties(device, 0, 0, cursor); + ok(SUCCEEDED(hr), "Failed to set cursor properties, hr %#x.\n", hr); + IDirect3DSurface8_Release(cursor); + ret = IDirect3DDevice8_ShowCursor(device, TRUE); + ok(!ret, "Failed to show cursor, hr %#x.\n", ret); + + flush_events(); + expect_pos = points; + + ret = SetCursorPos(50, 50); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + + IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0); + flush_events(); + /* SetCursorPosition() eats duplicates. */ + IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0); + flush_events(); + + ret = SetCursorPos(100, 100); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + /* Even if the position was set with SetCursorPos(). */ + IDirect3DDevice8_SetCursorPosition(device, 100, 100, 0); + flush_events(); + + IDirect3DDevice8_SetCursorPosition(device, 125, 125, 0); + flush_events(); + ret = SetCursorPos(150, 150); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + IDirect3DDevice8_SetCursorPosition(device, 125, 125, 0); + flush_events(); + + IDirect3DDevice8_SetCursorPosition(device, 150, 150, 0); + flush_events(); + /* SetCursorPos() doesn't. */ + ret = SetCursorPos(150, 150); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + + ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n", + expect_pos - points, expect_pos->x, expect_pos->y); + + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + DestroyWindow(window); + UnregisterClassA("d3d8_test_cursor_wc", GetModuleHandleA(NULL)); + if (d3d8) + IDirect3D8_Release(d3d8); +} + static void test_states(void) { HRESULT hr; @@ -2829,6 +2951,7 @@ START_TEST(device) test_refcount(); test_mipmap_levels(); test_cursor(); + test_cursor_pos(); test_states(); test_reset(); test_scene();
1
0
0
0
Henri Verbeet : wined3d: Move the cursor in wined3d_device_set_cursor_position().
by Alexandre Julliard
21 Oct '11
21 Oct '11
Module: wine Branch: master Commit: 5f6dd5384c3b48f83d00b24ff0170e710136856c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f6dd5384c3b48f83d00b24ff…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Oct 20 21:42:55 2011 +0200 wined3d: Move the cursor in wined3d_device_set_cursor_position(). --- dlls/wined3d/device.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 67e50b5..6f43715 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5251,10 +5251,16 @@ void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device, device->xScreenSpace = x_screen_space; device->yScreenSpace = y_screen_space; - /* switch to the software cursor if position diverges from the hardware one */ if (device->hardwareCursor) { POINT pt; + + GetCursorPos( &pt ); + if (x_screen_space == pt.x && y_screen_space == pt.y) + return; + SetCursorPos( x_screen_space, y_screen_space ); + + /* Switch to the software cursor if position diverges from the hardware one. */ GetCursorPos( &pt ); if (x_screen_space != pt.x || y_screen_space != pt.y) {
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
79
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
Results per page:
10
25
50
100
200