From 3dd6b9cfa1154a9f2d0e40f4b93b01d6fb0123a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 7 May 2008 18:36:34 +0000 Subject: [PATCH] - remove hardcoded color - do not force bitmap size for ftp, in case the webcam doesn't give 320x240 it would mess up with memcpy. Maybe we'll want to give the option to either resize to QVGA or keep the native size someday. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25353 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/codycam/CodyCam.cpp | 4 +--- src/apps/codycam/VideoConsumer.cpp | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index 0524566c6e..36e2be6f4d 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -39,8 +39,6 @@ const int32 kMenuHeight = 15; const int32 kButtonHeight = 15; const int32 kSliderViewRectHeight = 40; -const rgb_color kViewGray = {216, 216, 216, 255}; - static void ErrorAlert(const char* message, status_t err); static status_t AddTranslationItems(BMenu* intoMenu, uint32 fromType); @@ -477,7 +475,7 @@ VideoWindow::VideoWindow (BRect frame, const char* title, window_type type, uint aRect.OffsetTo(B_ORIGIN); aRect.top += menuBar->Frame().Height() + 1; fView = new BView(aRect, "Background View", B_FOLLOW_ALL, B_WILL_DRAW); - fView->SetViewColor(kViewGray); + fView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); AddChild(fView); /* add some controls */ diff --git a/src/apps/codycam/VideoConsumer.cpp b/src/apps/codycam/VideoConsumer.cpp index 65f43d38be..3bf240251b 100644 --- a/src/apps/codycam/VideoConsumer.cpp +++ b/src/apps/codycam/VideoConsumer.cpp @@ -322,6 +322,8 @@ VideoConsumer::CreateBuffers(const media_format& withFormat) else ERROR("VideoConsumer::CreateBuffers ERROR IN GET BUFFER LIST\n"); + fFtpBitmap = new BBitmap(BRect(0, 0, xSize - 1, ySize - 1), B_RGB32, false, false); + FUNCTION("VideoConsumer::CreateBuffers - EXIT\n"); return status; } @@ -368,7 +370,6 @@ VideoConsumer::Connected(const media_source& producer, const media_destination& return B_ERROR; } - fFtpBitmap = new BBitmap(BRect(0, 0, 320 - 1, 240 - 1), B_RGB32, false, false); fConnectionActive = true; FUNCTION("VideoConsumer::Connected - EXIT\n");