Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-wallpapers-Basic: Commit

packages/wallpapers/Basic


Commit MetaInfo

Revision3bf77242d285e7fc7d39945c803e3728d9846c60 (tree)
Time2010-02-20 06:32:25
AuthorDaniel Sandler <dsandler@goog...>
CommiterAndroid Git Automerger

Log Message

am 88fe1fb6: am 12290bd7: Fix coords of NeuralNetwork LW tap effects.

Merge commit '88fe1fb6cbaa5138c5beceb85cb5d4499b0403f5'

* commit '88fe1fb6cbaa5138c5beceb85cb5d4499b0403f5':

Fix coords of NeuralNetwork LW tap effects.

Change Summary

Incremental Difference

--- a/res/raw/nexus.rs
+++ b/res/raw/nexus.rs
@@ -284,6 +284,7 @@ int main(int index) {
284284 if (State->rotate) {
285285 //matrixLoadRotate(matrix, 90.0f, 0.0f, 0.0f, 1.0f);
286286 //matrixTranslate(matrix, 0.0f, -height, 1.0f);
287+ // XXX: HAX: do not slide display in landscape
287288 } else {
288289 matrixTranslate(matrix, -(State->xOffset * width), 0, 0);
289290 }
--- a/src/com/android/wallpaper/nexus/NexusRS.java
+++ b/src/com/android/wallpaper/nexus/NexusRS.java
@@ -105,7 +105,9 @@ class NexusRS extends RenderScriptScene {
105105
106106 @Override
107107 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));
109111
110112 mWorldState.width = width;
111113 mWorldState.height = height;
@@ -281,8 +283,15 @@ class NexusRS extends RenderScriptScene {
281283 boolean resultRequested) {
282284
283285 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));
286295
287296 if ("android.wallpaper.tap".equals(action)) {
288297 sendCommand(1, x, y);
Show on old repository browser