Experiment (#9647): Prevent NaN values from getting into the UI system through TouchInput

This commit is contained in:
Henrik Rydgard 2017-05-04 00:30:04 +02:00
parent 6aca39722f
commit 7d89e5d84c

View file

@ -945,6 +945,10 @@ bool NativeIsAtTopLevel() {
bool NativeTouch(const TouchInput &touch) {
if (screenManager) {
// Brute force prevent NaNs from getting into the UI system
if (my_isnan(touch.x) || my_isnan(touch.y)) {
return false;
}
screenManager->touch(touch);
return true;
} else {