mirror of https://github.com/PCSX2/pcsx2.git
USB: fix singstar & tangling if/comments
This commit is contained in:
parent
3279cba559
commit
d2fa215aa9
|
@ -1186,7 +1186,6 @@ void ohci_frame_boundary(void* opaque)
|
||||||
/* if reset bit was set, don't process possibly invalid descriptors */
|
/* if reset bit was set, don't process possibly invalid descriptors */
|
||||||
/* TODO intr_status is interrupts that driver wants, so not quite right to us it here */
|
/* TODO intr_status is interrupts that driver wants, so not quite right to us it here */
|
||||||
bool hack = false; // ohci->intr_status & ohci->intr & OHCI_INTR_RHSC;
|
bool hack = false; // ohci->intr_status & ohci->intr & OHCI_INTR_RHSC;
|
||||||
if (hack)
|
|
||||||
|
|
||||||
/* Process all the lists at the end of the frame */
|
/* Process all the lists at the end of the frame */
|
||||||
if ((ohci->ctl & OHCI_CTL_PLE) && !hack)
|
if ((ohci->ctl & OHCI_CTL_PLE) && !hack)
|
||||||
|
|
|
@ -747,8 +747,6 @@ namespace usb_mic
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (padev->mInBuffer.capacity() < nbytes)
|
|
||||||
|
|
||||||
padev->mInBuffer.write((uint8_t*)padata, nbytes);
|
padev->mInBuffer.write((uint8_t*)padata, nbytes);
|
||||||
|
|
||||||
//if copy succeeded, drop samples at pulse's side
|
//if copy succeeded, drop samples at pulse's side
|
||||||
|
@ -783,14 +781,6 @@ namespace usb_mic
|
||||||
break; //TODO happens?
|
break; //TODO happens?
|
||||||
padev->mInBuffer.read<float>(samples);
|
padev->mInBuffer.read<float>(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
nbytes,
|
|
||||||
nbytes / sizeof(float) / padev->GetChannels(),
|
|
||||||
input_frames_used,
|
|
||||||
padev->mInBuffer.peek_read(),
|
|
||||||
output_frames_gen);*/
|
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lock(padev->mMutex);
|
std::lock_guard<std::mutex> lock(padev->mMutex);
|
||||||
|
|
||||||
size_t output_samples = output_frames_gen * padev->GetChannels();
|
size_t output_samples = output_frames_gen * padev->GetChannels();
|
||||||
|
|
|
@ -76,8 +76,6 @@ namespace usb_mic
|
||||||
LARGE_INTEGER currentTime;
|
LARGE_INTEGER currentTime;
|
||||||
QueryPerformanceCounter(¤tTime);
|
QueryPerformanceCounter(¤tTime);
|
||||||
|
|
||||||
if (currentTime.QuadPart < lastQPCTime)
|
|
||||||
|
|
||||||
lastQPCTime = currentTime.QuadPart;
|
lastQPCTime = currentTime.QuadPart;
|
||||||
|
|
||||||
double timeVal = double(currentTime.QuadPart);
|
double timeVal = double(currentTime.QuadPart);
|
||||||
|
|
|
@ -274,6 +274,7 @@ namespace usb_pad
|
||||||
ie.code = FF_AUTOCENTER;
|
ie.code = FF_AUTOCENTER;
|
||||||
ie.value = value * 0xFFFFUL / 100;
|
ie.value = value * 0xFFFFUL / 100;
|
||||||
|
|
||||||
|
write(mHandle, &ie, sizeof(ie));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvdevFF::SetGain(int gain /* between 0 and 100 */)
|
void EvdevFF::SetGain(int gain /* between 0 and 100 */)
|
||||||
|
@ -284,6 +285,7 @@ namespace usb_pad
|
||||||
ie.code = FF_GAIN;
|
ie.code = FF_GAIN;
|
||||||
ie.value = 0xFFFFUL * gain / 100;
|
ie.value = 0xFFFFUL * gain / 100;
|
||||||
|
|
||||||
|
write(mHandle, &ie, sizeof(ie));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace evdev
|
} // namespace evdev
|
||||||
|
|
Loading…
Reference in New Issue