packages/wallpapers/Basic
Revision | 3bf77242d285e7fc7d39945c803e3728d9846c60 (tree) |
---|---|
Time | 2010-02-20 06:32:25 |
Author | Daniel Sandler <dsandler@goog...> |
Commiter | Android Git Automerger |
am 88fe1fb6: am 12290bd7: Fix coords of NeuralNetwork LW tap effects.
Merge commit '88fe1fb6cbaa5138c5beceb85cb5d4499b0403f5'
* commit '88fe1fb6cbaa5138c5beceb85cb5d4499b0403f5':
@@ -284,6 +284,7 @@ int main(int index) { | ||
284 | 284 | if (State->rotate) { |
285 | 285 | //matrixLoadRotate(matrix, 90.0f, 0.0f, 0.0f, 1.0f); |
286 | 286 | //matrixTranslate(matrix, 0.0f, -height, 1.0f); |
287 | + // XXX: HAX: do not slide display in landscape | |
287 | 288 | } else { |
288 | 289 | matrixTranslate(matrix, -(State->xOffset * width), 0, 0); |
289 | 290 | } |
@@ -105,7 +105,9 @@ class NexusRS extends RenderScriptScene { | ||
105 | 105 | |
106 | 106 | @Override |
107 | 107 | public void resize(int width, int height) { |
108 | - super.resize(width, height); | |
108 | + super.resize(width, height); // updates mWidth, mHeight | |
109 | + | |
110 | + // android.util.Log.d("NexusRS", String.format("resize(%d, %d)", width, height)); | |
109 | 111 | |
110 | 112 | mWorldState.width = width; |
111 | 113 | mWorldState.height = height; |
@@ -281,8 +283,15 @@ class NexusRS extends RenderScriptScene { | ||
281 | 283 | boolean resultRequested) { |
282 | 284 | |
283 | 285 | final int dw = mWorldState.width; |
284 | - final int bw = 960; | |
285 | - x = (int) (x + mWorldState.xOffset * (bw-dw)); | |
286 | + final int bw = 960; // XXX: hardcoded width of background texture | |
287 | + if (mWorldState.rotate == 0) { | |
288 | + // nexus.rs ignores the xOffset when rotated; we shall endeavor to do so as well | |
289 | + x = (int) (x + mWorldState.xOffset * (bw-dw)); | |
290 | + } | |
291 | + | |
292 | + // android.util.Log.d("NexusRS", String.format( | |
293 | + // "dw=%d, bw=%d, xOffset=%g, x=%d", | |
294 | + // dw, bw, mWorldState.xOffset, x)); | |
286 | 295 | |
287 | 296 | if ("android.wallpaper.tap".equals(action)) { |
288 | 297 | sendCommand(1, x, y); |