Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
757e7cb4
Commit
757e7cb4
authored
22 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replace SELECTOR_AllocBlock and SELECTOR_FreeBlock with standard Win16
selector calls.
parent
5de5a443
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
memory/selector.c
+3
-3
3 additions, 3 deletions
memory/selector.c
objects/bitmap.c
+8
-1
8 additions, 1 deletion
objects/bitmap.c
objects/dib.c
+11
-1
11 additions, 1 deletion
objects/dib.c
with
22 additions
and
5 deletions
memory/selector.c
+
3
−
3
View file @
757e7cb4
...
...
@@ -161,15 +161,15 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size, unsigne
WORD
i
,
count
;
wine_ldt_set_base
(
&
entry
,
base
);
wine_ldt_set_limit
(
&
entry
,
size
-
1
);
wine_ldt_set_flags
(
&
entry
,
flags
);
/* Make sure base and limit are not 0 together if the size is not 0 */
if
(
!
base
&&
size
==
1
)
wine_ldt_set_limit
(
&
entry
,
1
);
wine_ldt_set_limit
(
&
entry
,
(
!
base
&&
size
==
1
)
?
1
:
size
-
1
);
wine_ldt_set_flags
(
&
entry
,
flags
);
count
=
(
size
+
0xffff
)
/
0x10000
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
wine_ldt_set_entry
(
sel
+
(
i
<<
__AHSHIFT
),
&
entry
);
wine_ldt_set_base
(
&
entry
,
wine_ldt_get_base
(
&
entry
)
+
0x10000
);
/* yep, Windows sets limit like that, not 64K sel units */
wine_ldt_set_limit
(
&
entry
,
wine_ldt_get_limit
(
&
entry
)
-
0x10000
);
}
}
...
...
This diff is collapsed.
Click to expand it.
objects/bitmap.c
+
8
−
1
View file @
757e7cb4
...
...
@@ -443,7 +443,14 @@ BOOL BITMAP_DeleteObject( HBITMAP16 hbitmap, BITMAPOBJ * bmp )
}
HeapFree
(
GetProcessHeap
(),
0
,
dib
);
bmp
->
dib
=
NULL
;
if
(
bmp
->
segptr_bits
)
SELECTOR_FreeBlock
(
SELECTOROF
(
bmp
->
segptr_bits
)
);
if
(
bmp
->
segptr_bits
)
{
/* free its selector array */
WORD
sel
=
SELECTOROF
(
bmp
->
segptr_bits
);
WORD
count
=
(
GetSelectorLimit16
(
sel
)
/
0x10000
)
+
1
;
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
FreeSelector16
(
sel
+
(
i
<<
__AHSHIFT
));
}
}
return
GDI_FreeObject
(
hbitmap
,
bmp
);
}
...
...
This diff is collapsed.
Click to expand it.
objects/dib.c
+
11
−
1
View file @
757e7cb4
...
...
@@ -895,7 +895,17 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
INT
size
=
(
bi
->
biSizeImage
&&
bi
->
biCompression
!=
BI_RGB
)
?
bi
->
biSizeImage
:
width_bytes
*
height
;
WORD
sel
=
SELECTOR_AllocBlock
(
bits32
,
size
,
WINE_LDT_FLAGS_DATA
);
/* calculate number of sel's needed for size with 64K steps */
WORD
count
=
(
size
+
0xffff
)
/
0x10000
;
WORD
sel
=
AllocSelectorArray16
(
count
);
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
SetSelectorBase
(
sel
+
(
i
<<
__AHSHIFT
),
(
DWORD
)
bits32
+
i
*
0x10000
);
SetSelectorLimit16
(
sel
+
(
i
<<
__AHSHIFT
),
size
-
1
);
/* yep, limit is correct */
size
-=
0x10000
;
}
bmp
->
segptr_bits
=
MAKESEGPTR
(
sel
,
0
);
if
(
bits16
)
*
bits16
=
bmp
->
segptr_bits
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment