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
5e81d9a7
Commit
5e81d9a7
authored
Oct 29, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- finish mmio separation
- no longer storing function pointers in global IData
parent
02af550a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
21 deletions
+22
-21
mmio.c
dlls/winmm/mmio.c
+6
-9
mmsystem.c
dlls/winmm/mmsystem.c
+11
-11
winemm.h
dlls/winmm/winemm.h
+5
-1
No files found.
dlls/winmm/mmio.c
View file @
5e81d9a7
...
...
@@ -44,6 +44,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mmio
);
LRESULT
(
*
pFnMmioCallback16
)(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
)
/* = NULL */
;
/**************************************************************************
* mmioDosIOProc [internal]
*/
...
...
@@ -71,9 +73,7 @@ static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
}
/* if filename NULL, assume open file handle in adwInfo[0] */
if
(
!
szFileName
)
{
lpmmioinfo
->
adwInfo
[
0
]
=
DosFileHandleToWin32Handle
(
lpmmioinfo
->
adwInfo
[
0
]);
}
else
{
if
(
szFileName
)
{
OFSTRUCT
ofs
;
lpmmioinfo
->
adwInfo
[
0
]
=
(
DWORD
)
OpenFile
(
szFileName
,
&
ofs
,
lpmmioinfo
->
dwFlags
&
0xFFFF
);
}
...
...
@@ -352,9 +352,9 @@ static LRESULT send_message(struct IOProcList* ioProc, LPMMIOINFO mmioinfo,
switch
(
ioProc
->
type
)
{
case
MMIO_PROC_16
:
if
(
WINMM_IData
&&
WINMM_IData
->
pFnMmioCallback16
)
result
=
WINMM_IData
->
pFnMmioCallback16
((
SEGPTR
)
ioProc
->
pIOProc
,
mmioinfo
,
wMsg
,
lp1
,
lp2
);
if
(
pFnMmioCallback16
)
result
=
pFnMmioCallback16
((
SEGPTR
)
ioProc
->
pIOProc
,
mmioinfo
,
wMsg
,
lp1
,
lp2
);
break
;
case
MMIO_PROC_32A
:
case
MMIO_PROC_32W
:
...
...
@@ -579,9 +579,6 @@ static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
wm
->
info
.
pchBuffer
=
NULL
;
}
if
(
wm
->
ioProc
->
type
==
MMIO_PROC_16
)
wm
->
info
.
dwReserved1
=
MapLS
(
wm
->
info
.
pchBuffer
);
wm
->
info
.
cchBuffer
=
cchBuffer
;
wm
->
info
.
pchNext
=
wm
->
info
.
pchBuffer
;
wm
->
info
.
pchEndRead
=
wm
->
info
.
pchBuffer
;
...
...
dlls/winmm/mmsystem.c
View file @
5e81d9a7
...
...
@@ -49,9 +49,7 @@ extern LONG CALLBACK MMSYSTEM_CallTo16_long_l (FARPROC16,LONG);
extern
LONG
CALLBACK
MMSYSTEM_CallTo16_long_lwll
(
LPMMIOPROC16
,
LONG
,
WORD
,
LONG
,
LONG
);
/* ### stop build ### */
static
LRESULT
CALLBACK
mmioCallback16
(
SEGPTR
cb16
,
LPMMIOINFO
lpmmioinfo
,
UINT
uMessage
,
LPARAM
lParam1
,
LPARAM
lParam2
);
static
LRESULT
MMIO_Callback16
(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
/* ###################################################
* # LIBRARY #
...
...
@@ -85,10 +83,12 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
}
WINMM_IData
->
hWinMM16Instance
=
hinstDLL
;
WINMM_IData
->
h16Module32
=
hndl
;
WINMM_IData
->
pFnMmioCallback16
=
mmioCallback16
;
/* hook in our 16 bit function pointers */
pFnMmioCallback16
=
MMIO_Callback16
;
break
;
case
DLL_PROCESS_DETACH
:
FreeLibrary
(
WINMM_IData
->
h16Module32
);
pFnMmioCallback16
=
NULL
;
break
;
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_DETACH
:
...
...
@@ -2511,13 +2511,12 @@ static LRESULT MMIO_UnMap32To16(DWORD wMsg, LPARAM lParam1, LPARAM lParam2,
}
/******************************************************************
*
mmio
Callback16
*
MMIO_
Callback16
*
*
*/
static
LRESULT
CALLBACK
mmioCallback16
(
SEGPTR
cb16
,
LPMMIOINFO
lpmmioinfo
,
UINT
uMessage
,
LPARAM
lParam1
,
LPARAM
lParam2
)
static
LRESULT
MMIO_Callback16
(
SEGPTR
cb16
,
LPMMIOINFO
lpmmioinfo
,
UINT
uMessage
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
LRESULT
result
;
MMIOINFO16
mmioInfo16
;
...
...
@@ -2552,8 +2551,6 @@ static LRESULT CALLBACK mmioCallback16(SEGPTR cb16,
/******************************************************************
* MMIO_ResetSegmentedData
*
*
*
*/
static
LRESULT
MMIO_SetSegmentedBuffer
(
HMMIO
hmmio
,
SEGPTR
ptr
)
{
...
...
@@ -2583,7 +2580,10 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
mmioinfo
.
pIOProc
=
(
LPMMIOPROC
)
lpmmioinfo16
->
pIOProc
;
mmioinfo
.
cchBuffer
=
lpmmioinfo16
->
cchBuffer
;
mmioinfo
.
pchBuffer
=
MapSL
((
DWORD
)
lpmmioinfo16
->
pchBuffer
);
mmioinfo
.
adwInfo
[
0
]
=
lpmmioinfo16
->
adwInfo
[
0
];
mmioinfo
.
adwInfo
[
0
]
=
lpmmioinfo16
->
adwInfo
[
0
];
/* if we don't have a file name, it's likely a passed open file descriptor */
if
(
!
szFileName
)
mmioinfo
.
adwInfo
[
0
]
=
DosFileHandleToWin32Handle
(
mmioinfo
.
adwInfo
[
0
]);
mmioinfo
.
adwInfo
[
1
]
=
lpmmioinfo16
->
adwInfo
[
1
];
mmioinfo
.
adwInfo
[
2
]
=
lpmmioinfo16
->
adwInfo
[
2
];
mmioinfo
.
adwInfo
[
3
]
=
lpmmioinfo16
->
adwInfo
[
3
];
...
...
dlls/winmm/winemm.h
View file @
5e81d9a7
...
...
@@ -217,7 +217,6 @@ typedef struct tagWINE_MM_IDATA {
/* LPWINE_MIXER lpMixer; */
/* mmio part */
LPWINE_MMIO
lpMMIO
;
LRESULT
(
CALLBACK
*
pFnMmioCallback16
)(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
/* playsound and sndPlaySound */
WINE_PLAYSOUND
*
lpPlaySound
;
HANDLE
psLastEvent
;
...
...
@@ -341,6 +340,11 @@ BOOL MMDRV_GetDescription16(const char* fname, char* buf, int buflen);
/* Global variables */
extern
LPWINE_MM_IDATA
WINMM_IData
;
/* pointers to 16 bit functions (if sibling MMSYSTEM.DLL is loaded
* NULL otherwise
*/
extern
LRESULT
(
*
pFnMmioCallback16
)(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
/* HANDLE16 -> HANDLE conversions */
#define HDRVR_32(h16) ((HDRVR)(ULONG_PTR)(h16))
#define HMIDI_32(h16) ((HMIDI)(ULONG_PTR)(h16))
...
...
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