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 2020
----- 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
1 participants
851 discussions
Start a n
N
ew thread
Huw Davies : riched20: Use run ptrs in the text retrieval function.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: 27f8e16bde4a42b96a9ccceaeedba39e21e50aca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27f8e16bde4a42b96a9cccea…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 3 08:44:41 2020 +0000 riched20: Use run ptrs in the text retrieval function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 2bb1fbbe1e9..168dc51d827 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -5160,7 +5160,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP) { - ME_DisplayItem *pRun, *pNextRun; + ME_Run *run, *next_run; const WCHAR *pStart = buffer; const WCHAR cr_lf[] = {'\r', '\n', 0}; const WCHAR *str; @@ -5169,18 +5169,15 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, /* bCRLF flag is only honored in 2.0 and up. 1.0 must always return text verbatim */ if (editor->bEmulateVersion10) bCRLF = FALSE; - pRun = start->pRun; - assert(pRun); - pNextRun = ME_FindItemFwd(pRun, diRun); + run = &start->pRun->member.run; + next_run = run_next_all_paras( run ); - nLen = pRun->member.run.len - start->nOffset; - str = get_text( &pRun->member.run, start->nOffset ); + nLen = run->len - start->nOffset; + str = get_text( run, start->nOffset ); - while (srcChars && buflen && pNextRun) + while (srcChars && buflen && next_run) { - int nFlags = pRun->member.run.nFlags; - - if (bCRLF && nFlags & MERF_ENDPARA && ~nFlags & MERF_ENDCELL) + if (bCRLF && run->nFlags & MERF_ENDPARA && ~run->nFlags & MERF_ENDCELL) { if (buflen == 1) break; /* FIXME: native fails to reduce srcChars here for WM_GETTEXT or @@ -5189,7 +5186,9 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, srcChars -= min(nLen, srcChars); nLen = 2; str = cr_lf; - } else { + } + else + { nLen = min(nLen, srcChars); srcChars -= nLen; } @@ -5201,14 +5200,14 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, buffer += nLen; - pRun = pNextRun; - pNextRun = ME_FindItemFwd(pRun, diRun); + run = next_run; + next_run = run_next_all_paras( run ); - nLen = pRun->member.run.len; - str = get_text( &pRun->member.run, 0 ); + nLen = run->len; + str = get_text( run, 0 ); } /* append '\r' to the last paragraph. */ - if (pRun->next->type == diTextEnd && bEOP) + if (run == para_end_run( para_prev( editor_end_para( editor ) ) ) && bEOP) { *buffer = '\r'; buffer ++;
1
0
0
0
Huw Davies : riched20: Use row ptrs in the EM_GETLINELENGTH handler.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: cfdfe51785733e1e8c8f8ce9f65099a2cd053058 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cfdfe51785733e1e8c8f8ce9…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 3 08:44:40 2020 +0000 riched20: Use row ptrs in the EM_GETLINELENGTH handler. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 66f6bd5e114..2bb1fbbe1e9 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4341,8 +4341,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, } case EM_LINELENGTH: { - ME_DisplayItem *item, *item_end; - int nChars = 0, nThisLineOfs = 0, nNextLineOfs = 0; + ME_Row *row; + int start_ofs, end_ofs; ME_Cursor cursor; if (wParam > ME_GetTextLength(editor)) @@ -4353,20 +4353,13 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0; } cursor_from_char_ofs( editor, wParam, &cursor ); - item = ME_RowStart( cursor.pRun ); - nThisLineOfs = run_char_ofs( &ME_FindItemFwd( item, diRun )->member.run, 0 ); - item_end = ME_FindItemFwd(item, diStartRowOrParagraphOrEnd); - if (item_end->type == diStartRow) - nNextLineOfs = run_char_ofs( &ME_FindItemFwd( item_end, diRun )->member.run, 0 ); - else - { - ME_DisplayItem *endRun = ME_FindItemBack(item_end, diRun); - assert(endRun && endRun->member.run.nFlags & MERF_ENDPARA); - nNextLineOfs = run_char_ofs( &endRun->member.run, 0 ); - } - nChars = nNextLineOfs - nThisLineOfs; - TRACE("EM_LINELENGTH(%ld)==%d\n", wParam, nChars); - return nChars; + row = row_from_cursor( &cursor ); + row_first_cursor( row, &cursor ); + start_ofs = ME_GetCursorOfs( &cursor ); + row_end_cursor( row, &cursor, FALSE ); + end_ofs = ME_GetCursorOfs( &cursor ); + TRACE( "EM_LINELENGTH(%ld)==%d\n", wParam, end_ofs - start_ofs ); + return end_ofs - start_ofs; } case EM_EXLIMITTEXT: {
1
0
0
0
Esme Povirk : avifil32: Only add the first stream reference to the parent.
by Alexandre Julliard
03 Nov '20
03 Nov '20
Module: wine Branch: master Commit: bfa143a203de882c0f2eda9617b29146e3a42955 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfa143a203de882c0f2eda96…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Mon Nov 2 15:38:17 2020 -0600 avifil32: Only add the first stream reference to the parent. Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/avifil32/avifile.c | 4 ++-- dlls/avifil32/tests/api.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index b1654daa690..8f5c5e64562 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -699,7 +699,7 @@ static ULONG WINAPI IAVIStream_fnAddRef(IAVIStream *iface) TRACE("(%p) ref=%d\n", This, ref); /* also add ref to parent, so that it doesn't kill us */ - if (This->paf != NULL) + if (This->paf != NULL && ref == 1) IAVIFile_AddRef(&This->paf->IAVIFile_iface); return ref; @@ -712,7 +712,7 @@ static ULONG WINAPI IAVIStream_fnRelease(IAVIStream *iface) TRACE("(%p) ref=%d\n", This, ref); - if (This->paf != NULL) + if (This->paf != NULL && ref == 0) IAVIFile_Release(&This->paf->IAVIFile_iface); return ref; diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c index 66ba2051a06..23c845cb328 100644 --- a/dlls/avifil32/tests/api.c +++ b/dlls/avifil32/tests/api.c @@ -352,6 +352,12 @@ static void create_avi_file(const COMMON_AVI_HEADERS *cah, char *filename) CloseHandle(hFile); } +static ULONG get_file_refcount(PAVIFILE file) +{ + AVIFileAddRef(file); + return AVIFileRelease(file); +} + static void test_default_data(void) { COMMON_AVI_HEADERS cah; @@ -363,6 +369,7 @@ static void test_default_data(void) PAVISTREAM pStream1; AVISTREAMINFOA asi0, asi1; WAVEFORMATEX wfx; + ULONG refcount; GetTempPathA(MAX_PATH, filename); strcpy(filename+strlen(filename), testfilename); @@ -443,9 +450,34 @@ static void test_default_data(void) ok(wfx.nAvgBytesPerSec == 22050, "got %u (expected 22050)\n",wfx.nAvgBytesPerSec); ok(wfx.nBlockAlign == 2, "got %u (expected 2)\n",wfx.nBlockAlign); + refcount = get_file_refcount(pFile); + ok(refcount == 3, "got %u (expected 3)\n", refcount); + AVIStreamRelease(pStream0); + + refcount = get_file_refcount(pFile); + ok(refcount == 2, "got %u (expected 2)\n", refcount); + + AVIStreamAddRef(pStream1); + + refcount = get_file_refcount(pFile); + ok(refcount == 2, "got %u (expected 2)\n", refcount); + AVIStreamRelease(pStream1); - AVIFileRelease(pFile); + AVIStreamRelease(pStream1); + + refcount = get_file_refcount(pFile); + ok(refcount == 1, "got %u (expected 1)\n", refcount); + + refcount = AVIStreamRelease(pStream1); + ok(refcount == (ULONG)-1, "got %u (expected 4294967295)\n", refcount); + + refcount = get_file_refcount(pFile); + ok(refcount == 1, "got %u (expected 1)\n", refcount); + + refcount = AVIFileRelease(pFile); + ok(refcount == 0, "got %u (expected 0)\n", refcount); + ok(DeleteFileA(filename) !=0, "Deleting file %s failed\n", filename); }
1
0
0
0
Zebediah Figura : quartz: Treat a filter as supporting IMediaSeeking only if it supports TIME_FORMAT_MEDIA_TIME.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: dfa4c07941322dbcad54507cd0acf271a6c719ab URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfa4c07941322dbcad54507c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Nov 2 12:25:17 2020 -0600 quartz: Treat a filter as supporting IMediaSeeking only if it supports TIME_FORMAT_MEDIA_TIME. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48715
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 11 +++++++++-- dlls/quartz/tests/filtergraph.c | 10 +++++----- dlls/quartz/tests/videorenderer.c | 8 ++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index e5ae12d9452..0f22bb5888c 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -585,6 +585,8 @@ static BOOL has_output_pins(IBaseFilter *filter) static void update_seeking(struct filter *filter) { + IMediaSeeking *seeking; + if (!filter->seeking) { /* The Legend of Heroes: Trails of Cold Steel II destroys its filter when @@ -593,8 +595,13 @@ static void update_seeking(struct filter *filter) * Some filters (e.g. MediaStreamFilter) can become seekable when they are * already in the graph, so always try to query IMediaSeeking if it's not * cached yet. */ - if (FAILED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&filter->seeking))) - filter->seeking = NULL; + if (SUCCEEDED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&seeking))) + { + if (IMediaSeeking_IsFormatSupported(seeking, &TIME_FORMAT_MEDIA_TIME) == S_OK) + filter->seeking = seeking; + else + IMediaSeeking_Release(seeking); + } } } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index ba63853ec7b..20a730f6aa0 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3914,9 +3914,9 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL); hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#x.\n", hr); - todo_wine ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); filter1.IMediaSeeking_iface.lpVtbl = NULL; @@ -4157,7 +4157,7 @@ static void test_graph_seeking(void) filter1.support_testguid = TRUE; hr = IMediaSeeking_GetDuration(seeking, &time); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); hr = IMediaSeeking_SetTimeFormat(seeking, &testguid); todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); @@ -4269,8 +4269,8 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetCapabilities(seeking, &caps); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(caps == (AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); - todo_wine ok(!filter1.seeking_ref, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(caps == (AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); + ok(!filter1.seeking_ref, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); filter1.support_media_time = TRUE; diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 448efe501b6..ed2639d2736 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1156,7 +1156,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n"); hr = join_thread(send_frame(input)); todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); @@ -1186,7 +1186,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 1600); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n"); @@ -1212,7 +1212,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n"); /* Test sending EOS and then flushing or stopping. */ @@ -1226,7 +1226,7 @@ static void test_eos(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ret = check_ec_complete(eventsrc, 0); - todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); + ok(!ret, "Got unexpected EC_COMPLETE.\n"); hr = IPin_BeginFlush(pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : quartz/tests: Add some more tests for seeking formats.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: 294de6f218957442b9c281e34862803b83db8d3a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=294de6f218957442b9c281e3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Nov 2 12:25:16 2020 -0600 quartz/tests: Add some more tests for seeking formats. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 100 ++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 15 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=294de6f218957442b9c2…
1
0
0
0
Georg Lehmann : winevulkan: Enable VK_EXT_validation_features and VK_EXT_validation_flags.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: 219359ddddea1d0e1c66ed16347503bfd8c29fb8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=219359ddddea1d0e1c66ed16…
Author: Georg Lehmann <dadschoorse(a)gmail.com> Date: Sat Oct 31 21:12:21 2020 +0100 winevulkan: Enable VK_EXT_validation_features and VK_EXT_validation_flags. Signed-off-by: Georg Lehmann <dadschoorse(a)gmail.com> Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 2 -- dlls/winevulkan/vulkan_thunks.c | 38 +++++++++++++++++++++++++++++ include/wine/vulkan.h | 53 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 72b0adf0c97..2ef44338d40 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -86,8 +86,6 @@ EXT_BLOCK_SIZE = 1000 UNSUPPORTED_EXTENSIONS = [ # Instance extensions - "VK_EXT_validation_features", - "VK_EXT_validation_flags", "VK_KHR_display", # Needs WSI work. "VK_KHR_surface_protected_capabilities", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index b5a24b1d1a1..025a81e1904 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -3168,6 +3168,42 @@ VkResult convert_VkInstanceCreateInfo_struct_chain(const void *pNext, VkInstance break; } + case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: + { + const VkValidationFlagsEXT *in = (const VkValidationFlagsEXT *)in_header; + VkValidationFlagsEXT *out; + + if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->disabledValidationCheckCount = in->disabledValidationCheckCount; + out->pDisabledValidationChecks = in->pDisabledValidationChecks; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + + case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: + { + const VkValidationFeaturesEXT *in = (const VkValidationFeaturesEXT *)in_header; + VkValidationFeaturesEXT *out; + + if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->enabledValidationFeatureCount = in->enabledValidationFeatureCount; + out->pEnabledValidationFeatures = in->pEnabledValidationFeatures; + out->disabledValidationFeatureCount = in->disabledValidationFeatureCount; + out->pDisabledValidationFeatures = in->pDisabledValidationFeatures; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: { const VkDebugUtilsMessengerCreateInfoEXT *in = (const VkDebugUtilsMessengerCreateInfoEXT *)in_header; @@ -6558,6 +6594,8 @@ static const char * const vk_instance_extensions[] = "VK_EXT_debug_utils", "VK_EXT_headless_surface", "VK_EXT_swapchain_colorspace", + "VK_EXT_validation_features", + "VK_EXT_validation_flags", "VK_KHR_device_group_creation", "VK_KHR_external_fence_capabilities", "VK_KHR_external_memory_capabilities", diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index c6de4e07ffd..ea6837e87ba 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -115,6 +115,8 @@ #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" #define VK_KHR_DEVICE_GROUP_SPEC_VERSION 4 #define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group" +#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 2 +#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" #define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" #define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 @@ -339,6 +341,8 @@ #define VK_EXT_TOOLING_INFO_EXTENSION_NAME "VK_EXT_tooling_info" #define VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION 1 #define VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME "VK_EXT_separate_stencil_usage" +#define VK_EXT_VALIDATION_FEATURES_SPEC_VERSION 4 +#define VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME "VK_EXT_validation_features" #define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1 #define VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_NV_cooperative_matrix" #define VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION 1 @@ -2752,6 +2756,7 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, + VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = 1000066000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, @@ -2957,6 +2962,7 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000, VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000, + VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, @@ -3238,6 +3244,35 @@ typedef enum VkValidationCacheHeaderVersionEXT VK_VALIDATION_CACHE_HEADER_VERSION_EXT_MAX_ENUM = 0x7fffffff, } VkValidationCacheHeaderVersionEXT; +typedef enum VkValidationCheckEXT +{ + VK_VALIDATION_CHECK_ALL_EXT = 0, + VK_VALIDATION_CHECK_SHADERS_EXT = 1, + VK_VALIDATION_CHECK_EXT_MAX_ENUM = 0x7fffffff, +} VkValidationCheckEXT; + +typedef enum VkValidationFeatureDisableEXT +{ + VK_VALIDATION_FEATURE_DISABLE_ALL_EXT = 0, + VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1, + VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2, + VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3, + VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4, + VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5, + VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6, + VK_VALIDATION_FEATURE_DISABLE_EXT_MAX_ENUM = 0x7fffffff, +} VkValidationFeatureDisableEXT; + +typedef enum VkValidationFeatureEnableEXT +{ + VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, + VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, + VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2, + VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3, + VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4, + VK_VALIDATION_FEATURE_ENABLE_EXT_MAX_ENUM = 0x7fffffff, +} VkValidationFeatureEnableEXT; + typedef enum VkVendorId { VK_VENDOR_ID_VIV = 0x00010001, @@ -5029,6 +5064,14 @@ typedef struct VkValidationCacheCreateInfoEXT const void *pInitialData; } VkValidationCacheCreateInfoEXT; +typedef struct VkValidationFlagsEXT +{ + VkStructureType sType; + const void *pNext; + uint32_t disabledValidationCheckCount; + const VkValidationCheckEXT *pDisabledValidationChecks; +} VkValidationFlagsEXT; + typedef struct VkVertexInputBindingDescription { uint32_t binding; @@ -7483,6 +7526,16 @@ typedef struct VkSubpassDescription const uint32_t *pPreserveAttachments; } VkSubpassDescription; +typedef struct VkValidationFeaturesEXT +{ + VkStructureType sType; + const void *pNext; + uint32_t enabledValidationFeatureCount; + const VkValidationFeatureEnableEXT *pEnabledValidationFeatures; + uint32_t disabledValidationFeatureCount; + const VkValidationFeatureDisableEXT *pDisabledValidationFeatures; +} VkValidationFeaturesEXT; + typedef struct VkAccelerationStructureCreateInfoNV { VkStructureType sType;
1
0
0
0
Gijs Vermeulen : quartz: Implement IVMRAspectRatioControl9.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: c7bd395ad9ddd833e42fc806f08dca62869710ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c7bd395ad9ddd833e42fc806…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Fri Oct 30 20:46:55 2020 +0100 quartz: Implement IVMRAspectRatioControl9. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=37517
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 23 +++++++++++++++++-- dlls/quartz/vmr9.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index df18bd5f2d5..7b470c6e534 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -242,7 +242,7 @@ static void test_common_interfaces(IBaseFilter *filter) check_interface(filter, &IID_IQualityControl, TRUE); todo_wine check_interface(filter, &IID_IQualProp, TRUE); check_interface(filter, &IID_IUnknown, TRUE); - todo_wine check_interface(filter, &IID_IVMRAspectRatioControl9, TRUE); + check_interface(filter, &IID_IVMRAspectRatioControl9, TRUE); todo_wine check_interface(filter, &IID_IVMRDeinterlaceControl9, TRUE); check_interface(filter, &IID_IVMRFilterConfig9, TRUE); check_interface(filter, &IID_IVMRMixerBitmap9, TRUE); @@ -3851,6 +3851,7 @@ static void test_windowless_size(void) }; IBaseFilter *filter = create_vmr9(VMR9Mode_Windowless); LONG width, height, aspect_width, aspect_height; + IVMRAspectRatioControl9 *aspect_ratio_control; IVMRWindowlessControl9 *windowless_control; IFilterGraph2 *graph = create_graph(); VMR9AspectRatioMode aspect_mode; @@ -3864,6 +3865,7 @@ static void test_windowless_size(void) IPin *pin; IBaseFilter_QueryInterface(filter, &IID_IVMRWindowlessControl9, (void **)&windowless_control); + IBaseFilter_QueryInterface(filter, &IID_IVMRAspectRatioControl9, (void **)&aspect_ratio_control); IBaseFilter_FindPin(filter, L"VMR Input0", &pin); IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input); testfilter_init(&source); @@ -3902,6 +3904,11 @@ static void test_windowless_size(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + aspect_mode = 0xdeadbeef; + hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + width = height = 0xdeadbeef; hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, &height, NULL, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -3956,7 +3963,7 @@ static void test_windowless_size(void) SetRect(&expect, 0, 0, 640, 480); ok(EqualRect(&src, &expect), "Got window rect %s.\n", wine_dbgstr_rect(&src)); - hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_LetterBox); + hr = IVMRAspectRatioControl9_SetAspectRatioMode(aspect_ratio_control, VMR9ARMode_LetterBox); ok(hr == S_OK, "Got hr %#x.\n", hr); aspect_mode = 0xdeadbeef; @@ -3964,6 +3971,17 @@ static void test_windowless_size(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(aspect_mode == VMR9ARMode_LetterBox, "Got mode %u.\n", aspect_mode); + hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_None); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + aspect_mode = 0xdeadbeef; + hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + + hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_LetterBox); + ok(hr == S_OK, "Got hr %#x.\n", hr); + memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst); @@ -3993,6 +4011,7 @@ out: IMemInputPin_Release(input); IPin_Release(pin); IVMRWindowlessControl9_Release(windowless_control); + IVMRAspectRatioControl9_Release(aspect_ratio_control); ref = IBaseFilter_Release(filter); ok(!ref, "Got outstanding refcount %d.\n", ref); DestroyWindow(window); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index a24dbc62977..3ddef8dbed5 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -60,6 +60,7 @@ struct quartz_vmr IAMCertifiedOutputProtection IAMCertifiedOutputProtection_iface; IAMFilterMiscFlags IAMFilterMiscFlags_iface; + IVMRAspectRatioControl9 IVMRAspectRatioControl9_iface; IVMRFilterConfig IVMRFilterConfig_iface; IVMRFilterConfig9 IVMRFilterConfig9_iface; IVMRMixerBitmap9 IVMRMixerBitmap9_iface; @@ -603,6 +604,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, *out = &filter->IAMCertifiedOutputProtection_iface; else if (IsEqualGUID(iid, &IID_IAMFilterMiscFlags)) *out = &filter->IAMFilterMiscFlags_iface; + else if (IsEqualGUID(iid, &IID_IVMRAspectRatioControl9) && is_vmr9(filter)) + *out = &filter->IVMRAspectRatioControl9_iface; else if (IsEqualGUID(iid, &IID_IVMRFilterConfig) && !is_vmr9(filter)) *out = &filter->IVMRFilterConfig_iface; else if (IsEqualGUID(iid, &IID_IVMRFilterConfig9) && is_vmr9(filter)) @@ -2396,6 +2399,62 @@ static const IVMRMixerBitmap9Vtbl mixer_bitmap9_vtbl = mixer_bitmap9_GetAlphaBitmapParameters, }; +static inline struct quartz_vmr *impl_from_IVMRAspectRatioControl9(IVMRAspectRatioControl9 *iface) +{ + return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRAspectRatioControl9_iface); +} + +static HRESULT WINAPI aspect_ratio_control9_QueryInterface(IVMRAspectRatioControl9 *iface, REFIID iid, void **out) +{ + struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface); + return IUnknown_QueryInterface(filter->renderer.filter.outer_unk, iid, out); +} + +static ULONG WINAPI aspect_ratio_control9_AddRef(IVMRAspectRatioControl9 *iface) +{ + struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface); + return IUnknown_AddRef(filter->renderer.filter.outer_unk); +} + +static ULONG WINAPI aspect_ratio_control9_Release(IVMRAspectRatioControl9 *iface) +{ + struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface); + return IUnknown_Release(filter->renderer.filter.outer_unk); +} + +static HRESULT WINAPI aspect_ratio_control9_GetAspectRatioMode(IVMRAspectRatioControl9 *iface, DWORD *mode) +{ + struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface); + + TRACE("filter %p, mode %p.\n", filter, mode); + + EnterCriticalSection(&filter->renderer.filter.csFilter); + *mode = filter->aspect_mode; + LeaveCriticalSection(&filter->renderer.filter.csFilter); + return S_OK; +} + +static HRESULT WINAPI aspect_ratio_control9_SetAspectRatioMode(IVMRAspectRatioControl9 *iface, DWORD mode) +{ + struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface); + + TRACE("filter %p, mode %u.\n", filter, mode); + + EnterCriticalSection(&filter->renderer.filter.csFilter); + filter->aspect_mode = mode; + LeaveCriticalSection(&filter->renderer.filter.csFilter); + return S_OK; +} + +static const IVMRAspectRatioControl9Vtbl aspect_ratio_control9_vtbl = +{ + aspect_ratio_control9_QueryInterface, + aspect_ratio_control9_AddRef, + aspect_ratio_control9_Release, + aspect_ratio_control9_GetAspectRatioMode, + aspect_ratio_control9_SetAspectRatioMode, +}; + static inline struct quartz_vmr *impl_from_IOverlay(IOverlay *iface) { return CONTAINING_RECORD(iface, struct quartz_vmr, IOverlay_iface); @@ -2522,6 +2581,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) strmbase_renderer_init(&object->renderer, outer, clsid, L"VMR Input0", &renderer_ops); object->IAMCertifiedOutputProtection_iface.lpVtbl = &IAMCertifiedOutputProtection_Vtbl; object->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl; + object->IVMRAspectRatioControl9_iface.lpVtbl = &aspect_ratio_control9_vtbl; object->IVMRFilterConfig_iface.lpVtbl = &VMR7_FilterConfig_Vtbl; object->IVMRFilterConfig9_iface.lpVtbl = &VMR9_FilterConfig_Vtbl; object->IVMRMixerBitmap9_iface.lpVtbl = &mixer_bitmap9_vtbl;
1
0
0
0
Will Mainio : msvcrt/tests: Add scanf tests for dashes in scanset.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: e0812be876af60bdfafe283b96779958c4e20540 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e0812be876af60bdfafe283b…
Author: Will Mainio <will.mainio(a)fastmail.com> Date: Mon Nov 2 16:00:16 2020 +0100 msvcrt/tests: Add scanf tests for dashes in scanset. Signed-off-by: Will Mainio <will.mainio(a)fastmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/scanf.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index 57d9cc0ba12..f0c7208e8e8 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -186,6 +186,22 @@ static void test_sscanf( void ) ok( ret == 1, "Error with format \"%s\"\n","%*[a-cd-dg-e]%c"); ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]); + ret = p_sscanf("-123", "%[-0-9]", buffer); + ok( ret == 1, "Error with format \"%s\"\n", "%[-0-9]"); + ok( strcmp("-123", buffer) == 0, "Error with \"-123\" \"%s\"\n", buffer); + + ret = p_sscanf("-321", "%[0-9-]", buffer); + ok( ret == 1, "Error with format \"%s\"\n", "%[0-9-]"); + ok( strcmp("-321", buffer) == 0, "Error with \"-321\" \"%s\"\n", buffer); + + ret = p_sscanf("-4123", "%[1-2-4]", buffer); + ok( ret == 1, "Error with format \"%s\"\n", "%[1-2-4]"); + ok( strcmp("-412", buffer) == 0, "Error with \"-412\" \"%s\"\n", buffer); + + ret = p_sscanf("-456123", "%[1-2-45-6]", buffer); + ok( ret == 1, "Error with format \"%s\"\n", "%[1-2-45-6]"); + ok( strcmp("-45612", buffer) == 0, "Error with \"-45612\" \"%s\"\n", buffer); + buffer1[0] = 'b'; ret = p_sscanf("a","%s%s", buffer, buffer1); ok( ret == 1, "expected 1, got %u\n", ret);
1
0
0
0
Will Mainio : msvcrt: Fix scanf with dashes in scanset.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: c38102b9b49c2f63e9ff7369f612b999dec609ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c38102b9b49c2f63e9ff7369…
Author: Will Mainio <will.mainio(a)fastmail.com> Date: Mon Nov 2 16:00:07 2020 +0100 msvcrt: Fix scanf with dashes in scanset. Signed-off-by: Will Mainio <will.mainio(a)fastmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/scanf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index 3b4686c1107..e1a194e39fa 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -639,12 +639,12 @@ _FUNCTION_ { while(*format && (*format != ']')) { /* According to msdn: * "Note that %[a-z] and %[z-a] are interpreted as equivalent to %[abcde...z]." */ - if((*format == '-') && (*(format + 1) != ']')) { - if ((*(format - 1)) < *(format + 1)) - RtlSetBits(&bitMask, *(format - 1) +1 , *(format + 1) - *(format - 1)); - else - RtlSetBits(&bitMask, *(format + 1) , *(format - 1) - *(format + 1)); - format++; + if(format[1] == '-' && format[2] && format[2] != ']') { + if (format[0] < format[2]) + RtlSetBits(&bitMask, format[0], format[2] - format[0] + 1); + else + RtlSetBits(&bitMask, format[2], format[0] - format[2] + 1); + format += 2; } else RtlSetBits(&bitMask, *format, 1); format++;
1
0
0
0
Damjan Jovanovic : oleaut32: IFont never had an IPersistStreamInit interface.
by Alexandre Julliard
02 Nov '20
02 Nov '20
Module: wine Branch: master Commit: 12bc7c0abe0ff06ad5eb57b6f1640b0c3c703b74 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=12bc7c0abe0ff06ad5eb57b6…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sun Nov 1 18:11:24 2020 +0200 oleaut32: IFont never had an IPersistStreamInit interface. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/olefont.c | 91 ------------------------------------------- dlls/oleaut32/tests/olefont.c | 5 +++ 2 files changed, 5 insertions(+), 91 deletions(-) diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index b82ffbf1b54..a08994e65e5 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -255,7 +255,6 @@ struct OLEFontImpl IPersistStream IPersistStream_iface; IConnectionPointContainer IConnectionPointContainer_iface; IPersistPropertyBag IPersistPropertyBag_iface; - IPersistStreamInit IPersistStreamInit_iface; /* * Reference count for that instance of the class. */ @@ -311,11 +310,6 @@ static inline OLEFontImpl *impl_from_IPersistPropertyBag( IPersistPropertyBag *i return CONTAINING_RECORD(iface, OLEFontImpl, IPersistPropertyBag_iface); } -static inline OLEFontImpl *impl_from_IPersistStreamInit( IPersistStreamInit *iface ) -{ - return CONTAINING_RECORD(iface, OLEFontImpl, IPersistStreamInit_iface); -} - /*********************************************************************** * Prototypes for the implementation functions for the IFont @@ -491,10 +485,6 @@ static HRESULT WINAPI OLEFontImpl_QueryInterface( { *ppvObject = &this->IPersistPropertyBag_iface; } - else if (IsEqualGUID(&IID_IPersistStreamInit, riid)) - { - *ppvObject = &this->IPersistStreamInit_iface; - } if (!*ppvObject) { @@ -2056,86 +2046,6 @@ static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable = OLEFontImpl_IPersistPropertyBag_Save }; -/************************************************************************ - * OLEFontImpl implementation of IPersistStreamInit. - */ -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_QueryInterface( - IPersistStreamInit *iface, REFIID riid, LPVOID *ppvObj -) { - OLEFontImpl *this = impl_from_IPersistStreamInit(iface); - return IFont_QueryInterface(&this->IFont_iface,riid,ppvObj); -} - -static ULONG WINAPI OLEFontImpl_IPersistStreamInit_AddRef( - IPersistStreamInit *iface -) { - OLEFontImpl *this = impl_from_IPersistStreamInit(iface); - return IFont_AddRef(&this->IFont_iface); -} - -static ULONG WINAPI OLEFontImpl_IPersistStreamInit_Release( - IPersistStreamInit *iface -) { - OLEFontImpl *this = impl_from_IPersistStreamInit(iface); - return IFont_Release(&this->IFont_iface); -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetClassID( - IPersistStreamInit *iface, CLSID *classid -) { - FIXME("(%p,%p), stub!\n", iface, classid); - return E_FAIL; -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_IsDirty( - IPersistStreamInit *iface -) { - FIXME("(%p), stub!\n", iface); - return E_FAIL; -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Load( - IPersistStreamInit *iface, LPSTREAM pStm -) { - FIXME("(%p,%p), stub!\n", iface, pStm); - return E_FAIL; -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Save( - IPersistStreamInit *iface, LPSTREAM pStm, BOOL fClearDirty -) { - FIXME("(%p,%p,%d), stub!\n", iface, pStm, fClearDirty); - return E_FAIL; -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetSizeMax( - IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize -) { - FIXME("(%p,%p), stub!\n", iface, pcbSize); - return E_FAIL; -} - -static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_InitNew( - IPersistStreamInit *iface -) { - FIXME("(%p), stub!\n", iface); - return S_OK; -} - -static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = -{ - OLEFontImpl_IPersistStreamInit_QueryInterface, - OLEFontImpl_IPersistStreamInit_AddRef, - OLEFontImpl_IPersistStreamInit_Release, - - OLEFontImpl_IPersistStreamInit_GetClassID, - OLEFontImpl_IPersistStreamInit_IsDirty, - OLEFontImpl_IPersistStreamInit_Load, - OLEFontImpl_IPersistStreamInit_Save, - OLEFontImpl_IPersistStreamInit_GetSizeMax, - OLEFontImpl_IPersistStreamInit_InitNew -}; - /************************************************************************ * OLEFontImpl_Construct * @@ -2159,7 +2069,6 @@ static OLEFontImpl* OLEFontImpl_Construct(const FONTDESC *fontDesc) newObject->IPersistStream_iface.lpVtbl = &OLEFontImpl_IPersistStream_VTable; newObject->IConnectionPointContainer_iface.lpVtbl = &OLEFontImpl_IConnectionPointContainer_VTable; newObject->IPersistPropertyBag_iface.lpVtbl = &OLEFontImpl_IPersistPropertyBag_VTable; - newObject->IPersistStreamInit_iface.lpVtbl = &OLEFontImpl_IPersistStreamInit_VTable; newObject->ref = 1; diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index 9c8d255af1d..5137d807e78 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -188,6 +188,7 @@ static void test_QueryInterface(void) LPVOID pvObj = NULL; HRESULT hr; IFont* font = NULL; + IPersistStreamInit *persistStreamInit = NULL; LONG ref; hr = pOleCreateFontIndirect(NULL, &IID_IFont, NULL); @@ -212,6 +213,10 @@ static void test_QueryInterface(void) ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr\n"); + /* IFont never had IPersistStreamInit */ + hr = IFont_QueryInterface(font, &IID_IPersistStreamInit, (void**)&persistStreamInit); + EXPECT_HR(hr, E_NOINTERFACE); + IFont_Release(font); IFont_Release(font); }
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
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
Results per page:
10
25
50
100
200