PC speaker: correct frequency in real mode

damn it
This commit is contained in:
tildearrow 2022-03-06 22:11:01 -05:00
parent 2f9d1e8c0f
commit 72c1116a89

View file

@ -122,7 +122,11 @@ void DivPlatformPCSpeaker::beepFreq(int freq) {
gettimeofday(&ie.time,NULL);
ie.type=EV_SND;
ie.code=SND_TONE;
ie.value=freq;
if (freq>0) {
ie.value=chipClock/freq;
} else {
ie.value=0;
}
if (write(beepFD,&ie,sizeof(struct input_event))<0) {
perror("error while writing frequency!");
} else {