Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4f85bad3
Commit
4f85bad3
authored
Feb 09, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Feb 09, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change fault handler 'addr' argument to LPCVOID.
parent
b7b20504
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
9 deletions
+46
-9
global.h
include/global.h
+3
-3
virtual.c
memory/virtual.c
+2
-2
dib.c
objects/dib.c
+41
-4
No files found.
include/global.h
View file @
4f85bad3
...
@@ -35,9 +35,9 @@ extern DWORD VIRTUAL_GetPageSize(void);
...
@@ -35,9 +35,9 @@ extern DWORD VIRTUAL_GetPageSize(void);
extern
DWORD
VIRTUAL_GetGranularity
(
void
);
extern
DWORD
VIRTUAL_GetGranularity
(
void
);
extern
LPVOID
VIRTUAL_MapFileW
(
LPCWSTR
name
);
extern
LPVOID
VIRTUAL_MapFileW
(
LPCWSTR
name
);
typedef
BOOL32
(
*
HANDLERPROC
)(
LPVOID
,
LPVOID
);
typedef
BOOL32
(
*
HANDLERPROC
)(
LPVOID
,
LP
C
VOID
);
extern
BOOL32
VIRTUAL_SetFaultHandler
(
LPVOID
addr
,
HANDLERPROC
proc
,
LPVOID
arg
);
extern
BOOL32
VIRTUAL_SetFaultHandler
(
LP
C
VOID
addr
,
HANDLERPROC
proc
,
LPVOID
arg
);
extern
BOOL32
VIRTUAL_HandleFault
(
LPVOID
addr
);
extern
BOOL32
VIRTUAL_HandleFault
(
LP
C
VOID
addr
);
/* memory/atom.c */
/* memory/atom.c */
extern
BOOL32
ATOM_Init
(
WORD
globalTableSel
);
extern
BOOL32
ATOM_Init
(
WORD
globalTableSel
);
...
...
memory/virtual.c
View file @
4f85bad3
...
@@ -504,7 +504,7 @@ DWORD VIRTUAL_GetGranularity(void)
...
@@ -504,7 +504,7 @@ DWORD VIRTUAL_GetGranularity(void)
/***********************************************************************
/***********************************************************************
* VIRTUAL_SetFaultHandler
* VIRTUAL_SetFaultHandler
*/
*/
BOOL32
VIRTUAL_SetFaultHandler
(
LPVOID
addr
,
HANDLERPROC
proc
,
LPVOID
arg
)
BOOL32
VIRTUAL_SetFaultHandler
(
LP
C
VOID
addr
,
HANDLERPROC
proc
,
LPVOID
arg
)
{
{
FILE_VIEW
*
view
;
FILE_VIEW
*
view
;
...
@@ -517,7 +517,7 @@ BOOL32 VIRTUAL_SetFaultHandler( LPVOID addr, HANDLERPROC proc, LPVOID arg )
...
@@ -517,7 +517,7 @@ BOOL32 VIRTUAL_SetFaultHandler( LPVOID addr, HANDLERPROC proc, LPVOID arg )
/***********************************************************************
/***********************************************************************
* VIRTUAL_HandleFault
* VIRTUAL_HandleFault
*/
*/
BOOL32
VIRTUAL_HandleFault
(
LPVOID
addr
)
BOOL32
VIRTUAL_HandleFault
(
LPCVOID
addr
)
{
{
FILE_VIEW
*
view
=
VIRTUAL_FindView
((
UINT32
)
addr
);
FILE_VIEW
*
view
=
VIRTUAL_FindView
((
UINT32
)
addr
);
...
...
objects/dib.c
View file @
4f85bad3
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include "callback.h"
#include "callback.h"
#include "palette.h"
#include "palette.h"
#include "global.h"
#include "global.h"
#include "selectors.h"
#include "debug.h"
#include "debug.h"
#include "local.h"
#include "local.h"
#include "xmalloc.h"
/* for XCREATEIMAGE macro */
#include "xmalloc.h"
/* for XCREATEIMAGE macro */
...
@@ -776,7 +777,7 @@ static void DIB_DoUpdateDIBSection( BITMAPOBJ *bmp, BOOL32 toDIB )
...
@@ -776,7 +777,7 @@ static void DIB_DoUpdateDIBSection( BITMAPOBJ *bmp, BOOL32 toDIB )
/***********************************************************************
/***********************************************************************
* DIB_FaultHandler
* DIB_FaultHandler
*/
*/
static
BOOL32
DIB_FaultHandler
(
LPVOID
res
,
LPVOID
addr
)
static
BOOL32
DIB_FaultHandler
(
LPVOID
res
,
LP
C
VOID
addr
)
{
{
BOOL32
handled
=
FALSE
;
BOOL32
handled
=
FALSE
;
BITMAPOBJ
*
bmp
;
BITMAPOBJ
*
bmp
;
...
@@ -906,17 +907,46 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
...
@@ -906,17 +907,46 @@ void DIB_UpdateDIBSection( DC *dc, BOOL32 toDIB )
* CreateDIBSection16 (GDI.489)
* CreateDIBSection16 (GDI.489)
*/
*/
HBITMAP16
WINAPI
CreateDIBSection16
(
HDC16
hdc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
HBITMAP16
WINAPI
CreateDIBSection16
(
HDC16
hdc
,
BITMAPINFO
*
bmi
,
UINT16
usage
,
LPVOID
*
*
bits
,
HANDLE32
section
,
SEGPTR
*
bits
,
HANDLE32
section
,
DWORD
offset
)
DWORD
offset
)
{
{
return
CreateDIBSection32
(
hdc
,
bmi
,
usage
,
bits
,
section
,
offset
);
HBITMAP32
res
=
CreateDIBSection32
(
hdc
,
bmi
,
usage
,
NULL
,
section
,
offset
);
if
(
res
)
{
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
res
,
BITMAP_MAGIC
);
if
(
bmp
&&
bmp
->
dib
)
{
DIBSECTION
*
dib
=
&
bmp
->
dib
->
dibSection
;
INT32
height
=
dib
->
dsBm
.
bmHeight
>=
0
?
dib
->
dsBm
.
bmHeight
:
-
dib
->
dsBm
.
bmHeight
;
INT32
size
=
dib
->
dsBmih
.
biSizeImage
?
dib
->
dsBmih
.
biSizeImage
:
dib
->
dsBm
.
bmWidthBytes
*
height
;
if
(
dib
->
dsBm
.
bmBits
)
{
bmp
->
dib
->
selector
=
SELECTOR_AllocBlock
(
dib
->
dsBm
.
bmBits
,
size
,
SEGMENT_DATA
,
FALSE
,
FALSE
);
}
printf
(
"ptr = %p, size =%d, selector = %04x, segptr = %ld
\n
"
,
dib
->
dsBm
.
bmBits
,
size
,
bmp
->
dib
->
selector
,
PTR_SEG_OFF_TO_SEGPTR
(
bmp
->
dib
->
selector
,
0
));
}
GDI_HEAP_UNLOCK
(
res
);
if
(
bits
)
*
bits
=
PTR_SEG_OFF_TO_SEGPTR
(
bmp
->
dib
->
selector
,
0
);
}
return
res
;
}
}
/***********************************************************************
/***********************************************************************
* CreateDIBSection32 (GDI32.36)
* CreateDIBSection32 (GDI32.36)
*/
*/
HBITMAP32
WINAPI
CreateDIBSection32
(
HDC32
hdc
,
BITMAPINFO
*
bmi
,
UINT32
usage
,
HBITMAP32
WINAPI
CreateDIBSection32
(
HDC32
hdc
,
BITMAPINFO
*
bmi
,
UINT32
usage
,
LPVOID
*
*
bits
,
HANDLE32
section
,
LPVOID
*
bits
,
HANDLE32
section
,
DWORD
offset
)
DWORD
offset
)
{
{
HBITMAP32
res
=
0
;
HBITMAP32
res
=
0
;
...
@@ -977,6 +1007,7 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
...
@@ -977,6 +1007,7 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
dib
->
dibSection
.
dsOffset
=
offset
;
dib
->
dibSection
.
dsOffset
=
offset
;
dib
->
status
=
DIB_NoHandler
;
dib
->
status
=
DIB_NoHandler
;
dib
->
selector
=
0
;
dib
->
nColorMap
=
nColorMap
;
dib
->
nColorMap
=
nColorMap
;
dib
->
colorMap
=
colorMap
;
dib
->
colorMap
=
colorMap
;
...
@@ -1061,6 +1092,12 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
...
@@ -1061,6 +1092,12 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
if
(
dib
->
colorMap
)
if
(
dib
->
colorMap
)
HeapFree
(
GetProcessHeap
(),
0
,
dib
->
colorMap
);
HeapFree
(
GetProcessHeap
(),
0
,
dib
->
colorMap
);
if
(
dib
->
selector
)
{
WORD
count
=
(
GET_SEL_LIMIT
(
dib
->
selector
)
>>
16
)
+
1
;
SELECTOR_FreeBlock
(
dib
->
selector
,
count
);
}
HeapFree
(
GetProcessHeap
(),
0
,
dib
);
HeapFree
(
GetProcessHeap
(),
0
,
dib
);
bmp
->
dib
=
NULL
;
bmp
->
dib
=
NULL
;
}
}
...
...
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