docs: Fixed typos in Game Controller training code snippets.

bug: 17959906

Change-Id: I2fa1b01704a69536b3d27fe6aa96c441d7f8fb27
This commit is contained in:
Quddus Chong
2015-01-16 11:35:07 -08:00
parent 8304b8b9ce
commit 03c15cf4c9

View File

@@ -518,7 +518,7 @@ public class GameView extends View {
// Check that the event came from a game controller
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) ==
InputDevice.SOURCE_JOYSTICK &&
event.getAction() == MotionEvent.ACTION_MOVE)
event.getAction() == MotionEvent.ACTION_MOVE) {
// Process all historical movement samples in the batch
final int historySize = event.getHistorySize();
@@ -609,9 +609,6 @@ private void processJoystickInput(MotionEvent event,
}
// Update the ship object based on the new x and y values
...
return true;
}
</pre>
<p>To support game controllers that have more sophisticated