Skip to content

Commit

Permalink
Backed out changeset 2e42ec46061e.
Browse files Browse the repository at this point in the history
This change isn't correct. See comments in Bugzilla #4183.
  • Loading branch information
icculus committed Jul 22, 2018
1 parent 1089944 commit 8f0cc4a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/video/x11/SDL_x11xinput2.c
Expand Up @@ -83,8 +83,16 @@ xinput2_normalize_touch_coordinates(SDL_VideoData *videodata, Window window,
for (i = 0; i < videodata->numwindows; i++) {
SDL_WindowData *d = videodata->windowlist[i];
if (d->xwindow == window) {
*out_x = in_x / d->window->w;
*out_y = in_y / d->window->h;
if (d->window->w == 1) {
*out_x = 0.5f;
} else {
*out_x = in_x / (d->window->w - 1);
}
if (d->window->h == 1) {
*out_y = 0.5f;
} else {
*out_y = in_y / (d->window->h - 1);
}
return;
}
}
Expand Down

0 comments on commit 8f0cc4a

Please sign in to comment.