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
November 2021
----- 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
951 discussions
Start a n
N
ew thread
Zebediah Figura : winegstreamer: Implement IWMReader::GetOutputFormatCount().
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 5306d0ff3c95e7b9b1c77fa2bb30b420d07879f7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5306d0ff3c95e7b9b1c77fa2…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 4 15:46:25 2021 -0500 winegstreamer: Implement IWMReader::GetOutputFormatCount(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wm_asyncreader.c | 10 ++++++---- dlls/wmvcore/tests/wmvcore.c | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c index dd5b01b3e5c..e7bf667bf90 100644 --- a/dlls/winegstreamer/wm_asyncreader.c +++ b/dlls/winegstreamer/wm_asyncreader.c @@ -130,11 +130,13 @@ static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num return E_NOTIMPL; } -static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output_num, DWORD *formats) +static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD output, DWORD *count) { - struct async_reader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %p)\n", This, output_num, formats); - return E_NOTIMPL; + struct async_reader *reader = impl_from_IWMReader(iface); + + TRACE("reader %p, output %u, count %p.\n", reader, output, count); + + return wm_reader_get_output_format_count(&reader->reader, output, count); } static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output, diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 6fbc2ed6a3e..666cf65a462 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -1441,8 +1441,8 @@ static void test_async_reader_types(void) count = 0; hr = IWMReader_GetOutputFormatCount(reader, output_number, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count > 0, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(count > 0, "Got count %u.\n", count); for (j = 0; j < count; ++j) { @@ -1518,7 +1518,7 @@ static void test_async_reader_types(void) } hr = IWMReader_GetOutputFormat(reader, output_number, count, &output_props); - todo_wine ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr); + ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr); hr = IWMReader_GetOutputProps(reader, output_number, &output_props); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -1540,7 +1540,7 @@ static void test_async_reader_types(void) count = 0xdeadbeef; hr = IWMReader_GetOutputFormatCount(reader, 2, &count); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); ok(count == 0xdeadbeef, "Got count %#x.\n", count); output_props = (void *)0xdeadbeef;
1
0
0
0
Zebediah Figura : winegstreamer: Implement IWMReader::GetOutputFormat().
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 00bc5eb73b95cbfe404fe18e1d0aadacc8ab4662 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=00bc5eb73b95cbfe404fe18e…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Nov 4 15:46:24 2021 -0500 winegstreamer: Implement IWMReader::GetOutputFormat(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wm_asyncreader.c | 11 +++++++---- dlls/wmvcore/tests/wmvcore.c | 23 ++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c index 6771b590a71..dd5b01b3e5c 100644 --- a/dlls/winegstreamer/wm_asyncreader.c +++ b/dlls/winegstreamer/wm_asyncreader.c @@ -137,11 +137,14 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp return E_NOTIMPL; } -static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props) +static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output, + DWORD index, IWMOutputMediaProps **props) { - struct async_reader *This = impl_from_IWMReader(iface); - FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props); - return E_NOTIMPL; + struct async_reader *reader = impl_from_IWMReader(iface); + + TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props); + + return wm_reader_get_output_format(&reader->reader, output, index, props); } static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context) diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 148b4f5f373..6fbc2ed6a3e 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -1419,21 +1419,18 @@ static void test_async_reader_types(void) * with. In particular it has to be PCM. */ hr = IWMReader_GetOutputFormat(reader, output_number, 0, &output_props); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - ret_size = sizeof(mt2_buffer); - hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ret_size = sizeof(mt2_buffer); + hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size); + ok(hr == S_OK, "Got hr %#x.\n", hr); - ref = IWMOutputMediaProps_Release(output_props); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ref = IWMOutputMediaProps_Release(output_props); + ok(!ref, "Got outstanding refcount %d.\n", ref); - /* The sample size might differ. */ - mt2->lSampleSize = mt->lSampleSize; - ok(compare_media_types(mt, mt2), "Media types didn't match.\n"); - } + /* The sample size might differ. */ + mt2->lSampleSize = mt->lSampleSize; + ok(compare_media_types(mt, mt2), "Media types didn't match.\n"); } else { @@ -1553,7 +1550,7 @@ static void test_async_reader_types(void) output_props = (void *)0xdeadbeef; hr = IWMReader_GetOutputFormat(reader, 2, 0, &output_props); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props); IWMReaderAdvanced2_Release(advanced);
1
0
0
0
Nikolay Sivov : scrrun: Use wide string literals.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: beb7966d475122c486b001729bec4d4eab47e408 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=beb7966d475122c486b00172…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 4 22:57:12 2021 +0300 scrrun: Use wide string literals. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrrun/filesystem.c | 66 +++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 45 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index c42096ae1f6..68ef1786af9 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -37,9 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(scrrun); -static const WCHAR bsW[] = {'\\',0}; -static const WCHAR utf16bom = 0xfeff; - struct filesystem { struct provideclassinfo classinfo; IFileSystem3 IFileSystem3_iface; @@ -204,12 +201,9 @@ static HRESULT create_drivecoll_enum(struct drivecollection*, IUnknown**); static inline BOOL is_dir_data(const WIN32_FIND_DATAW *data) { - static const WCHAR dotdotW[] = {'.','.',0}; - static const WCHAR dotW[] = {'.',0}; - return (data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && - wcscmp(data->cFileName, dotdotW) && - wcscmp(data->cFileName, dotW); + wcscmp(data->cFileName, L"..") && + wcscmp(data->cFileName, L"."); } static inline BOOL is_file_data(const WIN32_FIND_DATAW *data) @@ -223,8 +217,7 @@ static BSTR get_full_path(BSTR path, const WIN32_FIND_DATAW *data) WCHAR buffW[MAX_PATH]; lstrcpyW(buffW, path); - if (path[len-1] != '\\') - lstrcatW(buffW, bsW); + if (path[len-1] != '\\') wcscat(buffW, L"\\"); lstrcatW(buffW, data->cFileName); return SysAllocString(buffW); @@ -698,6 +691,7 @@ static const ITextStreamVtbl textstreamvtbl = { static HRESULT create_textstream(const WCHAR *filename, DWORD disposition, IOMode mode, Tristate format, ITextStream **ret) { + static const unsigned short utf16bom = 0xfeff; struct textstream *stream; DWORD access = 0; HRESULT hr; @@ -1196,16 +1190,14 @@ static ULONG WINAPI foldercoll_enumvariant_Release(IEnumVARIANT *iface) static HANDLE start_enumeration(const WCHAR *path, WIN32_FIND_DATAW *data, BOOL file) { - static const WCHAR allW[] = {'*',0}; WCHAR pathW[MAX_PATH]; int len; HANDLE handle; lstrcpyW(pathW, path); len = lstrlenW(pathW); - if (len && pathW[len-1] != '\\') - lstrcatW(pathW, bsW); - lstrcatW(pathW, allW); + if (len && pathW[len-1] != '\\') wcscat(pathW, L"\\"); + wcscat(pathW, L"*"); handle = FindFirstFileW(pathW, data); if (handle == INVALID_HANDLE_VALUE) return 0; @@ -1762,7 +1754,6 @@ static HRESULT WINAPI foldercoll_get__NewEnum(IFolderCollection *iface, IUnknown static HRESULT WINAPI foldercoll_get_Count(IFolderCollection *iface, LONG *count) { struct foldercollection *This = impl_from_IFolderCollection(iface); - static const WCHAR allW[] = {'\\','*',0}; WIN32_FIND_DATAW data; WCHAR pathW[MAX_PATH]; HANDLE handle; @@ -1774,8 +1765,8 @@ static HRESULT WINAPI foldercoll_get_Count(IFolderCollection *iface, LONG *count *count = 0; - lstrcpyW(pathW, This->path); - lstrcatW(pathW, allW); + wcscpy(pathW, This->path); + wcscat(pathW, L"\\*"); handle = FindFirstFileW(pathW, &data); if (handle == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError()); @@ -1957,7 +1948,6 @@ static HRESULT WINAPI filecoll_get__NewEnum(IFileCollection *iface, IUnknown **p static HRESULT WINAPI filecoll_get_Count(IFileCollection *iface, LONG *count) { struct filecollection *This = impl_from_IFileCollection(iface); - static const WCHAR allW[] = {'\\','*',0}; WIN32_FIND_DATAW data; WCHAR pathW[MAX_PATH]; HANDLE handle; @@ -1969,8 +1959,8 @@ static HRESULT WINAPI filecoll_get_Count(IFileCollection *iface, LONG *count) *count = 0; - lstrcpyW(pathW, This->path); - lstrcatW(pathW, allW); + wcscpy(pathW, This->path); + wcscat(pathW, L"\\*"); handle = FindFirstFileW(pathW, &data); if (handle == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError()); @@ -3074,7 +3064,7 @@ static HRESULT WINAPI filesys_BuildPath(IFileSystem3 *iface, BSTR Path, { lstrcpyW(ret, Path); if (Path[path_len-1] != ':') - lstrcatW(ret, bsW); + wcscat(ret, L"\\"); lstrcatW(ret, Name); } } @@ -3258,28 +3248,19 @@ static HRESULT WINAPI filesys_GetExtensionName(IFileSystem3 *iface, BSTR path, return S_OK; } -static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path, - BSTR *pbstrResult) +static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR path, BSTR *pbstrResult) { - static const WCHAR cur_path[] = {'.',0}; - WCHAR buf[MAX_PATH], ch; - const WCHAR *path; DWORD i, beg, len, exp_len; WIN32_FIND_DATAW fdata; HANDLE fh; - TRACE("%p %s %p\n", iface, debugstr_w(Path), pbstrResult); + TRACE("%p, %s, %p.\n", iface, debugstr_w(path), pbstrResult); if(!pbstrResult) return E_POINTER; - if(!Path) - path = cur_path; - else - path = Path; - - len = GetFullPathNameW(path, MAX_PATH, buf, NULL); + len = GetFullPathNameW(path ? path : L".", MAX_PATH, buf, NULL); if(!len) return E_FAIL; @@ -3311,24 +3292,21 @@ static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path return S_OK; } -static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult) +static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *result) { - static const WCHAR fmt[] = {'r','a','d','%','0','5','X','.','t','x','t',0}; - DWORD random; - TRACE("%p %p\n", iface, pbstrResult); + TRACE("%p, %p.\n", iface, result); - if(!pbstrResult) + if (!result) return E_POINTER; - *pbstrResult = SysAllocStringLen(NULL, 12); - if(!*pbstrResult) + if (!(*result = SysAllocStringLen(NULL, 12))) return E_OUTOFMEMORY; if(!RtlGenRandom(&random, sizeof(random))) return E_FAIL; - swprintf(*pbstrResult, 12, fmt, random & 0xfffff); + swprintf(*result, 12, L"rad%05X.txt", random & 0xfffff); return S_OK; } @@ -3910,7 +3888,6 @@ static HRESULT WINAPI filesys_GetStandardStream(IFileSystem3 *iface, static void get_versionstring(VS_FIXEDFILEINFO *info, WCHAR *ver) { - static const WCHAR fmtW[] = {'%','d','.','%','d','.','%','d','.','%','d',0}; DWORDLONG version; WORD a, b, c, d; @@ -3920,12 +3897,11 @@ static void get_versionstring(VS_FIXEDFILEINFO *info, WCHAR *ver) c = (WORD)((version >> 16) & 0xffff); d = (WORD)( version & 0xffff); - swprintf(ver, 30, fmtW, a, b, c, d); + swprintf(ver, 30, L"%d.%d.%d.%d", a, b, c, d); } static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BSTR *version) { - static const WCHAR rootW[] = {'\\',0}; VS_FIXEDFILEINFO *info; WCHAR ver[30]; void *ptr; @@ -3945,7 +3921,7 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST return HRESULT_FROM_WIN32(GetLastError()); } - ret = VerQueryValueW(ptr, rootW, (void**)&info, &len); + ret = VerQueryValueW(ptr, L"\\", (void **)&info, &len); if (!ret) { heap_free(ptr);
1
0
0
0
Nikolay Sivov : scrrun: Use static sized buffer for drive root.
by Alexandre Julliard
05 Nov '21
05 Nov '21
Module: wine Branch: master Commit: 82ffb085a8f9a7ca2e749b752762b4be12a16d47 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82ffb085a8f9a7ca2e749b75…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 4 22:57:11 2021 +0300 scrrun: Use static sized buffer for drive root. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrrun/filesystem.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index d537239b3a1..c42096ae1f6 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -99,7 +99,7 @@ struct drive { struct provideclassinfo classinfo; IDrive IDrive_iface; LONG ref; - BSTR root; + WCHAR root[4]; }; struct folder { @@ -835,10 +835,7 @@ static ULONG WINAPI drive_Release(IDrive *iface) TRACE("(%p)->(%d)\n", This, ref); if (!ref) - { - SysFreeString(This->root); heap_free(This); - } return ref; } @@ -1134,28 +1131,21 @@ static const IDriveVtbl drivevtbl = { static HRESULT create_drive(WCHAR letter, IDrive **drive) { - struct drive *This; + struct drive *object; *drive = NULL; - This = heap_alloc(sizeof(*This)); - if (!This) return E_OUTOFMEMORY; + object = heap_alloc(sizeof(*object)); + if (!object) return E_OUTOFMEMORY; - This->IDrive_iface.lpVtbl = &drivevtbl; - This->ref = 1; - This->root = SysAllocStringLen(NULL, 3); - if (!This->root) - { - heap_free(This); - return E_OUTOFMEMORY; - } - This->root[0] = letter; - This->root[1] = ':'; - This->root[2] = '\\'; - This->root[3] = 0; + object->IDrive_iface.lpVtbl = &drivevtbl; + object->ref = 1; + wcscpy(object->root, L"A:\\"); + *object->root = letter; + + init_classinfo(&CLSID_Drive, (IUnknown *)&object->IDrive_iface, &object->classinfo); + *drive = &object->IDrive_iface; - init_classinfo(&CLSID_Drive, (IUnknown *)&This->IDrive_iface, &This->classinfo); - *drive = &This->IDrive_iface; return S_OK; }
1
0
0
0
Serge Gautherie : comctl32: Fix 'pszHeaderTitle' copypasta.
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: 16a17576a0d82626761de5145a9eacb399fd8f2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16a17576a0d82626761de514…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Thu Nov 4 09:11:49 2021 +0100 comctl32: Fix 'pszHeaderTitle' copypasta. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/propsheet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 1604b9e9619..556d63f2c75 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -3372,7 +3372,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) if (ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) { SelectObject(hdc, psInfo->hFont); SetRect(&r, 40, 25, rzone.right - 69, rzone.bottom); - if (!IS_INTRESOURCE(ppshpage->pszHeaderTitle)) + if (!IS_INTRESOURCE(ppshpage->pszHeaderSubTitle)) DrawTextW(hdc, ppshpage->pszHeaderSubTitle, -1, &r, DT_LEFT | DT_WORDBREAK); else {
1
0
0
0
Stefan Dösinger : wined3d: Emulate fractional viewports if GL doesn't support them.
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: 26a53f674c234aaba4a85ec36bae48384899b705 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26a53f674c234aaba4a85ec3…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Nov 3 20:15:30 2021 +0300 wined3d: Emulate fractional viewports if GL doesn't support them. This allows test_fractional_viewports to pass regardless of GL capabilies. I don't think we can get rid of WINED3D_PIXEL_CENTER_INTEGER (and add +0.5 in the client libs) due to vpos in d3d9 shaders. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 3 +++ dlls/wined3d/adapter_vk.c | 1 + dlls/wined3d/state.c | 16 ++++++++++++++++ dlls/wined3d/wined3d_private.h | 14 +++++++++++--- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 2a91418b0d0..7ec30cb4356 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -991,6 +991,7 @@ static void quirk_broken_arb_fog(struct wined3d_gl_info *gl_info) static void quirk_broken_viewport_subpixel_bits(struct wined3d_gl_info *gl_info) { + gl_info->limits.viewport_subpixel_bits = 0; if (gl_info->supported[ARB_CLIP_CONTROL]) { TRACE("Disabling ARB_clip_control.\n"); @@ -3655,6 +3656,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, TRACE("Disabling ARB_clip_control because viewport subpixel bits < 8.\n"); gl_info->supported[ARB_CLIP_CONTROL] = FALSE; } + gl_info->limits.viewport_subpixel_bits = subpixel_bits; } if (gl_info->supported[ARB_CLIP_CONTROL] && !gl_info->supported[ARB_VIEWPORT_ARRAY]) { @@ -5141,6 +5143,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_ d3d_info->full_ffp_varyings = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_FULL_FFP_VARYINGS); d3d_info->scaled_resolve = !!gl_info->supported[EXT_FRAMEBUFFER_MULTISAMPLE_BLIT_SCALED]; d3d_info->pbo = !!gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]; + d3d_info->subpixel_viewport = gl_info->limits.viewport_subpixel_bits >= 8; d3d_info->feature_level = feature_level_from_caps(gl_info, &shader_caps, &fragment_caps); d3d_info->filling_convention_offset = gl_info->filling_convention_offset; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index ac768f8304f..2bd3aa31e49 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2257,6 +2257,7 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_ d3d_info->scaled_resolve = false; d3d_info->pbo = true; d3d_info->feature_level = feature_level_from_caps(&shader_caps); + d3d_info->subpixel_viewport = true; /* Like GL, Vulkan doesn't explicitly specify a filling convention and only mandates that a * shared edge of two adjacent triangles generate a fragment for exactly one of the triangles. diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 901771fdcc1..5e41f681c75 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4208,6 +4208,22 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine viewports[i * 4 + 1] = vp[i].y; viewports[i * 4 + 2] = vp[i].width; viewports[i * 4 + 3] = vp[i].height; + + /* Don't pass fractionals to GL if we earlier decided not to use + * this functionality for two reasons: First, GL might offer us + * fewer than 8 bits, and still make use of the fractional, in + * addition to the emulation we apply in shader_get_position_fixup. + * Second, even if GL tells us it has no subpixel precision (Mac OS!) + * it might still do something with the fractional amount, e.g. + * round it upwards. I can't find any info on rounding in + * GL_ARB_viewport_array. */ + if (!context->d3d_info->subpixel_viewport) + { + viewports[i * 4] = floor(viewports[i * 4]); + viewports[i * 4 + 1] = floor(viewports[i * 4 + 1]); + viewports[i * 4 + 2] = floor(viewports[i * 4 + 2]); + viewports[i * 4 + 3] = floor(viewports[i * 4 + 3]); + } } if (context->viewport_count > state->viewport_count) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 6e0ab1ab499..8da8a60d28e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -240,6 +240,7 @@ struct wined3d_d3d_info uint32_t full_ffp_varyings : 1; uint32_t scaled_resolve : 1; uint32_t pbo : 1; + uint32_t subpixel_viewport : 1; enum wined3d_feature_level feature_level; DWORD multisample_draw_location; @@ -3237,6 +3238,7 @@ struct wined3d_gl_limits unsigned int framebuffer_width; unsigned int framebuffer_height; + unsigned int viewport_subpixel_bits; UINT glsl_varyings; UINT glsl_vs_float_constants; @@ -5771,7 +5773,7 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg) static inline void shader_get_position_fixup(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int fixup_count, float *position_fixup) { - float center_offset; + float center_offset, x = 0.0f, y = 0.0f; unsigned int i; /* See get_projection_matrix() in utils.c for a discussion of the position fixup. @@ -5788,8 +5790,14 @@ static inline void shader_get_position_fixup(const struct wined3d_context *conte { position_fixup[4 * i ] = 1.0f; position_fixup[4 * i + 1] = 1.0f; - position_fixup[4 * i + 2] = center_offset / state->viewports[i].width; - position_fixup[4 * i + 3] = -center_offset / state->viewports[i].height; + if (!context->d3d_info->subpixel_viewport) + { + double dummy; + x = modf(state->viewports[i].x, &dummy) * 2.0f; + y = modf(state->viewports[i].y, &dummy) * 2.0f; + } + position_fixup[4 * i + 2] = (center_offset + x) / state->viewports[i].width; + position_fixup[4 * i + 3] = -(center_offset + y) / state->viewports[i].height; if (context->render_offscreen) {
1
0
0
0
Stefan Dösinger : d3d9/tests: Test triangle filling convention.
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: 13871e8924f2234b203558f38c61037b06bb995d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=13871e8924f2234b203558f3…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Nov 3 20:15:29 2021 +0300 d3d9/tests: Test triangle filling convention. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/visual.c | 485 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 485 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=13871e8924f2234b2035…
1
0
0
0
Stefan Dösinger : wined3d: Test if an offset is needed to get the correct filling convention.
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: 044f5e109fd7bdb5a3c172240d6195faa87a1dce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=044f5e109fd7bdb5a3c17224…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Nov 3 20:15:28 2021 +0300 wined3d: Test if an offset is needed to get the correct filling convention. This fixes stray lines in GameFace GUIs, e.g. in World of Tanks. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 1 - dlls/ddraw/tests/ddraw4.c | 6 ++- dlls/ddraw/tests/ddraw7.c | 6 ++- dlls/wined3d/adapter_gl.c | 50 +++++++++++++++++ dlls/wined3d/adapter_vk.c | 8 +++ dlls/wined3d/state.c | 3 +- dlls/wined3d/utils.c | 118 +++++++++++++++++++++++++++++++++++++---- dlls/wined3d/wined3d_private.h | 13 ++++- 8 files changed, 187 insertions(+), 18 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=044f5e109fd7bdb5a3c1…
1
0
0
0
Nikolay Sivov : evr/mixer: Set per-stream alpha to fully opaque.
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: 9d2dc9e1c164385ce399d25363d4f986d2869397 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9d2dc9e1c164385ce399d253…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 4 17:58:45 2021 +0300 evr/mixer: Set per-stream alpha to fully opaque. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/mixer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 2e03535fda3..fb7fcf79d9c 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -1326,6 +1326,7 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) video_mixer_normalize_rect(&dst, &stream_vis, &norm); video_mixer_scale_rect(&samples[sample_count].DstRect, rt_desc.Width, rt_desc.Height, &norm); + samples[sample_count].PlanarAlpha = DXVA2FloatToFixed(1.0f); sample_count++; }
1
0
0
0
Nikolay Sivov : evr/mixer: Pass valid background color parameter to VideoProcessBlt().
by Alexandre Julliard
04 Nov '21
04 Nov '21
Module: wine Branch: master Commit: aad6c57211fd8910c8214898f9adca900b9dde29 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aad6c57211fd8910c8214898…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 4 17:58:44 2021 +0300 evr/mixer: Pass valid background color parameter to VideoProcessBlt(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/mixer.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 3a2b6830782..2e03535fda3 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -95,7 +95,11 @@ struct video_mixer IMFAttributes *internal_attributes; unsigned int mixing_flags; unsigned int is_streaming; - COLORREF bkgnd_color; + struct + { + COLORREF rgba; + DXVA2_AYUVSample16 ayuv; + } bkgnd_color; LONGLONG lower_bound; LONGLONG upper_bound; CRITICAL_SECTION cs; @@ -1277,7 +1281,6 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) zoom_rect.right = zoom_rect.bottom = 1.0f; } - SetRect(¶ms.TargetRect, 0, 0, rt_desc.Width, rt_desc.Height); video_mixer_scale_rect(&dst, rt_desc.Width, rt_desc.Height, &zoom_rect); for (i = 0; i < mixer->input_count; ++i) @@ -1329,6 +1332,9 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) if (SUCCEEDED(hr)) { + SetRect(¶ms.TargetRect, 0, 0, rt_desc.Width, rt_desc.Height); + params.BackgroundColor = mixer->bkgnd_color.ayuv; + if (FAILED(hr = IDirectXVideoProcessor_VideoProcessBlt(mixer->processor, rt, ¶ms, samples, sample_count, NULL))) { @@ -1983,12 +1989,28 @@ static HRESULT WINAPI video_mixer_processor_GetBackgroundColor(IMFVideoProcessor return E_POINTER; EnterCriticalSection(&mixer->cs); - *color = mixer->bkgnd_color; + *color = mixer->bkgnd_color.rgba; LeaveCriticalSection(&mixer->cs); return S_OK; } +static void video_mixer_rgb_to_ycbcr(COLORREF rgb, DXVA2_AYUVSample16 *ayuv) +{ + int y, cb, cr, r, g, b; + + r = GetRValue(rgb); g = GetGValue(rgb); b = GetBValue(rgb); + /* Coefficients according to SDTV ITU-R BT.601 */ + y = (77 * r + 150 * g + 29 * b + 128) / 256 + 16; + cb = (-44 * r - 87 * g + 131 * b + 128) / 256 + 128; + cr = (131 * r - 110 * g - 21 * b + 128) / 256 + 128; + + ayuv->Y = y * 0x100; + ayuv->Cb = cb * 0x100; + ayuv->Cr = cr * 0x100; + ayuv->Alpha = 0xffff; +} + static HRESULT WINAPI video_mixer_processor_SetBackgroundColor(IMFVideoProcessor *iface, COLORREF color) { struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface); @@ -1996,7 +2018,11 @@ static HRESULT WINAPI video_mixer_processor_SetBackgroundColor(IMFVideoProcessor TRACE("%p, %#x.\n", iface, color); EnterCriticalSection(&mixer->cs); - mixer->bkgnd_color = color; + if (mixer->bkgnd_color.rgba != color) + { + video_mixer_rgb_to_ycbcr(color, &mixer->bkgnd_color.ayuv); + mixer->bkgnd_color.rgba = color; + } LeaveCriticalSection(&mixer->cs); return S_OK; @@ -2528,6 +2554,7 @@ HRESULT evr_mixer_create(IUnknown *outer, void **out) object->upper_bound = MFT_OUTPUT_BOUND_UPPER_UNBOUNDED; video_mixer_init_input(&object->inputs[0]); video_mixer_update_zorder_map(object); + video_mixer_rgb_to_ycbcr(object->bkgnd_color.rgba, &object->bkgnd_color.ayuv); InitializeCriticalSection(&object->cs); if (FAILED(hr = MFCreateAttributes(&object->attributes, 0))) {
1
0
0
0
← Newer
1
...
76
77
78
79
80
81
82
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200