Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-wallpapers-MusicVisualization: コミット

packages/wallpapers/MusicVisualization


コミットメタ情報

リビジョンdafaf1432c6bd4cb1b5509ce2c21b76c83f20643 (tree)
日時2010-03-17 05:24:44
作者Marco Nelissen <marcone@goog...>
コミッターMarco Nelissen

ログメッセージ

Fix preview for music visualization wallpapers. Apparently 'xStep' is
now 0 for preview, whereas before it wasn't.

Change-Id: I57ed8009102feea6f9878ba558b7529e034a5293

変更サマリ

差分

--- a/src/com/android/musicvis/GenericWaveRS.java
+++ b/src/com/android/musicvis/GenericWaveRS.java
@@ -238,7 +238,8 @@ public class GenericWaveRS extends RenderScriptScene {
238238 if (xStep <= 0.0f) {
239239 xStep = xOffset / 2; // originator didn't set step size, assume we're halfway
240240 }
241- mWorldState.yRotation = (xOffset / xStep) * 180; // rotate 180 degrees per screen
241+ // rotate 180 degrees per screen
242+ mWorldState.yRotation = xStep == 0.f ? 0.f : (xOffset / xStep) * 180;
242243 mState.data(mWorldState);
243244 }
244245
--- a/src/com/android/musicvis/vis3/Visualization3RS.java
+++ b/src/com/android/musicvis/vis3/Visualization3RS.java
@@ -52,7 +52,8 @@ class Visualization3RS extends GenericWaveRS {
5252 if (xStep <= 0.0f) {
5353 xStep = xOffset / 2; // originator didn't set step size, assume we're halfway
5454 }
55- mWorldState.yRotation = (xOffset / xStep) * 360; // rotate 360 degrees per screen
55+ // rotate 360 degrees per screen
56+ mWorldState.yRotation = xStep == 0.f ? 0.f : (xOffset / xStep) * 360;
5657 mState.data(mWorldState);
5758 }
5859
旧リポジトリブラウザで表示