Skip to content

Commit

Permalink
Bug 808262- Otoro/unagi sometimes start up in landscape and can't be …
Browse files Browse the repository at this point in the history
…switched to portrait. The working theory is that, for some reason, we can not access the fb. If that happens, just abort and try again later. r=dhylands a=blocking-basecamp
  • Loading branch information
Doug Turner committed Dec 8, 2012
1 parent 373f5b5 commit 530943c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion widget/gonk/Framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Open()
bool
GetSize(nsIntSize *aScreenSize) {
// If the framebuffer has been opened, we should always have the size.
if (0 <= sFd || sScreenSize) {
if (sScreenSize) {
*aScreenSize = *sScreenSize;
return true;
}
Expand Down
6 changes: 4 additions & 2 deletions widget/gonk/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ nsWindow::nsWindow()
}

nsIntSize screenSize;
mozilla::DebugOnly<bool> gotFB = Framebuffer::GetSize(&screenSize);
MOZ_ASSERT(gotFB);
bool gotFB = Framebuffer::GetSize(&screenSize);
if (!gotFB) {
NS_RUNTIMEABORT("Failed to get size from framebuffer, aborting...");
}
gScreenBounds = nsIntRect(nsIntPoint(0, 0), screenSize);

char propValue[PROPERTY_VALUE_MAX];
Expand Down

0 comments on commit 530943c

Please sign in to comment.