Gravity: Show a preview
Also, we are safe to enable direct mode now.
This commit is contained in:
@@ -52,17 +52,13 @@ Gravity::StartConfig(BView* view)
|
|||||||
status_t
|
status_t
|
||||||
Gravity::StartSaver(BView* view, bool preview)
|
Gravity::StartSaver(BView* view, bool preview)
|
||||||
{
|
{
|
||||||
if (preview) {
|
|
||||||
fView = NULL;
|
|
||||||
return B_ERROR;
|
|
||||||
} else {
|
|
||||||
SetTickSize((1000 / 20) * 1000);
|
SetTickSize((1000 / 20) * 1000);
|
||||||
// ~20 FPS
|
// ~20 FPS
|
||||||
fView = new GravityView(this, view->Bounds());
|
fView = new GravityView(this, view->Bounds());
|
||||||
view->AddChild(fView);
|
view->AddChild(fView);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -77,9 +73,8 @@ void
|
|||||||
Gravity::DirectConnected(direct_buffer_info* info)
|
Gravity::DirectConnected(direct_buffer_info* info)
|
||||||
{
|
{
|
||||||
if (fView != NULL) {
|
if (fView != NULL) {
|
||||||
// TODO: Find out why I had to uncomment this.
|
fView->DirectConnected(info);
|
||||||
// view->DirectConnected(pdbiInfo);
|
fView->EnableDirectMode(true);
|
||||||
// view->EnableDirectMode(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user