Fixed loading of 16 bit drivers.
Better support for native mappers.
This commit is contained in:
parent
fe9a0f0977
commit
40e9217523
|
@ -2311,9 +2311,7 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT num,
|
||||||
TRACE("DRVM_ENABLE => %08lx\n", ret);
|
TRACE("DRVM_ENABLE => %08lx\n", ret);
|
||||||
#endif
|
#endif
|
||||||
count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L);
|
count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L);
|
||||||
}
|
} else if (!lpDrv->bIs32 && part->u.fnMessage16) {
|
||||||
|
|
||||||
if (!lpDrv->bIs32 && part->u.fnMessage16) {
|
|
||||||
ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
|
ret = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
|
||||||
0, DRVM_INIT, 0L, 0L, 0L);
|
0, DRVM_INIT, 0L, 0L, 0L);
|
||||||
TRACE("DRVM_INIT => %08lx\n", ret);
|
TRACE("DRVM_INIT => %08lx\n", ret);
|
||||||
|
@ -2324,14 +2322,15 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT num,
|
||||||
#endif
|
#endif
|
||||||
count = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
|
count = MMDRV_CallTo16_word_wwlll((FARPROC16)part->u.fnMessage16,
|
||||||
0, wMsg, 0L, 0L, 0L);
|
0, wMsg, 0L, 0L, 0L);
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Got %u dev for (%s:%s)\n", count, lpDrv->name, llTypes[type].name);
|
TRACE("Got %u dev for (%s:%s)\n", count, lpDrv->name, llTypes[type].name);
|
||||||
if (count == 0)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* got some drivers */
|
/* got some drivers */
|
||||||
if (lpDrv->bIsMapper) {
|
if (lpDrv->bIsMapper) {
|
||||||
|
/* it seems native mappers return 0 devices :-( */
|
||||||
if (llTypes[type].nMapper != -1)
|
if (llTypes[type].nMapper != -1)
|
||||||
ERR("Two mappers for type %s (%d, %s)\n",
|
ERR("Two mappers for type %s (%d, %s)\n",
|
||||||
llTypes[type].name, llTypes[type].nMapper, lpDrv->name);
|
llTypes[type].name, llTypes[type].nMapper, lpDrv->name);
|
||||||
|
@ -2339,6 +2338,8 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT num,
|
||||||
ERR("Strange: mapper with %d > 1 devices\n", count);
|
ERR("Strange: mapper with %d > 1 devices\n", count);
|
||||||
llTypes[type].nMapper = num;
|
llTypes[type].nMapper = num;
|
||||||
} else {
|
} else {
|
||||||
|
if (count == 0)
|
||||||
|
return FALSE;
|
||||||
part->nIDMin = llTypes[type].wMaxId;
|
part->nIDMin = llTypes[type].wMaxId;
|
||||||
llTypes[type].wMaxId += count;
|
llTypes[type].wMaxId += count;
|
||||||
part->nIDMax = llTypes[type].wMaxId;
|
part->nIDMax = llTypes[type].wMaxId;
|
||||||
|
@ -2433,7 +2434,9 @@ static BOOL MMDRV_Install(LPCSTR name, int num, BOOL bIsMapper)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (d->d.d16.hDriver16) {
|
if (d->d.d16.hDriver16) {
|
||||||
#define A(_x,_y) AA(d->d.d16.hDriver16,_x,_y,16,GetProcAddress16)
|
HMODULE16 hMod16 = GetDriverModuleHandle16(d->d.d16.hDriver16);
|
||||||
|
|
||||||
|
#define A(_x,_y) AA(hMod16,_x,_y,16,GetProcAddress16)
|
||||||
A(MMDRV_AUX, auxMessage);
|
A(MMDRV_AUX, auxMessage);
|
||||||
A(MMDRV_MIXER, mixMessage);
|
A(MMDRV_MIXER, mixMessage);
|
||||||
A(MMDRV_MIDIIN, midMessage);
|
A(MMDRV_MIDIIN, midMessage);
|
||||||
|
|
Loading…
Reference in New Issue