Permalink
Browse files

Fix sample rate for reactos, #115

1 parent 4e287a4 commit f43ed236f7cd9e8db49c8448d1b0aa401a8cfb52 @copy committed Nov 28, 2016
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/ps2.js
View
@@ -394,6 +394,11 @@ PS2.prototype.port60_write = function(write_byte)
this.sample_rate = write_byte;
dbg_log("mouse sample rate: " + h(write_byte), LOG_PS2);
+ if(!this.sample_rate)
+ {
+ dbg_log("invalid sample rate, reset to 100", LOG_PS2);
+ this.sample_rate = 100;
+ }
this.mouse_irq();
}
else if(this.next_read_resolution)

0 comments on commit f43ed23

Please sign in to comment.