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
May 2023
----- 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
775 discussions
Start a n
N
ew thread
Anton Baskanov : dsound: Store the frequency of 3D buffers separately.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: ef275facacba491c014c3282acfc3f5b065bb06c URL:
https://gitlab.winehq.org/wine/wine/-/commit/ef275facacba491c014c3282acfc3f…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Sun Apr 23 20:19:30 2023 +0700 dsound: Store the frequency of 3D buffers separately. --- dlls/dsound/buffer.c | 40 +++++++++++++++++++++++++--------------- dlls/dsound/dsound_private.h | 1 + dlls/dsound/sound3d.c | 11 ++++++----- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 7b830604a60..1b724ee775b 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -287,10 +287,17 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetFrequency(IDirectSoundBuffer8 *i AcquireSRWLockExclusive(&This->lock); - oldFreq = This->freq; - This->freq = freq; - if (freq != oldFreq) - DSOUND_RecalcFormat(This); + if (This->dsbd.dwFlags & DSBCAPS_CTRL3D) { + oldFreq = This->ds3db_freq; + This->ds3db_freq = freq; + if (freq != oldFreq) + DSOUND_Calc3DBuffer(This); + } else { + oldFreq = This->freq; + This->freq = freq; + if (freq != oldFreq) + DSOUND_RecalcFormat(This); + } ReleaseSRWLockExclusive(&This->lock); @@ -700,7 +707,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetFrequency(IDirectSoundBuffer8 *i return DSERR_INVALIDPARAM; } - *freq = This->freq; + *freq = (This->dsbd.dwFlags & DSBCAPS_CTRL3D) ? This->ds3db_freq : This->freq; TRACE("-> %ld\n", *freq); return DS_OK; @@ -1100,15 +1107,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds dsb->sec_mixpos = 0; dsb->state = STATE_STOPPED; - /* calculate fragment size and write lead */ - DSOUND_RecalcFormat(dsb); - - dsb->committedbuff = malloc(dsb->maxwritelead); - if(!dsb->committedbuff) { - IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface); - return DSERR_OUTOFMEMORY; - } - if (dsb->dsbd.dwFlags & DSBCAPS_CTRL3D) { dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER); dsb->ds3db_ds3db.vPosition.x = 0.0; @@ -1127,11 +1125,23 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds dsb->ds3db_ds3db.flMaxDistance = DS3D_DEFAULTMAXDISTANCE; dsb->ds3db_ds3db.dwMode = DS3DMODE_NORMAL; + dsb->ds3db_freq = dsbd->lpwfxFormat->nSamplesPerSec; + dsb->ds3db_need_recalc = FALSE; DSOUND_Calc3DBuffer(dsb); - } else + } else { DSOUND_RecalcVolPan(&(dsb->volpan)); + /* calculate fragment size and write lead */ + DSOUND_RecalcFormat(dsb); + } + + dsb->committedbuff = malloc(dsb->maxwritelead); + if(!dsb->committedbuff) { + IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface); + return DSERR_OUTOFMEMORY; + } + InitializeSRWLock(&dsb->lock); /* register buffer */ diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index d9f488c25b8..e67d474d61d 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -164,6 +164,7 @@ struct IDirectSoundBufferImpl /* DirectSound3DBuffer fields */ DS3DBUFFER ds3db_ds3db; LONG ds3db_lVolume; + DWORD ds3db_freq; BOOL ds3db_need_recalc; /* Used for bit depth conversion */ int mix_channels; diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 939e0091815..4e98cdc0b8d 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -288,6 +288,8 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb) } TRACE("panning: Angle = %f rad, lPan = %ld\n", flAngle, dsb->volpan.lPan); + dsb->freq = dsb->ds3db_freq; + /* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */ if(0) { @@ -310,16 +312,15 @@ if(0) if listener moves AWAY from buffer, its velocity component is NEGATIVE */ flListenerVel = ProjectVector(&dsb->device->ds3dl.vVelocity, &vDistance); /* formula taken from Gianicoli D.: Physics, 4th edition: */ - /* FIXME: replace dsb->freq with appropriate frequency ! */ - flFreq = dsb->freq * ((DEFAULT_VELOCITY + flListenerVel)/(DEFAULT_VELOCITY + flBufferVel)); + flFreq = dsb->ds3db_freq * ((DEFAULT_VELOCITY + flListenerVel)/(DEFAULT_VELOCITY + flBufferVel)); TRACE("doppler: Buffer velocity (component) = %f, Listener velocity (component) = %f => Doppler shift: %ld Hz -> %f Hz\n", - flBufferVel, flListenerVel, dsb->freq, flFreq); - /* FIXME: replace following line with correct frequency setting ! */ + flBufferVel, flListenerVel, dsb->ds3db_freq, flFreq); dsb->freq = flFreq; - DSOUND_RecalcFormat(dsb); } } + DSOUND_RecalcFormat(dsb); + for (i = 0; i < dsb->device->pwfx->nChannels; i++) dsb->volpan.dwTotalAmpFactor[i] = 0;
1
0
0
0
Alexandre Julliard : ntdll: Add a helper function to map the main exe module.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 0433db1eb1dadcb7e38b659f7863d5d6c88f5395 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0433db1eb1dadcb7e38b659f7863d5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 23 13:22:28 2023 +0200 ntdll: Add a helper function to map the main exe module. --- dlls/ntdll/unix/loader.c | 16 +++++----------- dlls/ntdll/unix/unix_private.h | 2 ++ dlls/ntdll/unix/virtual.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index ba96e1ed851..4f485655fe2 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1663,7 +1663,7 @@ BOOL is_builtin_path( const UNICODE_STRING *path, WORD *machine ) * open_main_image */ static NTSTATUS open_main_image( WCHAR *image, void **module, SECTION_IMAGE_INFORMATION *info, - enum loadorder loadorder ) + enum loadorder loadorder, USHORT machine ) { static const WCHAR soW[] = {'.','s','o',0}; UNICODE_STRING nt_name; @@ -1684,14 +1684,8 @@ static NTSTATUS open_main_image( WCHAR *image, void **module, SECTION_IMAGE_INFO status = open_dll_file( unix_name, &attr, &mapping ); if (!status) { - *module = NULL; - status = NtMapViewOfSection( mapping, NtCurrentProcess(), module, 0, 0, NULL, &size, - ViewShare, 0, PAGE_EXECUTE_READ ); - if (!status) - { - NtQuerySection( mapping, SectionImageInformation, info, sizeof(*info), NULL ); - if (info->u.s.ComPlusNativeReady) info->Machine = native_machine; - } + status = virtual_map_module( mapping, module, &size, info, 0, machine ); + if (!status && info->u.s.ComPlusNativeReady) info->Machine = native_machine; NtClose( mapping ); } else if (status == STATUS_INVALID_IMAGE_NOT_MZ && loadorder != LO_NATIVE) @@ -1732,7 +1726,7 @@ NTSTATUS load_main_exe( const WCHAR *dos_name, const char *unix_name, const WCHA if ((status = unix_to_nt_file_name( unix_name, image ))) goto failed; init_unicode_string( &nt_name, *image ); loadorder = get_load_order( &nt_name ); - status = open_main_image( *image, module, &main_image_info, loadorder ); + status = open_main_image( *image, module, &main_image_info, loadorder, 0 ); if (status != STATUS_DLL_NOT_FOUND) return status; free( *image ); } @@ -1752,7 +1746,7 @@ NTSTATUS load_main_exe( const WCHAR *dos_name, const char *unix_name, const WCHA init_unicode_string( &nt_name, *image ); if (loadorder == LO_INVALID) loadorder = get_load_order( &nt_name ); - status = open_main_image( *image, module, &main_image_info, loadorder ); + status = open_main_image( *image, module, &main_image_info, loadorder, 0 ); if (status != STATUS_DLL_NOT_FOUND) return status; /* if path is in system dir, we can load the builtin even if the file itself doesn't exist */ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index e21fd780cf4..1b9ec243945 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -223,6 +223,8 @@ extern ULONG_PTR get_system_affinity_mask(void) DECLSPEC_HIDDEN; extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info, BOOL wow64 ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size, SECTION_IMAGE_INFORMATION *info, ULONG_PTR limit, WORD machine, BOOL prefer_native ) DECLSPEC_HIDDEN; +extern NTSTATUS virtual_map_module( HANDLE mapping, void **module, SIZE_T *size, SECTION_IMAGE_INFORMATION *info, + ULONG_PTR limit, USHORT machine ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_create_builtin_view( void *module, const UNICODE_STRING *nt_name, pe_image_info_t *info, void *so_handle ) DECLSPEC_HIDDEN; extern TEB *virtual_alloc_first_teb(void) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 873800bb42f..9ebede0b159 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -3073,6 +3073,42 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size } +/*********************************************************************** + * virtual_map_module + */ +NTSTATUS virtual_map_module( HANDLE mapping, void **module, SIZE_T *size, SECTION_IMAGE_INFORMATION *info, + ULONG_PTR limit, USHORT machine ) +{ + unsigned int status; + mem_size_t full_size; + unsigned int sec_flags; + HANDLE shared_file; + pe_image_info_t *image_info = NULL; + ACCESS_MASK access = SECTION_MAP_READ | SECTION_MAP_EXECUTE; + WCHAR *filename; + + if ((status = get_mapping_info( mapping, access, &sec_flags, &full_size, &shared_file, &image_info ))) + return status; + + if (!image_info) return STATUS_INVALID_PARAMETER; + + *module = NULL; + *size = 0; + filename = (WCHAR *)(image_info + 1); + + /* check if we can replace that mapping with the builtin */ + status = load_builtin( image_info, filename, machine, module, size, limit ); + if (status == STATUS_IMAGE_ALREADY_LOADED) + status = virtual_map_image( mapping, access, module, size, shared_file, limit, 0, + machine, image_info, filename, FALSE ); + + virtual_fill_image_information( image_info, info ); + if (shared_file) NtClose( shared_file ); + free( image_info ); + return status; +} + + /*********************************************************************** * virtual_create_builtin_view */
1
0
0
0
Alexandre Julliard : ntdll: Support the machine extended parameter in NtMapViewOfSectionEx().
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: ebc1b099159059d35fd86e61122ab7f7aa6722ef URL:
https://gitlab.winehq.org/wine/wine/-/commit/ebc1b099159059d35fd86e61122ab7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 23 10:40:46 2023 +0200 ntdll: Support the machine extended parameter in NtMapViewOfSectionEx(). --- dlls/ntdll/tests/virtual.c | 1 - dlls/ntdll/tests/wow64.c | 152 ++++++++++++++++++++++++++++++++++++++++- dlls/ntdll/unix/loader.c | 41 ++++++----- dlls/ntdll/unix/server.c | 8 ++- dlls/ntdll/unix/unix_private.h | 2 +- dlls/ntdll/unix/virtual.c | 68 ++++++++++-------- include/wine/server_protocol.h | 5 +- server/protocol.def | 3 +- server/trace.c | 3 +- 9 files changed, 229 insertions(+), 54 deletions(-)
1
0
0
0
Alexandre Julliard : ntdll: Use STATUS_NOT_SUPPORTED for internal machine mismatch errors.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: af01944a8ce742fb0a1696ea51d91d8ec3da6607 URL:
https://gitlab.winehq.org/wine/wine/-/commit/af01944a8ce742fb0a1696ea51d91d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 23 11:13:05 2023 +0200 ntdll: Use STATUS_NOT_SUPPORTED for internal machine mismatch errors. It corresponds to what NtMapViewOfSectionEx() returns with an explicitly specified machine. --- dlls/ntdll/loader.c | 12 ++++++------ dlls/ntdll/unix/loader.c | 10 +++++----- dlls/ntdll/unix/virtual.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 0d8d3b16c70..feaacea83e7 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2580,7 +2580,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm, HANDL if (!is_valid_binary( handle, image_info )) { TRACE( "%s is for arch %x, continuing search\n", debugstr_us(nt_name), image_info->Machine ); - status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + status = STATUS_NOT_SUPPORTED; NtClose( *mapping ); *mapping = NULL; } @@ -3004,11 +3004,11 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne RtlAppendUnicodeToString( new_name, L"\\" ); RtlAppendUnicodeToString( new_name, name ); status = open_dll_file( new_name, pwm, mapping, image_info, id ); - if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE; + if (status == STATUS_NOT_SUPPORTED) found_image = TRUE; else if (status != STATUS_DLL_NOT_FOUND) goto done; RtlFreeUnicodeString( new_name ); } - if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + if (found_image) status = STATUS_NOT_SUPPORTED; done: RtlFreeUnicodeString( new_name ); @@ -3062,13 +3062,13 @@ static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING * if ((status = RtlDosPathNameToNtPathName_U_WithStatus( name, nt_name, NULL, NULL ))) goto done; status = open_dll_file( nt_name, pwm, mapping, image_info, id ); - if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE; + if (status == STATUS_NOT_SUPPORTED) found_image = TRUE; else if (status != STATUS_DLL_NOT_FOUND) goto done; RtlFreeUnicodeString( nt_name ); paths = ptr; } - if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + if (found_image) status = STATUS_NOT_SUPPORTED; done: RtlFreeHeap( GetProcessHeap(), 0, name ); @@ -3127,7 +3127,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, UNI else if (!(status = RtlDosPathNameToNtPathName_U_WithStatus( libname, nt_name, NULL, NULL ))) status = open_dll_file( nt_name, pwm, mapping, image_info, id ); - if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) status = STATUS_INVALID_IMAGE_FORMAT; + if (status == STATUS_NOT_SUPPORTED) status = STATUS_INVALID_IMAGE_FORMAT; done: RtlFreeHeap( GetProcessHeap(), 0, fullname ); diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 61743df7556..27fd974f966 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1440,7 +1440,7 @@ static NTSTATUS open_builtin_so_file( const char *name, OBJECT_ATTRIBUTES *attr, status = STATUS_PROCEDURE_NOT_FOUND; } } - else status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + else status = STATUS_NOT_SUPPORTED; close( fd ); return status; @@ -1525,7 +1525,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T file[pos + len + 1] = 0; ptr = prepend( file + pos, dll_paths[i], strlen(dll_paths[i]) ); status = open_builtin_pe_file( ptr, &attr, module, size_ptr, image_info, limit, machine, prefer_native ); - if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) + if (status == STATUS_NOT_SUPPORTED) { found_image = TRUE; continue; @@ -1533,11 +1533,11 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T if (status != STATUS_DLL_NOT_FOUND) goto done; strcpy( file + pos + len + 1, ".so" ); status = open_builtin_so_file( ptr, &attr, module, image_info, machine, prefer_native ); - if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE; + if (status == STATUS_NOT_SUPPORTED) found_image = TRUE; else if (status != STATUS_DLL_NOT_FOUND) goto done; } - if (found_image) status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + if (found_image) status = STATUS_NOT_SUPPORTED; WARN( "cannot find builtin library for %s\n", debugstr_us(nt_name) ); done: if (status >= 0 && ext) @@ -1591,7 +1591,7 @@ NTSTATUS load_builtin( const pe_image_info_t *image_info, WCHAR *filename, return find_builtin_dll( &nt_name, module, size, &info, limit, machine, FALSE ); default: status = find_builtin_dll( &nt_name, module, size, &info, limit, machine, (loadorder == LO_DEFAULT) ); - if (status == STATUS_DLL_NOT_FOUND || status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) + if (status == STATUS_DLL_NOT_FOUND || status == STATUS_NOT_SUPPORTED) return STATUS_IMAGE_ALREADY_LOADED; return status; } diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 2255061ec75..a46c27a6b71 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -3050,7 +3050,7 @@ NTSTATUS virtual_map_builtin_module( HANDLE mapping, void **module, SIZE_T *size else if (machine && image_info->machine != machine) { TRACE( "%s is for arch %04x, continuing search\n", debugstr_w(filename), image_info->machine ); - status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH; + status = STATUS_NOT_SUPPORTED; } else if (prefer_native && (image_info->dll_charact & IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE)) {
1
0
0
0
Alexandre Julliard : ntdll: Catch MEM_EXTENDED_PARAMETER duplicates for all types.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 685f1b6b055f5a86aca9588f4f5aa95a36602ed5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/685f1b6b055f5a86aca9588f4f5aa9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 23 10:18:51 2023 +0200 ntdll: Catch MEM_EXTENDED_PARAMETER duplicates for all types. --- dlls/ntdll/tests/virtual.c | 72 ++++++++++++++++++++++++++++++++++++++++------ dlls/ntdll/unix/virtual.c | 12 +++++--- 2 files changed, 72 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c index c125fdff0d7..00811938d6d 100644 --- a/dlls/ntdll/tests/virtual.c +++ b/dlls/ntdll/tests/virtual.c @@ -293,7 +293,7 @@ static void check_region_size_(void *p, SIZE_T s, unsigned int line) static void test_NtAllocateVirtualMemoryEx(void) { - MEM_EXTENDED_PARAMETER ext; + MEM_EXTENDED_PARAMETER ext[2]; SIZE_T size, size2; char *p, *p1, *p2; NTSTATUS status; @@ -425,13 +425,28 @@ static void test_NtAllocateVirtualMemoryEx(void) ok(status == STATUS_SUCCESS, "Unexpected status %08lx.\n", status); } - memset( &ext, 0, sizeof(ext) ); - ext.Type = MemExtendedParameterAttributeFlags; - ext.ULong = MEM_EXTENDED_PARAMETER_EC_CODE; + memset( ext, 0, sizeof(ext) ); + ext[0].Type = MemExtendedParameterAttributeFlags; + ext[0].ULong = 0; + ext[1].Type = MemExtendedParameterAttributeFlags; + ext[1].ULong = 0; + size = 0x10000; + addr1 = NULL; + status = pNtAllocateVirtualMemoryEx( NtCurrentProcess(), &addr1, &size, MEM_RESERVE, + PAGE_EXECUTE_READWRITE, ext, 1 ); + ok(status == STATUS_SUCCESS, "Unexpected status %08lx.\n", status); + NtFreeVirtualMemory( NtCurrentProcess(), &addr1, &size, MEM_DECOMMIT ); + status = pNtAllocateVirtualMemoryEx( NtCurrentProcess(), &addr1, &size, MEM_RESERVE, + PAGE_EXECUTE_READWRITE, ext, 2 ); + ok(status == STATUS_INVALID_PARAMETER, "Unexpected status %08lx.\n", status); + + memset( ext, 0, sizeof(ext) ); + ext[0].Type = MemExtendedParameterAttributeFlags; + ext[0].ULong = MEM_EXTENDED_PARAMETER_EC_CODE; size = 0x10000; addr1 = NULL; status = pNtAllocateVirtualMemoryEx( NtCurrentProcess(), &addr1, &size, MEM_RESERVE, - PAGE_EXECUTE_READWRITE, &ext, 1 ); + PAGE_EXECUTE_READWRITE, ext, 1 ); #ifdef __x86_64__ if (pRtlGetNativeSystemInformation) { @@ -453,7 +468,7 @@ static void test_NtAllocateVirtualMemoryEx(void) if (pRtlIsEcCode) ok( !pRtlIsEcCode( addr1 ), "EC code %p\n", addr1 ); size = 0x1000; status = pNtAllocateVirtualMemoryEx( NtCurrentProcess(), &addr1, &size, MEM_COMMIT, - PAGE_EXECUTE_READWRITE, &ext, 1 ); + PAGE_EXECUTE_READWRITE, ext, 1 ); ok(status == STATUS_SUCCESS, "Unexpected status %08lx.\n", status); if (pRtlIsEcCode) { @@ -474,9 +489,9 @@ static void test_NtAllocateVirtualMemoryEx(void) if (pRtlIsEcCode) ok( pRtlIsEcCode( addr1 ), "not EC code %p\n", addr1 ); size = 0x2000; - ext.ULong = 0; + ext[0].ULong = 0; status = pNtAllocateVirtualMemoryEx( NtCurrentProcess(), &addr1, &size, MEM_COMMIT, - PAGE_EXECUTE_READWRITE, &ext, 1 ); + PAGE_EXECUTE_READWRITE, ext, 1 ); ok(status == STATUS_SUCCESS, "Unexpected status %08lx.\n", status); if (pRtlIsEcCode) { @@ -1607,6 +1622,47 @@ static void test_NtMapViewOfSectionEx(void) CloseHandle(file); DeleteFileA(testfile); + file = CreateFileA( "c:\\windows\\system32\\version.dll", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0 ); + ok( file != INVALID_HANDLE_VALUE, "Failed to open version.dll\n" ); + mapping = CreateFileMappingA( file, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL ); + ok( mapping != 0, "CreateFileMapping failed\n" ); + + memset(&ext, 0, sizeof(ext)); + ext[0].Type = MemExtendedParameterImageMachine; + ext[0].ULong = 0; + ptr = NULL; + size = 0; + status = pNtMapViewOfSectionEx( mapping, process, &ptr, &offset, &size, 0, PAGE_READONLY, ext, 1 ); + if (status != STATUS_INVALID_PARAMETER) + { + ok(status == STATUS_SUCCESS || status == STATUS_IMAGE_NOT_AT_BASE, "NtMapViewOfSection returned %08lx\n", status); + NtUnmapViewOfSection(process, ptr); + + ext[1].Type = MemExtendedParameterImageMachine; + ext[1].ULong = 0; + ptr = NULL; + size = 0; + status = pNtMapViewOfSectionEx( mapping, process, &ptr, &offset, &size, 0, PAGE_READONLY, ext, 2 ); + ok(status == STATUS_INVALID_PARAMETER, "NtMapViewOfSection returned %08lx\n", status); + + ext[0].ULong = IMAGE_FILE_MACHINE_R3000; + ext[1].ULong = IMAGE_FILE_MACHINE_R4000; + ptr = NULL; + size = 0; + status = pNtMapViewOfSectionEx( mapping, process, &ptr, &offset, &size, 0, PAGE_READONLY, ext, 2 ); + ok(status == STATUS_INVALID_PARAMETER, "NtMapViewOfSection returned %08lx\n", status); + + ptr = NULL; + size = 0; + status = pNtMapViewOfSectionEx( mapping, process, &ptr, &offset, &size, 0, PAGE_READONLY, ext, 1 ); + todo_wine + ok(status == STATUS_NOT_SUPPORTED, "NtMapViewOfSection returned %08lx\n", status); + } + else win_skip( "MemExtendedParameterImageMachine not supported\n" ); + + NtClose(mapping); + CloseHandle(file); + TerminateProcess(process, 0); CloseHandle(process); } diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index b33b45ad07f..2255061ec75 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -4152,18 +4152,21 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z static NTSTATUS get_extended_params( const MEM_EXTENDED_PARAMETER *parameters, ULONG count, ULONG_PTR *limit, ULONG_PTR *align, ULONG *attributes ) { - MEM_ADDRESS_REQUIREMENTS *r = NULL; - ULONG i; + ULONG i, present = 0; if (count && !parameters) return STATUS_INVALID_PARAMETER; for (i = 0; i < count; ++i) { + if (parameters[i].Type >= 32) return STATUS_INVALID_PARAMETER; + if (present & (1u << parameters[i].Type)) return STATUS_INVALID_PARAMETER; + present |= 1u << parameters[i].Type; + switch (parameters[i].Type) { case MemExtendedParameterAddressRequirements: - if (r) return STATUS_INVALID_PARAMETER; - r = parameters[i].Pointer; + { + MEM_ADDRESS_REQUIREMENTS *r = parameters[i].Pointer; if (r->LowestStartingAddress) FIXME( "Not supported requirements LowestStartingAddress %p, Alignment %p.\n", @@ -4188,6 +4191,7 @@ static NTSTATUS get_extended_params( const MEM_EXTENDED_PARAMETER *parameters, U } } break; + } case MemExtendedParameterAttributeFlags: *attributes = parameters[i].ULong;
1
0
0
0
Piotr Caban : wineps: Fix download font escapement.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: d225fb8e715c2adf66ff7a3094a737ea1fceaa88 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d225fb8e715c2adf66ff7a3094a737…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 22 21:06:25 2023 +0200 wineps: Fix download font escapement. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54956
--- dlls/wineps.drv/download.c | 8 +++----- dlls/wineps.drv/psdrv.h | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c index 80cf4a0c13f..2197a96027a 100644 --- a/dlls/wineps.drv/download.c +++ b/dlls/wineps.drv/download.c @@ -258,7 +258,6 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical) LOGFONTW lf; UINT ppem; XFORM xform; - INT escapement; assert(ctx->font.fontloc == Download); @@ -281,7 +280,7 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical) if(GetGraphicsMode(ctx->hdc) == GM_COMPATIBLE) { - if (xform.eM22 < 0) ctx->font.escapement = -ctx->font.escapement; + if (xform.eM22 < 0) lf.lfEscapement = -lf.lfEscapement; xform.eM11 = xform.eM22 = fabs(xform.eM22); xform.eM21 = xform.eM12 = 0; } @@ -327,11 +326,10 @@ BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical) } } - escapement = ctx->font.escapement; if (vertical) - escapement += 900; + lf.lfEscapement += 900; - PSDRV_WriteSetFont(ctx, ps_name, ctx->font.size, escapement, + PSDRV_WriteSetFont(ctx, ps_name, ctx->font.size, lf.lfEscapement, is_fake_italic( ctx->hdc )); HeapFree(GetProcessHeap(), 0, ps_name); diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 09b3a57b76c..6173bdfc413 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -289,9 +289,6 @@ typedef struct { matrix size; PSCOLOR color; enum fontset set; /* Have we done a setfont yet */ - - /* These are needed by PSDRV_ExtTextOut */ - int escapement; } PSFONT; typedef struct {
1
0
0
0
Piotr Caban : wineps: Mark font as unset in PSDRV_SelectFont.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 189606e4bf947b3482a7b55f6970b690ceb891f1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/189606e4bf947b3482a7b55f6970b6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 22 21:04:42 2023 +0200 wineps: Mark font as unset in PSDRV_SelectFont. --- dlls/wineps.drv/font.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wineps.drv/font.c b/dlls/wineps.drv/font.c index 74171c09530..563f34afac8 100644 --- a/dlls/wineps.drv/font.c +++ b/dlls/wineps.drv/font.c @@ -41,6 +41,8 @@ HFONT CDECL PSDRV_SelectFont( print_ctx *ctx, HFONT hfont, UINT *aa_flags ) { struct font_info font_info; + ctx->font.set = UNSET; + if (ExtEscape(ctx->hdc, PSDRV_GET_BUILTIN_FONT_INFO, 0, NULL, sizeof(font_info), (char *)&font_info)) {
1
0
0
0
Piotr Caban : wineps: Remove no longer used PSDRV_SelectDownloadFont helper.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: fe111269016a083125dc805063b1db4e6a0ffe7a URL:
https://gitlab.winehq.org/wine/wine/-/commit/fe111269016a083125dc805063b1db…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 22 19:23:35 2023 +0200 wineps: Remove no longer used PSDRV_SelectDownloadFont helper. --- dlls/wineps.drv/download.c | 13 ------------- dlls/wineps.drv/psdrv.h | 1 - 2 files changed, 14 deletions(-) diff --git a/dlls/wineps.drv/download.c b/dlls/wineps.drv/download.c index 89dd56d5b38..80cf4a0c13f 100644 --- a/dlls/wineps.drv/download.c +++ b/dlls/wineps.drv/download.c @@ -190,19 +190,6 @@ static UINT get_bbox(HDC hdc, RECT *rc) return GET_BE_WORD(head + 18); /* unitsPerEm */ } -/**************************************************************************** - * PSDRV_SelectDownloadFont - * - * Set up ctx->font for a downloadable font - * - */ -BOOL PSDRV_SelectDownloadFont(print_ctx *ctx) -{ - ctx->font.fontloc = Download; - ctx->font.fontinfo.Download = NULL; - return TRUE; -} - static UINT calc_ppem_for_height(HDC hdc, LONG height) { BYTE os2[78]; /* size of version 0 table */ diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 389c6a5b562..09b3a57b76c 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -491,7 +491,6 @@ SHORT PSDRV_CalcAvgCharWidth(const AFM *afm) DECLSPEC_HIDDEN; extern BOOL PSDRV_WriteSetBuiltinFont(print_ctx *ctx) DECLSPEC_HIDDEN; extern BOOL PSDRV_WriteBuiltinGlyphShow(print_ctx *ctx, LPCWSTR str, INT count) DECLSPEC_HIDDEN; -extern BOOL PSDRV_SelectDownloadFont(print_ctx *ctx) DECLSPEC_HIDDEN; extern BOOL PSDRV_WriteSetDownloadFont(print_ctx *ctx, BOOL vertical) DECLSPEC_HIDDEN; extern BOOL PSDRV_WriteDownloadGlyphShow(print_ctx *ctx, const WORD *glyphs, UINT count) DECLSPEC_HIDDEN; extern BOOL PSDRV_EmptyDownloadList(print_ctx *ctx, BOOL write_undef) DECLSPEC_HIDDEN;
1
0
0
0
Piotr Caban : gdi32: Abort printing if DeleteDC is called before EndDoc.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 0e976ca5444c699517f3ad7e84c7e0468b4adcbc URL:
https://gitlab.winehq.org/wine/wine/-/commit/0e976ca5444c699517f3ad7e84c7e0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 22 18:52:26 2023 +0200 gdi32: Abort printing if DeleteDC is called before EndDoc. --- dlls/gdi32/dc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index e7f2d8526d1..5ae7cc653d1 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -479,7 +479,12 @@ BOOL WINAPI DeleteDC( HDC hdc ) if (is_meta_dc( hdc )) return METADC_DeleteDC( hdc ); if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; - if (dc_attr->print) delete_print_dc( dc_attr ); + if (dc_attr->print) + { + if (dc_attr->emf) + AbortDoc( hdc ); + delete_print_dc( dc_attr ); + } if (dc_attr->emf) EMFDC_DeleteDC( dc_attr ); return NtGdiDeleteObjectApp( hdc ); }
1
0
0
0
Piotr Caban : winspool: Add AbortPrinter implementation.
by Alexandre Julliard
23 May '23
23 May '23
Module: wine Branch: master Commit: 083946dbf41f06618db508e510c790de5385ae2e URL:
https://gitlab.winehq.org/wine/wine/-/commit/083946dbf41f06618db508e510c790…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon May 22 18:56:28 2023 +0200 winspool: Add AbortPrinter implementation. --- dlls/winspool.drv/info.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 3c513f1c0e8..30df3199f40 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -6029,10 +6029,13 @@ DWORD WINAPI EnumPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName, /****************************************************************************** * AbortPrinter (WINSPOOL.@) */ -BOOL WINAPI AbortPrinter( HANDLE hPrinter ) +BOOL WINAPI AbortPrinter(HANDLE printer) { - FIXME("(%p), stub!\n", hPrinter); - return TRUE; + HANDLE handle = get_backend_handle(printer); + + TRACE("(%p)\n", printer); + + return backend->fpAbortPrinter(handle); } /******************************************************************************
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
78
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
Results per page:
10
25
50
100
200