Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Last active May 29, 2017 15:59
Show Gist options
  • Save olokobayusuf/e1e8c74231792373379285ba7a03b0f2 to your computer and use it in GitHub Desktop.
Save olokobayusuf/e1e8c74231792373379285ba7a03b0f2 to your computer and use it in GitHub Desktop.
Camera.Parameters params = camera.getParameters();
if (params.getMaxNumMeteringAreas() > 0 && params.getMaxNumFocusAreas() > 0) {
...
LogVerbose("Attempting to focus camera " + index + " at (" + Math.round(x * 100) / 100f + ", " + Math.round(y * 100) / 100f + ")");
} else {
...
LogError("Camera "+index+" does not support focus"); // Control only reaches here when the check above fails
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment