summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Linden <callum@lindenlab.com>2016-07-22 13:56:26 -0700
committerCallum Linden <callum@lindenlab.com>2016-07-22 13:56:26 -0700
commit989379b09b90347bb97fb4a24688002cf11c0aa7 (patch)
treeb1fbf3a73bb045db8d4a6ce4aab45ce1c8fdfe72
parent8cd9569cefdd7877859e87a67dd93d1962328e6d (diff)
More Y flip madness - 2D media on OS X is has flipped Y mouse coords but correct on 3D/MOAP - reluctantly adding per platform switch
-rw-r--r--indra/newview/llmediactrl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 9cf3249983..5fed925dda 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -907,7 +907,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
if(mMediaSource && mMediaSource->hasMedia())
{
+// on OS X (maybe Linux) and on 2D media like login/search, the coords are wrong.
+// they are fine on 3D media - so we flip (or is it unflip) them here for anything
+// except windows (Which appears to be correct on both counts)
+#if LL_WINDOWS
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
+#else
+ coords_opengl = ! mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
+#endif
}
x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]);