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
Piotr Caban : msvcrt: Don't overwrite mbcinfo inside setlocale.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: cf27cb49276f333c83e56b62781ca32b30e52735 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf27cb49276f333c83e56b627…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Oct 12 11:54:53 2011 +0200 msvcrt: Don't overwrite mbcinfo inside setlocale. --- dlls/msvcrt/locale.c | 5 ++--- dlls/msvcrt/main.c | 1 - dlls/msvcrt/msvcrt.h | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index d83f8db..2f646e7 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -364,7 +364,7 @@ MSVCRT_pthreadlocinfo get_locinfo(void) { } /* INTERNAL: returns pthreadlocinfo struct */ -static MSVCRT_pthreadmbcinfo get_mbcinfo(void) { +MSVCRT_pthreadmbcinfo get_mbcinfo(void) { thread_data_t *data = msvcrt_get_thread_data(); if(!data || !data->have_locale) @@ -1172,8 +1172,6 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale) swap_pointers((void**)&locinfo->pclmap, (void**)&loc->locinfo->pclmap); swap_pointers((void**)&locinfo->pcumap, (void**)&loc->locinfo->pcumap); - memcpy(get_mbcinfo(), loc->mbcinfo, sizeof(MSVCRT_threadmbcinfo)); - if(category != MSVCRT_LC_ALL) break; /* fall through */ @@ -1323,5 +1321,6 @@ BOOL msvcrt_init_locale(void) MSVCRT__pctype = MSVCRT_locale->locinfo->pctype; for(i=MSVCRT_LC_MIN; i<=MSVCRT_LC_MAX; i++) MSVCRT___lc_handle[i] = MSVCRT_locale->locinfo->lc_handle[i]; + _setmbcp(_MB_CP_ANSI); return TRUE; } diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index 45191cd..736c068 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -110,7 +110,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) msvcrt_init_console(); msvcrt_init_args(); msvcrt_init_signals(); - _setmbcp(_MB_CP_LOCALE); /* don't allow unloading msvcrt, we can't setup file handles twice */ LdrAddRefDll( 0, hinstDLL ); TRACE("finished process init\n"); diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 3741842..963e227 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -883,6 +883,7 @@ int __cdecl MSVCRT_raise(int sig); extern MSVCRT__locale_t MSVCRT_locale; MSVCRT_pthreadlocinfo get_locinfo(void); +MSVCRT_pthreadmbcinfo get_mbcinfo(void); void __cdecl MSVCRT__free_locale(MSVCRT__locale_t); void free_locinfo(MSVCRT_pthreadlocinfo); void free_mbcinfo(MSVCRT_pthreadmbcinfo);
1
0
0
0
Louis Lenders : kernel32: Add stub for GetThreadPreferredUILanguages.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: e24438c1d1f68ae84f7570b53b8d5e7c24680fc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e24438c1d1f68ae84f7570b53…
Author: Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> Date: Tue Oct 11 22:31:04 2011 +0200 kernel32: Add stub for GetThreadPreferredUILanguages. --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/thread.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index eb6e1e6..96b43b3 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -653,6 +653,7 @@ @ stdcall GetThreadId(ptr) @ stdcall GetThreadIOPendingFlag(long ptr) @ stdcall GetThreadLocale() +@ stdcall GetThreadPreferredUILanguages(long ptr ptr ptr) @ stdcall GetThreadPriority(long) @ stdcall GetThreadPriorityBoost(long ptr) @ stdcall GetThreadSelectorEntry(long long ptr) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index d41eb38..67277ea 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -814,3 +814,14 @@ BOOL WINAPI SetThreadPreferredUILanguages( DWORD flags, PCZZWSTR buffer, PULONG FIXME( "%u, %p, %p\n", flags, buffer, count ); return TRUE; } + +/*********************************************************************** + * GetThreadPreferredUILanguages (KERNEL32.@) + */ +BOOL WINAPI GetThreadPreferredUILanguages( DWORD flags, PULONG count, PCZZWSTR buffer, PULONG buffersize ) +{ + FIXME( "%u, %p, %p %p\n", flags, count, buffer, buffersize ); + *count = 0; + *buffersize = 0; + return TRUE; +}
1
0
0
0
Andrew Eikum : winmm: Use buffer offset when recording.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: 82f486a1a860e3a589d6769fbac91e07927ab2e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82f486a1a860e3a589d6769fb…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Oct 11 15:32:17 2011 -0500 winmm: Use buffer offset when recording. --- dlls/winmm/waveform.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 372501c..7110f25 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1587,7 +1587,8 @@ static void WID_PullData(WINMM_Device *device) to_copy_bytes = min(packet * device->bytes_per_frame, queue->dwBufferLength - queue->dwBytesRecorded); - memcpy(queue->lpData + queue->dwBytesRecorded, data, + memcpy(queue->lpData + queue->dwBytesRecorded, + data + (packet_len - packet) * device->bytes_per_frame, to_copy_bytes); queue->dwBytesRecorded += to_copy_bytes;
1
0
0
0
Andrew Eikum : winmm: Also track input device position.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: 0d567ff9f8479fcb7afce7c74afb1b33aabc766d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d567ff9f8479fcb7afce7c74…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Oct 11 15:32:10 2011 -0500 winmm: Also track input device position. --- dlls/winmm/tests/capture.c | 7 +++++++ dlls/winmm/waveform.c | 4 ++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/winmm/tests/capture.c b/dlls/winmm/tests/capture.c index 2860b00..b43bb71 100644 --- a/dlls/winmm/tests/capture.c +++ b/dlls/winmm/tests/capture.c @@ -133,6 +133,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, WAVEHDR frag; MMRESULT rc; DWORD res; + MMTIME mmt; WORD nChannels = pwfx->nChannels; WORD wBitsPerSample = pwfx->wBitsPerSample; DWORD nSamplesPerSec = pwfx->nSamplesPerSec; @@ -224,6 +225,12 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, "frag.dwBytesRecorded=%d, should=%d\n", frag.dwBytesRecorded,pwfx->nAvgBytesPerSec); + mmt.wType = TIME_SAMPLES; + rc=waveInGetPosition(win, &mmt, sizeof(mmt)); + ok(rc==MMSYSERR_NOERROR,"waveInGetPosition(%s): rc=%s\n", + dev_name(device),wave_in_error(rc)); + ok(mmt.u.cb == frag.dwBytesRecorded, "Got wrong position: %u\n", mmt.u.cb); + /* stop playing on error */ if (res!=WAIT_OBJECT_0) { rc=waveInStop(win); diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 658fd24..372501c 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1495,6 +1495,8 @@ static void WID_PullACMData(WINMM_Device *device) hr = IAudioCaptureClient_ReleaseBuffer(device->capture, packet); if(FAILED(hr)) ERR("ReleaseBuffer failed: %08x\n", hr); + + device->played_frames += packet; } queue = device->first; @@ -1602,6 +1604,8 @@ static void WID_PullData(WINMM_Device *device) hr = IAudioCaptureClient_ReleaseBuffer(device->capture, packet_len); if(FAILED(hr)) ERR("ReleaseBuffer failed: %08x\n", hr); + + device->played_frames += packet_len; } exit:
1
0
0
0
Andrew Eikum : wineoss.drv: Only write as much data as will fit into the OSS buffer.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: 1ed42313a91dab5c0ceb98a0735db97d6cff060f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ed42313a91dab5c0ceb98a07…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue Oct 11 15:31:28 2011 -0500 wineoss.drv: Only write as much data as will fit into the OSS buffer. --- dlls/wineoss.drv/mmdevdrv.c | 45 ++++++++++++++++++++++++++++-------------- 1 files changed, 30 insertions(+), 15 deletions(-) diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 6f8e2d2..f8316ee 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -1253,51 +1253,66 @@ static void oss_silence_buffer(ACImpl *This, BYTE *buf, UINT32 frames) static void oss_write_data(ACImpl *This) { - ssize_t written; + ssize_t written_bytes; UINT32 written_frames; - size_t to_write; + size_t to_write_frames, to_write_bytes; + audio_buf_info bi; BYTE *buf = This->local_buffer + (This->lcl_offs_frames * This->fmt->nBlockAlign); if(This->lcl_offs_frames + This->held_frames > This->bufsize_frames) - to_write = This->bufsize_frames - This->lcl_offs_frames; + to_write_frames = This->bufsize_frames - This->lcl_offs_frames; else - to_write = This->held_frames; + to_write_frames = This->held_frames; + to_write_bytes = to_write_frames * This->fmt->nBlockAlign; + + if(ioctl(This->fd, SNDCTL_DSP_GETOSPACE, &bi) < 0){ + WARN("GETOSPACE failed: %d (%s)\n", errno, strerror(errno)); + return; + } + + if(bi.bytes < to_write_bytes){ + to_write_frames = bi.bytes / This->fmt->nBlockAlign; + to_write_bytes = to_write_frames * This->fmt->nBlockAlign; + } if(This->session->mute) - oss_silence_buffer(This, buf, to_write); + oss_silence_buffer(This, buf, to_write_frames); - written = write(This->fd, buf, to_write * This->fmt->nBlockAlign); - if(written < 0){ + written_bytes = write(This->fd, buf, to_write_bytes); + if(written_bytes < 0){ /* EAGAIN is OSS buffer full, log that too */ WARN("write failed: %d (%s)\n", errno, strerror(errno)); return; } - written_frames = written / This->fmt->nBlockAlign; + written_frames = written_bytes / This->fmt->nBlockAlign; This->lcl_offs_frames += written_frames; This->lcl_offs_frames %= This->bufsize_frames; This->held_frames -= written_frames; This->inbuf_frames += written_frames; - if(written_frames < to_write){ + if(written_frames < to_write_frames){ /* OSS buffer probably full */ return; } - if(This->held_frames){ + bi.bytes -= written_bytes; + if(This->held_frames && bi.bytes >= This->fmt->nBlockAlign){ /* wrapped and have some data back at the start to write */ + to_write_frames = bi.bytes / This->fmt->nBlockAlign; + to_write_bytes = to_write_frames * This->fmt->nBlockAlign; + if(This->session->mute) - oss_silence_buffer(This, This->local_buffer, This->held_frames); + oss_silence_buffer(This, This->local_buffer, to_write_frames); - written = write(This->fd, This->local_buffer, - This->held_frames * This->fmt->nBlockAlign); - if(written < 0){ + written_bytes = write(This->fd, This->local_buffer, to_write_bytes); + if(written_bytes < 0){ WARN("write failed: %d (%s)\n", errno, strerror(errno)); return; } - written_frames = written / This->fmt->nBlockAlign; + written_frames = written_bytes / This->fmt->nBlockAlign; This->lcl_offs_frames += written_frames; This->lcl_offs_frames %= This->bufsize_frames;
1
0
0
0
André Hentschel : mshtml: Add stub for QUERY_IS_CACHED_AND_USABLE_OFFLINE.
by Alexandre Julliard
12 Oct '11
12 Oct '11
Module: wine Branch: master Commit: 296b79565502d83930da9d885d6df3eeb3e56fa7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=296b79565502d83930da9d885…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Tue Oct 11 19:14:20 2011 +0200 mshtml: Add stub for QUERY_IS_CACHED_AND_USABLE_OFFLINE. --- dlls/mshtml/protocol.c | 3 +++ dlls/mshtml/tests/protocol.c | 1 + include/urlmon.idl | 3 ++- 3 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index 4304740..d9a008c 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -478,6 +478,9 @@ static HRESULT WINAPI AboutProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, case QUERY_USES_HISTORYFOLDER: FIXME("Unsupported option QUERY_USES_HISTORYFOLDER\n"); return E_FAIL; + case QUERY_IS_CACHED_AND_USABLE_OFFLINE: + FIXME("Unsupported option QUERY_IS_CACHED_AND_USABLE_OFFLINE\n"); + return E_NOTIMPL; default: return E_FAIL; } diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c index 07f424f..5825015 100644 --- a/dlls/mshtml/tests/protocol.c +++ b/dlls/mshtml/tests/protocol.c @@ -755,6 +755,7 @@ static void test_about_protocol(void) case QUERY_IS_SECURE: case QUERY_IS_SAFE: case QUERY_USES_HISTORYFOLDER: + case QUERY_IS_CACHED_AND_USABLE_OFFLINE: break; default: hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, i, 0, diff --git a/include/urlmon.idl b/include/urlmon.idl index a9d0791..a278be5 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -881,7 +881,8 @@ interface IInternetProtocolInfo : IUnknown QUERY_USES_CACHE, QUERY_IS_SECURE, QUERY_IS_SAFE, - QUERY_USES_HISTORYFOLDER + QUERY_USES_HISTORYFOLDER, + QUERY_IS_CACHED_AND_USABLE_OFFLINE } QUERYOPTION; HRESULT ParseUrl(
1
0
0
0
Jeremy Newman : remove DB passwords
by Jeremy Newman
12 Oct '11
12 Oct '11
Module: appdb Branch: master Commit: bab77733a167a08a20b48f991a30eb2d3e45b8a7 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=bab77733a167a08a20b48f99…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Oct 11 20:41:14 2011 -0500 remove DB passwords --- include/config.php.sample | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/config.php.sample b/include/config.php.sample index f58b49b..0eb1fc3 100644 --- a/include/config.php.sample +++ b/include/config.php.sample @@ -40,18 +40,18 @@ define("STABLE_BRANCHES", "1.0.,1.2."); /* * apps database info */ -define("APPS_DBUSER","wineowner"); -define("APPS_DBPASS","lemonade"); -define("APPS_DBHOST","localhost"); -define("APPS_DB","apidb"); +define("APPS_DBUSER",""); +define("APPS_DBPASS",""); +define("APPS_DBHOST",""); +define("APPS_DB",""); /* * bugzilla database info */ -define("BUGZILLA_DBUSER","root"); +define("BUGZILLA_DBUSER",""); define("BUGZILLA_DBPASS",""); -define("BUGZILLA_DBHOST","localhost"); -define("BUGZILLA_DB","bugs"); +define("BUGZILLA_DBHOST",""); +define("BUGZILLA_DB",""); define("BUGZILLA_PRODUCT_ID","1"); ?>
1
0
0
0
Octavian Voicu : ddraw: Be consistent about param and local var naming across AddAttachedSurface implementations .
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: a843acef5567bc30901612ce5013da543259b21b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a843acef5567bc30901612ce5…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Mon Oct 10 13:15:22 2011 +0300 ddraw: Be consistent about param and local var naming across AddAttachedSurface implementations. --- dlls/ddraw/surface.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 7c70f0f..6140ee0 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1426,29 +1426,29 @@ static HRESULT ddraw_surface_attach_surface(IDirectDrawSurfaceImpl *This, IDirec return DD_OK; } -static HRESULT WINAPI ddraw_surface7_AddAttachedSurface(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *Attach) +static HRESULT WINAPI ddraw_surface7_AddAttachedSurface(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *attachment) { IDirectDrawSurfaceImpl *This = impl_from_IDirectDrawSurface7(iface); - IDirectDrawSurfaceImpl *Surf = unsafe_impl_from_IDirectDrawSurface7(Attach); + IDirectDrawSurfaceImpl *attachment_impl = unsafe_impl_from_IDirectDrawSurface7(attachment); HRESULT hr; - TRACE("iface %p, attachment %p.\n", iface, Attach); + TRACE("iface %p, attachment %p.\n", iface, attachment); /* Version 7 of this interface seems to refuse everything except z buffers, as per msdn */ - if(!(Surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) + if(!(attachment_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { WARN("Application tries to attach a non Z buffer surface. caps %08x\n", - Surf->surface_desc.ddsCaps.dwCaps); + attachment_impl->surface_desc.ddsCaps.dwCaps); return DDERR_CANNOTATTACHSURFACE; } - hr = ddraw_surface_attach_surface(This, Surf); + hr = ddraw_surface_attach_surface(This, attachment_impl); if (FAILED(hr)) { return hr; } - ddraw_surface7_AddRef(Attach); + ddraw_surface7_AddRef(attachment); return hr; } @@ -1473,7 +1473,7 @@ static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *ifa static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *iface, IDirectDrawSurface3 *attachment) { IDirectDrawSurfaceImpl *This = impl_from_IDirectDrawSurface3(iface); - IDirectDrawSurfaceImpl *attach_impl = unsafe_impl_from_IDirectDrawSurface3(attachment); + IDirectDrawSurfaceImpl *attachment_impl = unsafe_impl_from_IDirectDrawSurface3(attachment); HRESULT hr; TRACE("iface %p, attachment %p.\n", iface, attachment); @@ -1484,11 +1484,11 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa * -> primaries can be attached to offscreen plain surfaces * -> z buffers can be attached to primaries */ if (This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_OFFSCREENPLAIN) - && attach_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_OFFSCREENPLAIN)) + && attachment_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_OFFSCREENPLAIN)) { /* Sizes have to match */ - if (attach_impl->surface_desc.dwWidth != This->surface_desc.dwWidth - || attach_impl->surface_desc.dwHeight != This->surface_desc.dwHeight) + if (attachment_impl->surface_desc.dwWidth != This->surface_desc.dwWidth + || attachment_impl->surface_desc.dwHeight != This->surface_desc.dwHeight) { WARN("Surface sizes do not match.\n"); return DDERR_CANNOTATTACHSURFACE; @@ -1496,7 +1496,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa /* OK */ } else if (This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE) - && attach_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_ZBUFFER)) + && attachment_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_ZBUFFER)) { /* OK */ } @@ -1506,7 +1506,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa return DDERR_CANNOTATTACHSURFACE; } - hr = ddraw_surface_attach_surface(This, attach_impl); + hr = ddraw_surface_attach_surface(This, attachment_impl); if (FAILED(hr)) { return hr;
1
0
0
0
Octavian Voicu : ddraw/tests: Test detachment of attached surfaces on Release.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: 9cff895a69dfad2e4e987c1da48a59274e4e48d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9cff895a69dfad2e4e987c1da…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Mon Oct 10 13:15:21 2011 +0300 ddraw/tests: Test detachment of attached surfaces on Release. --- dlls/ddraw/tests/refcount.c | 98 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 95 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/tests/refcount.c b/dlls/ddraw/tests/refcount.c index 970865e..736ce8d 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c @@ -47,11 +47,11 @@ static void test_ddraw_objects(void) IDirectDraw2 *DDraw2; IDirectDraw *DDraw1; IDirectDrawPalette *palette; - IDirectDrawSurface7 *surface = NULL; - IDirectDrawSurface *surface1; + IDirectDrawSurface7 *surface = NULL, *stencil; + IDirectDrawSurface *surface1, *stencil1; IDirectDrawSurface4 *surface4; PALETTEENTRY Table[256]; - DDSURFACEDESC2 ddsd; + DDSURFACEDESC2 ddsd, ddsd_stencil; hr = pDirectDrawCreateEx(NULL, (void **) &DDraw7, &IID_IDirectDraw7, NULL); ok(hr == DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr); @@ -92,6 +92,17 @@ static void test_ddraw_objects(void) U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount = 8; + memset(&ddsd_stencil, 0, sizeof(ddsd_stencil)); + ddsd_stencil.dwSize = sizeof(ddsd_stencil); + ddsd_stencil.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; + ddsd_stencil.dwWidth = ddsd.dwWidth; + ddsd_stencil.dwHeight = ddsd.dwHeight; + ddsd_stencil.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER; + U4(ddsd_stencil).ddpfPixelFormat.dwSize = sizeof(U4(ddsd_stencil).ddpfPixelFormat); + U4(ddsd_stencil).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; + U1(U4(ddsd_stencil).ddpfPixelFormat).dwZBufferBitDepth = 16; + U3(U4(ddsd_stencil).ddpfPixelFormat).dwZBitMask = 0x0000FFFF; + hr = IDirectDraw7_CreateSurface(DDraw7, &ddsd, &surface, NULL); if (!surface) { @@ -186,6 +197,87 @@ static void test_ddraw_objects(void) ok(ref == 1, "Got refcount %d, expected 1\n", ref); IDirectDrawSurface_Release(surface1); + /* AddAttachedSurface with IDirectDrawSurface7 */ + ddsd.dwSize = sizeof(DDSURFACEDESC2); + ddsd.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE; + hr = IDirectDraw7_CreateSurface(DDraw7, &ddsd, &surface, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + ddsd_stencil.dwSize = sizeof(DDSURFACEDESC2); + hr = IDirectDraw7_CreateSurface(DDraw7, &ddsd_stencil, &stencil, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + /* AddAttachedSurface with DeleteAttachedSurface */ + hr = IDirectDrawSurface7_AddAttachedSurface(surface, stencil); + ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + ref = getRefcount( (IUnknown *) stencil); + ok(ref == 2, "Got refcount %d, expected 2\n", ref); + hr = IDirectDrawSurface7_DeleteAttachedSurface(surface, 0, stencil); + ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); + ref = getRefcount( (IUnknown *) stencil); + ok(ref == 1, "Got refcount %d, expected 1\n", ref); + } + + /* Releasing a surface should detach any attached surfaces */ + hr = IDirectDrawSurface7_AddAttachedSurface(surface, stencil); + ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + ref = getRefcount( (IUnknown *) stencil); + ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ref = IDirectDrawSurface7_Release(surface); + ok(!ref, "Got refcount %d, expected 0\n", ref); + ref = getRefcount( (IUnknown *) stencil); + ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ref = IDirectDrawSurface7_Release(stencil); + ok(!ref, "Got refcount %d, expected 0\n", ref); + } + else + IDirectDrawSurface7_Release(surface); + } + + /* AddAttachedSurface with IDirectDrawSurface */ + ddsd.dwSize = sizeof(DDSURFACEDESC); + hr = IDirectDraw_CreateSurface(DDraw1, (DDSURFACEDESC *) &ddsd, &surface1, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + ddsd_stencil.dwSize = sizeof(DDSURFACEDESC); + hr = IDirectDraw_CreateSurface(DDraw1, (DDSURFACEDESC *) &ddsd_stencil, &stencil1, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + /* AddAttachedSurface with DeleteAttachedSurface */ + hr = IDirectDrawSurface_AddAttachedSurface(surface1, stencil1); + ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + ref = getRefcount( (IUnknown *) stencil1); + ok(ref == 2, "Got refcount %d, expected 2\n", ref); + hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, stencil1); + ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); + ref = getRefcount( (IUnknown *) stencil1); + ok(ref == 1, "Got refcount %d, expected 1\n", ref); + } + + /* Releasing a surface should detach any attached surfaces */ + hr = IDirectDrawSurface_AddAttachedSurface(surface1, stencil1); + ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + ref = getRefcount( (IUnknown *) stencil1); + ok(ref == 2, "Got refcount %d, expected 2\n", ref); + ref = IDirectDrawSurface_Release(surface1); + ok(!ref, "Got refcount %d, expected 0\n", ref); + ref = getRefcount( (IUnknown *) stencil1); + todo_wine ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ref = IDirectDrawSurface_Release(stencil1); + todo_wine ok(!ref, "Got refcount %d, expected 0\n", ref); + } + else + IDirectDrawSurface_Release(surface1); + } + IDirectDraw7_Release(DDraw7); IDirectDraw4_Release(DDraw4); IDirectDraw2_Release(DDraw2);
1
0
0
0
Alexander Morozov : kernel32/tests: Shared lock can overlap exclusive if handles are equal.
by Alexandre Julliard
11 Oct '11
11 Oct '11
Module: wine Branch: master Commit: b2a302b667579fd22157be07a8e21673c038b092 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b2a302b667579fd22157be07a…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Fri Oct 7 21:01:27 2011 +0400 kernel32/tests: Shared lock can overlap exclusive if handles are equal. --- dlls/kernel32/tests/file.c | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 772e439..f607cfd 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -1591,7 +1591,7 @@ static void test_offset_in_overlapped_structure(void) static void test_LockFile(void) { - HANDLE handle; + HANDLE handle, handle2; DWORD written; OVERLAPPED overlapped; int limited_LockFile; @@ -1606,6 +1606,14 @@ static void test_LockFile(void) ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); return; } + handle2 = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, 0, 0 ); + if (handle2 == INVALID_HANDLE_VALUE) + { + ok( 0, "couldn't open file \"%s\" (err=%d)\n", filename, GetLastError() ); + goto cleanup; + } ok( WriteFile( handle, sillytext, strlen(sillytext), &written, NULL ), "write failed\n" ); ok( LockFile( handle, 0, 0, 0, 0 ), "LockFile failed\n" ); @@ -1656,6 +1664,23 @@ static void test_LockFile(void) "UnlockFileEx 150,100 again succeeded\n" ); } + /* shared lock can overlap exclusive if handles are equal */ + S(U(overlapped)).Offset = 300; + ok( LockFileEx( handle, LOCKFILE_EXCLUSIVE_LOCK, 0, 100, 0, &overlapped ), + "LockFileEx exclusive 300,100 failed\n" ); + ok( !LockFileEx( handle2, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped ), + "LockFileEx handle2 300,100 succeeded\n" ); + ret = LockFileEx( handle, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped ); + todo_wine + ok( ret, "LockFileEx 300,100 failed\n" ); + ok( UnlockFileEx( handle, 0, 100, 0, &overlapped ), "UnlockFileEx 300,100 failed\n" ); + /* exclusive lock is removed first */ + ok( LockFileEx( handle2, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped ), + "LockFileEx handle2 300,100 failed\n" ); + ok( UnlockFileEx( handle2, 0, 100, 0, &overlapped ), "UnlockFileEx 300,100 failed\n" ); + if (ret) + ok( UnlockFileEx( handle, 0, 100, 0, &overlapped ), "UnlockFileEx 300,100 failed\n" ); + ret = LockFile( handle, 0, 0x10000000, 0, 0xf0000000 ); if (ret) { @@ -1689,6 +1714,8 @@ static void test_LockFile(void) ok( UnlockFile( handle, 100, 0, 0, 0 ), "UnlockFile 100,0 failed\n" ); + CloseHandle( handle2 ); +cleanup: CloseHandle( handle ); DeleteFileA( filename ); }
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
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