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 2022
----- 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
907 discussions
Start a n
N
ew thread
Rémi Bernon : ntdll: Introduce new helper to update block flags and size.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: b4655f24577b38893abbedcd846d0cd35d6684d0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b4655f24577b38893abbedcd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat May 21 08:26:40 2022 +0200 ntdll: Introduce new helper to update block flags and size. And use them in shrink_used_block to set the block sizes. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/ntdll/heap.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 7e21593cd56..a22f5ec7f1e 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -253,6 +253,13 @@ static inline UINT block_get_size( const struct block *block ) return size; } +static inline void block_set_size( struct block *block, UINT flags, UINT block_size ) +{ + if (flags & ARENA_FLAG_FREE) block_size -= sizeof(struct entry); + else block_size -= sizeof(*block); + block->size = (block_size & ARENA_SIZE_MASK) | (flags & ~ARENA_SIZE_MASK); +} + static inline void *subheap_base( const SUBHEAP *subheap ) { return subheap->base; @@ -793,18 +800,19 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena ) } -static void shrink_used_block( SUBHEAP *subheap, struct block *block, SIZE_T data_size, SIZE_T size ) +static inline void shrink_used_block( SUBHEAP *subheap, struct block *block, UINT flags, + SIZE_T old_data_size, SIZE_T data_size, SIZE_T size ) { - SIZE_T old_data_size = block_get_size( block ) - sizeof(*block); if (old_data_size >= data_size + HEAP_MIN_SHRINK_SIZE) { - block->size = data_size | block_get_flags( block ); + block_set_size( block, flags, data_size + sizeof(*block) ); block->unused_bytes = data_size - size; create_free_block( subheap, next_block( subheap, block ), old_data_size - data_size ); } else { struct block *next; + block_set_size( block, flags, old_data_size + sizeof(*block) ); block->unused_bytes = old_data_size - size; if ((next = next_block( subheap, block ))) next->size &= ~ARENA_FLAG_PREV_FREE; } @@ -1521,8 +1529,8 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap ) static NTSTATUS heap_allocate( HEAP *heap, ULONG flags, SIZE_T size, void **ret ) { + SIZE_T old_data_size, data_size; struct block *block; - SIZE_T data_size; SUBHEAP *subheap; data_size = ROUND_SIZE(size) + HEAP_TAIL_EXTRA_SIZE(flags); @@ -1538,15 +1546,11 @@ static NTSTATUS heap_allocate( HEAP *heap, ULONG flags, SIZE_T size, void **ret /* Locate a suitable free block */ if (!(block = find_free_block( heap, data_size, &subheap ))) return STATUS_NO_MEMORY; + /* read the free block size, changing block type or flags may alter it */ + old_data_size = block_get_size( block ) - sizeof(*block); - /* in-use arena is smaller than free arena, - * so we have to add the difference to the size */ - block->size = (block->size & ~ARENA_FLAG_FREE) + sizeof(struct entry) - sizeof(*block); block_set_type( block, ARENA_INUSE_MAGIC ); - - /* Shrink the block */ - - shrink_used_block( subheap, block, data_size, size ); + shrink_used_block( subheap, block, 0, old_data_size, data_size, size ); notify_alloc( block + 1, size, flags & HEAP_ZERO_MEMORY ); initialize_block( block + 1, size, block->unused_bytes, flags ); @@ -1649,10 +1653,10 @@ static NTSTATUS heap_reallocate( HEAP *heap, ULONG flags, void *ptr, SIZE_T size /* The next block is free and large enough */ struct entry *entry = (struct entry *)next; list_remove( &entry->entry ); - block->size += block_get_size( next ); + old_data_size += block_get_size( next ); if (!HEAP_Commit( subheap, block, data_size )) return STATUS_NO_MEMORY; notify_realloc( block + 1, old_size, size ); - shrink_used_block( subheap, block, data_size, size ); + shrink_used_block( subheap, block, block_get_flags( block ), old_data_size, data_size, size ); } else { @@ -1668,7 +1672,7 @@ static NTSTATUS heap_reallocate( HEAP *heap, ULONG flags, void *ptr, SIZE_T size else { notify_realloc( block + 1, old_size, size ); - shrink_used_block( subheap, block, data_size, size ); + shrink_used_block( subheap, block, block_get_flags( block ), old_data_size, data_size, size ); } /* Clear the extra bytes if needed */
1
0
0
0
Rémi Bernon : ntdll: Introduce new helper to update block type.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 8c8e1638c95f3f519359009e4a5b0e3df2cc894e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c8e1638c95f3f519359009e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed May 4 10:53:44 2022 +0200 ntdll: Introduce new helper to update block type. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/ntdll/heap.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 0983dc9d2b4..7e21593cd56 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -231,6 +231,12 @@ static inline UINT block_get_type( const struct block *block ) return block->magic; } +static inline void block_set_type( struct block *block, UINT type ) +{ + if (type >> 24) block->unused_bytes = type >> 24; + block->magic = type; +} + static inline UINT block_get_overhead( const struct block *block ) { if (block_get_flags( block ) & ARENA_FLAG_FREE) return sizeof(struct entry); @@ -685,7 +691,7 @@ static void create_free_block( SUBHEAP *subheap, struct block *block, SIZE_T blo BOOL last; mark_block_uninitialized( block, sizeof(*entry) ); - entry->magic = ARENA_FREE_MAGIC; + block_set_type( block, ARENA_FREE_MAGIC ); /* If debugging, erase the freed block content */ @@ -737,7 +743,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena ) ARENA_INUSE *prev = heap->pending_free[heap->pending_pos]; heap->pending_free[heap->pending_pos] = pArena; heap->pending_pos = (heap->pending_pos + 1) % MAX_FREE_PENDING; - pArena->magic = ARENA_PENDING_MAGIC; + block_set_type( pArena, ARENA_PENDING_MAGIC ); mark_block_free( pArena + 1, pArena->size & ARENA_SIZE_MASK, heap->flags ); if (!prev) return; pArena = prev; @@ -1536,7 +1542,7 @@ static NTSTATUS heap_allocate( HEAP *heap, ULONG flags, SIZE_T size, void **ret /* in-use arena is smaller than free arena, * so we have to add the difference to the size */ block->size = (block->size & ~ARENA_FLAG_FREE) + sizeof(struct entry) - sizeof(*block); - block->magic = ARENA_INUSE_MAGIC; + block_set_type( block, ARENA_INUSE_MAGIC ); /* Shrink the block */
1
0
0
0
Rémi Bernon : ntdll: Cleanup and rename HEAP_CreateFreeBlock to create_free_block.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 2db2c94d127e9f8879642484138270872ab35deb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2db2c94d127e9f8879642484…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat May 21 08:34:14 2022 +0200 ntdll: Cleanup and rename HEAP_CreateFreeBlock to create_free_block. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/ntdll/heap.c | 70 +++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 302e6cc75ee..0983dc9d2b4 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -676,58 +676,47 @@ static inline BOOL HEAP_Decommit( SUBHEAP *subheap, void *ptr ) } -/*********************************************************************** - * HEAP_CreateFreeBlock - * - * Create a free block at a specified address. 'size' is the size of the - * whole block, including the new arena. - */ -static void HEAP_CreateFreeBlock( SUBHEAP *subheap, void *ptr, SIZE_T size ) +static void create_free_block( SUBHEAP *subheap, struct block *block, SIZE_T block_size ) { - ARENA_FREE *pFree; - char *pEnd; + struct entry *entry = (struct entry *)block; + HEAP *heap = subheap->heap; + DWORD flags = heap->flags; + char *end; BOOL last; - DWORD flags = subheap->heap->flags; - /* Create a free arena */ - mark_block_uninitialized( ptr, sizeof(ARENA_FREE) ); - pFree = ptr; - pFree->magic = ARENA_FREE_MAGIC; + mark_block_uninitialized( block, sizeof(*entry) ); + entry->magic = ARENA_FREE_MAGIC; /* If debugging, erase the freed block content */ - pEnd = (char *)ptr + size; - if (pEnd > (char *)subheap->base + subheap->commitSize) - pEnd = (char *)subheap->base + subheap->commitSize; - if (pEnd > (char *)(pFree + 1)) mark_block_free( pFree + 1, pEnd - (char *)(pFree + 1), flags ); + end = (char *)block + block_size; + if (end > (char *)subheap->base + subheap->commitSize) + end = (char *)subheap->base + subheap->commitSize; + if (end > (char *)(entry + 1)) mark_block_free( entry + 1, end - (char *)(entry + 1), flags ); - /* Check if next block is free also */ - - if (((char *)ptr + size < (char *)subheap->base + subheap->size) && - (*(DWORD *)((char *)ptr + size) & ARENA_FLAG_FREE)) + if (((char *)block + block_size < (char *)subheap->base + subheap->size) && + (*(DWORD *)((char *)block + block_size) & ARENA_FLAG_FREE)) { - /* Remove the next arena from the free list */ - ARENA_FREE *pNext = (ARENA_FREE *)((char *)ptr + size); - list_remove( &pNext->entry ); - size += (pNext->size & ARENA_SIZE_MASK) + sizeof(*pNext); - mark_block_free( pNext, sizeof(ARENA_FREE), flags ); + /* merge with the next block if it is free */ + struct entry *next_entry = (struct entry *)((char *)block + block_size); + list_remove( &next_entry->entry ); + block_size += (next_entry->size & ARENA_SIZE_MASK) + sizeof(*next_entry); + mark_block_free( next_entry, sizeof(struct entry), flags ); } - /* Set the next block PREV_FREE flag and pointer */ - last = ((char *)ptr + size >= (char *)subheap->base + subheap->size); + last = ((char *)block + block_size >= (char *)subheap->base + subheap->size); if (!last) { - DWORD *pNext = (DWORD *)((char *)ptr + size); - *pNext |= ARENA_FLAG_PREV_FREE; - mark_block_initialized( (ARENA_FREE **)pNext - 1, sizeof( ARENA_FREE * ) ); - *((ARENA_FREE **)pNext - 1) = pFree; + /* set the next block PREV_FREE flag and back pointer */ + DWORD *next = (DWORD *)((char *)block + block_size); + *next |= ARENA_FLAG_PREV_FREE; + mark_block_initialized( (struct block **)next - 1, sizeof(struct block *) ); + *((struct block **)next - 1) = block; } - /* Last, insert the new block into the free list */ - - pFree->size = (size - sizeof(*pFree)) | ARENA_FLAG_FREE; - HEAP_InsertFreeBlock( subheap->heap, pFree, last ); + entry->size = (block_size - sizeof(*entry)) | ARENA_FLAG_FREE; + HEAP_InsertFreeBlock( subheap->heap, entry, last ); } @@ -769,7 +758,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena ) /* Create a free block */ - HEAP_CreateFreeBlock( subheap, pFree, size ); + create_free_block( subheap, (struct block *)pFree, size ); size = (pFree->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE); if ((char *)pFree + size < (char *)subheap->base + subheap->size) return; /* Not the last block, so nothing more to do */ @@ -805,7 +794,7 @@ static void shrink_used_block( SUBHEAP *subheap, struct block *block, SIZE_T dat { block->size = data_size | block_get_flags( block ); block->unused_bytes = data_size - size; - HEAP_CreateFreeBlock( subheap, next_block( subheap, block ), old_data_size - data_size ); + create_free_block( subheap, next_block( subheap, block ), old_data_size - data_size ); } else { @@ -1051,8 +1040,7 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, /* Create the first free block */ - HEAP_CreateFreeBlock( subheap, (LPBYTE)subheap->base + subheap->headerSize, - subheap->size - subheap->headerSize ); + create_free_block( subheap, first_block( subheap ), subheap->size - subheap->headerSize ); return subheap; }
1
0
0
0
Rémi Bernon : ntdll: Use block helpers in find_free_block.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 43ac858e2748d72c28021b9378cff3af36ae7d80 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=43ac858e2748d72c28021b93…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 3 19:55:36 2022 +0200 ntdll: Use block helpers in find_free_block. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/ntdll/heap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 658a8bc1ab0..302e6cc75ee 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1061,8 +1061,9 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, static struct block *find_free_block( HEAP *heap, SIZE_T data_size, SUBHEAP **subheap ) { struct list *ptr = &find_free_list( heap, data_size + sizeof(ARENA_INUSE), FALSE )->entry; - SIZE_T total_size, arena_size; struct entry *entry; + struct block *block; + SIZE_T total_size; /* Find a suitable free list, and in it find a block large enough */ @@ -1070,13 +1071,13 @@ static struct block *find_free_block( HEAP *heap, SIZE_T data_size, SUBHEAP **su { entry = LIST_ENTRY( ptr, struct entry, entry ); if (entry->size == (0 | ARENA_FLAG_FREE)) continue; - arena_size = (entry->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE) - sizeof(ARENA_INUSE); - if (arena_size >= data_size) + block = (struct block *)entry; + if (block_get_size( block ) - sizeof(*block) >= data_size) { - *subheap = find_subheap( heap, (struct block *)entry, FALSE ); - if (!HEAP_Commit( *subheap, (struct block *)entry, data_size )) return NULL; + *subheap = find_subheap( heap, block, FALSE ); + if (!HEAP_Commit( *subheap, block, data_size )) return NULL; list_remove( &entry->entry ); - return (struct block *)entry; + return block; } }
1
0
0
0
Rémi Bernon : ntdll: Ignore free list headers in HEAP_FindFreeBlock.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: a436cc6485a29beb7728528d005a6a30cd3934f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a436cc6485a29beb7728528d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 3 18:19:36 2022 +0200 ntdll: Ignore free list headers in HEAP_FindFreeBlock. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/ntdll/heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 96bb0d0c027..658a8bc1ab0 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1069,6 +1069,7 @@ static struct block *find_free_block( HEAP *heap, SIZE_T data_size, SUBHEAP **su while ((ptr = list_next( &heap->freeList[0].arena.entry, ptr ))) { entry = LIST_ENTRY( ptr, struct entry, entry ); + if (entry->size == (0 | ARENA_FLAG_FREE)) continue; arena_size = (entry->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE) - sizeof(ARENA_INUSE); if (arena_size >= data_size) {
1
0
0
0
André Zwing : mp3dmod: Avoid mpg123 functions with suffix.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 8d441659f7c7ae359e06a99e7abaae57792356a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d441659f7c7ae359e06a99e…
Author: André Zwing <nerv(a)dawncrow.de> Date: Sat May 21 17:53:07 2022 +0200 mp3dmod: Avoid mpg123 functions with suffix. Signed-off-by: André Zwing <nerv(a)dawncrow.de> --- dlls/mp3dmod/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mp3dmod/Makefile.in b/dlls/mp3dmod/Makefile.in index dabbb1dfeae..3ba343a4d34 100644 --- a/dlls/mp3dmod/Makefile.in +++ b/dlls/mp3dmod/Makefile.in @@ -1,6 +1,7 @@ MODULE = mp3dmod.dll IMPORTS = $(MPG123_PE_LIBS) dmoguids msdmo ole32 uuid wmcodecdspuuid kernelbase EXTRAINCL = $(MPG123_PE_CFLAGS) +EXTRADEFS = -DMPG123_NO_LARGENAME C_SRCS = \ mp3dmod.c
1
0
0
0
André Zwing : l3codeca.acm: Avoid mpg123 functions with suffix.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 75b70efdaa2d4baa064271098878b79f66df155f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=75b70efdaa2d4baa06427109…
Author: André Zwing <nerv(a)dawncrow.de> Date: Sat May 21 17:53:07 2022 +0200 l3codeca.acm: Avoid mpg123 functions with suffix. Signed-off-by: André Zwing <nerv(a)dawncrow.de> --- dlls/l3codeca.acm/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/l3codeca.acm/Makefile.in b/dlls/l3codeca.acm/Makefile.in index 451794b2624..31765766d4e 100644 --- a/dlls/l3codeca.acm/Makefile.in +++ b/dlls/l3codeca.acm/Makefile.in @@ -1,6 +1,7 @@ MODULE = l3codeca.acm IMPORTS = $(MPG123_PE_LIBS) winmm user32 kernelbase EXTRAINCL = $(MPG123_PE_CFLAGS) +EXTRADEFS = -DMPG123_NO_LARGENAME C_SRCS = \ mpegl3.c
1
0
0
0
Jacek Caban : winemac: Directly use win32u for user functions in window.c.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: a566df118fc4e2935cac8f3fd3df3fa764ec4a69 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a566df118fc4e2935cac8f3f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri May 20 21:29:29 2022 +0200 winemac: Directly use win32u for user functions in window.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/winemac.drv/macdrv.h | 26 ++++ dlls/winemac.drv/window.c | 362 ++++++++++++++++++++++++---------------------- 2 files changed, 214 insertions(+), 174 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a566df118fc4e2935cac…
1
0
0
0
Jacek Caban : winemac: Directly use win32u for user functions in opengl.c.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 46af1ada38e95a5adb77202c68f9992463f53908 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=46af1ada38e95a5adb77202c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri May 20 21:25:08 2022 +0200 winemac: Directly use win32u for user functions in opengl.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/winemac.drv/opengl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index bf7effa7aeb..3aa5c340e30 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -1330,7 +1330,7 @@ static int get_dc_pixel_format(HDC hdc) int format; HWND hwnd; - if ((hwnd = WindowFromDC(hdc))) + if ((hwnd = NtUserWindowFromDC(hdc))) { struct macdrv_win_data *data; @@ -1526,12 +1526,12 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset) { struct macdrv_win_data *data; const pixel_format *pf; - HWND hwnd = WindowFromDC(hdc); + HWND hwnd = NtUserWindowFromDC(hdc); BOOL ret = FALSE; TRACE("hdc %p format %d\n", hdc, fmt); - if (!hwnd || hwnd == GetDesktopWindow()) + if (!hwnd || hwnd == NtUserGetDesktopWindow()) { WARN("not a proper window DC %p/%p\n", hdc, hwnd); return FALSE; @@ -3485,7 +3485,7 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w return TRUE; } - if ((hwnd = WindowFromDC(draw_hdc))) + if ((hwnd = NtUserWindowFromDC(draw_hdc))) { if (!(data = get_win_data(hwnd))) { @@ -3555,7 +3555,7 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w context->read_pbuffer = NULL; if (read_hdc && read_hdc != draw_hdc) { - if ((hwnd = WindowFromDC(read_hdc))) + if ((hwnd = NtUserWindowFromDC(read_hdc))) { if ((data = get_win_data(hwnd))) { @@ -4543,7 +4543,7 @@ static BOOL WINAPI macdrv_wglSwapBuffers(HDC hdc) sync_context(context); } - if ((hwnd = WindowFromDC(hdc))) + if ((hwnd = NtUserWindowFromDC(hdc))) { struct macdrv_win_data *data;
1
0
0
0
Jacek Caban : winemac: Directly use win32u for user functions in mouse.c.
by Alexandre Julliard
23 May '22
23 May '22
Module: wine Branch: master Commit: 7b9fd8012f30da74ebe33e3863cc41480c640dc8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b9fd8012f30da74ebe33e38…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri May 20 21:19:32 2022 +0200 winemac: Directly use win32u for user functions in mouse.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/winemac.drv/macdrv.h | 7 +++++++ dlls/winemac.drv/mouse.c | 40 +++++++++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 5cde6667a46..29ad7216841 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -309,6 +309,13 @@ static inline HWND get_active_window(void) return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndActive : 0; } +static inline HWND get_capture(void) +{ + GUITHREADINFO info; + info.cbSize = sizeof(info); + return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndCapture : 0; +} + /* registry helpers */ extern HKEY open_hkcu_key( const char *name ) DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index e22cbe5e23f..52e978567de 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -131,7 +131,7 @@ static void send_mouse_input(HWND hwnd, macdrv_window cocoa_window, UINT flags, INPUT input; HWND top_level_hwnd; - top_level_hwnd = GetAncestor(hwnd, GA_ROOT); + top_level_hwnd = NtUserGetAncestor(hwnd, GA_ROOT); if ((flags & MOUSEEVENTF_MOVE) && (flags & MOUSEEVENTF_ABSOLUTE) && !drag && cocoa_window != macdrv_thread_data()->capture_window) @@ -500,7 +500,7 @@ static CFDictionaryRef create_cursor_frame(HDC hdc, const ICONINFOEXW *iinfo, HA CFDictionarySetValue(frame, CFSTR("hotSpot"), hot_spot_dict); CFRelease(hot_spot_dict); - if (GetCursorFrameInfo(icon, 0x0 /* unknown parameter */, istep, &delay_jiffies, &num_steps) != 0) + if (NtUserGetCursorFrameInfo(icon, istep, &delay_jiffies, &num_steps) != 0) duration = delay_jiffies / 60.0; /* convert jiffies (1/60s) to seconds */ else { @@ -554,7 +554,7 @@ static CFArrayRef create_color_cursor(HDC hdc, const ICONINFOEXW *iinfo, HANDLE TRACE("hdc %p iinfo %p icon %p width %d height %d\n", hdc, iinfo, icon, width, height); /* Retrieve the number of frames to render */ - if (!GetCursorFrameInfo(icon, 0x0 /* unknown parameter */, 0, &delay_jiffies, &nFrames)) + if (!NtUserGetCursorFrameInfo(icon, 0, &delay_jiffies, &nFrames)) { WARN("GetCursorFrameInfo failed\n"); return NULL; @@ -699,7 +699,7 @@ BOOL macdrv_GetCursorPos(LPPOINT pos) void macdrv_SetCapture(HWND hwnd, UINT flags) { struct macdrv_thread_data *thread_data = macdrv_thread_data(); - HWND top = GetAncestor(hwnd, GA_ROOT); + HWND top = NtUserGetAncestor(hwnd, GA_ROOT); macdrv_window cocoa_window = macdrv_get_cocoa_window(top, FALSE); TRACE("hwnd %p top %p/%p flags 0x%08x\n", hwnd, top, cocoa_window, flags); @@ -711,6 +711,28 @@ BOOL macdrv_GetCursorPos(LPPOINT pos) } +static BOOL get_icon_info(HICON handle, ICONINFOEXW *ret) +{ + UNICODE_STRING module, res_name; + ICONINFO info; + + module.Buffer = ret->szModName; + module.MaximumLength = sizeof(ret->szModName) - sizeof(WCHAR); + res_name.Buffer = ret->szResName; + res_name.MaximumLength = sizeof(ret->szResName) - sizeof(WCHAR); + if (!NtUserGetIconInfo(handle, &info, &module, &res_name, NULL, 0)) return FALSE; + ret->fIcon = info.fIcon; + ret->xHotspot = info.xHotspot; + ret->yHotspot = info.yHotspot; + ret->hbmColor = info.hbmColor; + ret->hbmMask = info.hbmMask; + ret->wResID = res_name.Length ? 0 : LOWORD(res_name.Buffer); + ret->szModName[module.Length] = 0; + ret->szResName[res_name.Length] = 0; + return TRUE; +} + + /*********************************************************************** * SetCursor (MACDRV.@) */ @@ -742,7 +764,7 @@ void macdrv_SetCursor(HCURSOR cursor) goto done; info.cbSize = sizeof(info); - if (!GetIconInfoExW(cursor, &info)) + if (!get_icon_info(cursor, &info)) { WARN("GetIconInfoExW failed\n"); return; @@ -919,16 +941,16 @@ void macdrv_mouse_scroll(HWND hwnd, const macdrv_event *event) void macdrv_release_capture(HWND hwnd, const macdrv_event *event) { struct macdrv_thread_data *thread_data = macdrv_thread_data(); - HWND capture = GetCapture(); - HWND capture_top = GetAncestor(capture, GA_ROOT); + HWND capture = get_capture(); + HWND capture_top = NtUserGetAncestor(capture, GA_ROOT); TRACE("win %p/%p thread_data->capture_window %p GetCapture() %p in %p\n", hwnd, event->window, thread_data->capture_window, capture, capture_top); if (event->window == thread_data->capture_window && hwnd == capture_top) { - ReleaseCapture(); - if (!PostMessageW(capture, WM_CANCELMODE, 0, 0)) + NtUserReleaseCapture(); + if (!NtUserPostMessage(capture, WM_CANCELMODE, 0, 0)) WARN("failed to post WM_CANCELMODE; error 0x%08x\n", GetLastError()); } }
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
91
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
Results per page:
10
25
50
100
200