Hi,
as DPSET_REMOTE is 0 we cannot check for it, like it's currently done in dplayx.c:
if( dwFlags & DPSET_REMOTE )
we have to use some other method. As DPSET_REMOTE and DPSET_LOCAL (which is 1) are mutually exclusive we could do:
if (!(dwFlags & DPSET_LOCAL)) { }
or
if (dwFlags & DPSET_LOCAL) { } else /* DPSET_REMOTE */ { }
The attached patch gets rid of the afore mentioned wrong checks.
Remember that because of the changes the code-path changes as well. We now get into places where we 'never' went before.
Patch is only compile tested and I changed some of the coding-style.
Any comment is welcome. (I'm learning).
Cheers,
Paul.