Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
757e7cb4
Commit
757e7cb4
authored
May 08, 2002
by
Andreas Mohr
Committed by
Alexandre Julliard
May 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace SELECTOR_AllocBlock and SELECTOR_FreeBlock with standard Win16
selector calls.
parent
5de5a443
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
selector.c
memory/selector.c
+3
-3
bitmap.c
objects/bitmap.c
+8
-1
dib.c
objects/dib.c
+11
-1
No files found.
memory/selector.c
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
);
}
}
...
...
objects/bitmap.c
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
);
}
...
...
objects/dib.c
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment