Permalink
Browse files

Cocoa Port: Correct the touch display location transformation for Ret…

…ina displays. (Regression from commit ce494a2. Fixes #42.)
  • Loading branch information...
rogerman committed Mar 2, 2017
1 parent 5e06fbc commit 1e96e738d216f40ed16e7f9997a4352213473306
Showing with 4 additions and 2 deletions.
  1. +4 −2 desmume/src/frontend/cocoa/ClientDisplayView.cpp
@@ -649,12 +649,14 @@ void ClientDisplayView::GetNDSPoint(const int inputID, const bool isInitialTouch
double y = clientY;
double w = this->_renderProperty.normalWidth;
double h = this->_renderProperty.normalHeight;
const double logicalClientWidth = this->_renderProperty.clientWidth / this->_scaleFactor;
const double logicalClientHeight = this->_renderProperty.clientHeight / this->_scaleFactor;
ClientDisplayView::ConvertNormalToTransformedBounds(1.0, this->_renderProperty.rotation, w, h);
const double s = ClientDisplayView::GetMaxScalarWithinBounds(w, h, this->_renderProperty.clientWidth, this->_renderProperty.clientHeight);
const double s = ClientDisplayView::GetMaxScalarWithinBounds(w, h, logicalClientWidth, logicalClientHeight);
ClientDisplayView::ConvertClientToNormalPoint(this->_renderProperty.normalWidth, this->_renderProperty.normalHeight,
this->_renderProperty.clientWidth, this->_renderProperty.clientHeight,
logicalClientWidth, logicalClientHeight,
s,
this->_renderProperty.rotation,
x, y);

0 comments on commit 1e96e73

Please sign in to comment.