Skip to content

Commit

Permalink
Merge pull request MoSync#317 from andersmalm/ThreeTwo
Browse files Browse the repository at this point in the history
Changed the CameraDemo since there is a difference in how camera formats...
  • Loading branch information
Anders Malm committed Dec 19, 2012
2 parents 11e1395 + 7b094e1 commit 3e7c1a4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions examples/cpp/CameraDemo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,19 @@ class AppScreen : public ButtonListener, public StackScreenListener
void setupCameraSize()
{
int numFormats = maCameraFormatNumber();
//Choose the smallest possible format.
mCameraFormat = numFormats-1;

// Choose the smallest possible format.
// Sometimes it's the first, sometimes the last
MA_CAMERA_FORMAT formatFirst;
maCameraFormat(0, &formatFirst);

MA_CAMERA_FORMAT formatLast;
maCameraFormat(numFormats-1, &formatLast);

if(formatFirst.height > formatLast.height)
mCameraFormat = numFormats-1;
else
mCameraFormat = 0;
}

/**
Expand Down

0 comments on commit 3e7c1a4

Please sign in to comment.