Adding in ye' old McHack until I can figure out what is actually booched with the macs copyarea. This lets the game play all happy like.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2950 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Eric Lundberg
2004-02-05 18:53:00 +00:00
parent 072606b23a
commit 596f55e315
@@ -1,5 +1,5 @@
//
// $Id: VirtualMediaPanel.java,v 1.23 2003/11/12 21:47:09 ray Exp $
// $Id: VirtualMediaPanel.java,v 1.24 2004/02/05 18:53:00 eric Exp $
package com.threerings.media;
@@ -322,6 +322,24 @@ public class VirtualMediaPanel extends MediaPanel
width - Math.abs(_dx),
height - Math.abs(_dy), -_dx, -_dy);
gfx.translate(_abounds.x, _abounds.y);
} else if (RunAnywhere.isMacOS()) {
try {
gfx.copyArea(cx, cy,
width - Math.abs(_dx),
height - Math.abs(_dy), -_dx, -_dy);
} catch (Exception e) {
// HACK when it throws an exception trying to do the
// copy area, just tag the are we were trying to copy
// to onto the end of the dirty rects array.
int length = dirty.length;
Rectangle[] ndirty = new Rectangle[length + 1];
System.arraycopy(dirty, 0, ndirty, 0, length);
ndirty[length] =new Rectangle(_vbounds.x + cx-_dx,
_vbounds.y + cy-_dy,
width - Math.abs(_dx),
height - Math.abs(_dy));
dirty = ndirty;
}
} else {
gfx.copyArea(cx, cy,
width - Math.abs(_dx),