Commit 8e1d4438 authored by Tony Castley's avatar Tony Castley

Fixed pop-up menu's radio mode.

parent 2058f103
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype * VideoWindow.h: BeOS video window class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.19.2.3 2002/07/11 07:21:57 tcastley Exp $ * $Id: VideoWindow.h,v 1.19.2.4 2002/07/11 12:24:45 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au> * Tony Castley <tcastley@mail.powerup.com.au>
...@@ -56,6 +56,7 @@ public: ...@@ -56,6 +56,7 @@ public:
void MouseDown(BPoint point); void MouseDown(BPoint point);
void Draw(BRect updateRect); void Draw(BRect updateRect);
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method * vout_beos.cpp: beos video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.58.2.2 2002/07/11 07:21:57 tcastley Exp $ * $Id: vout_beos.cpp,v 1.58.2.3 2002/07/11 12:24:45 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -65,6 +65,7 @@ typedef struct vout_sys_s ...@@ -65,6 +65,7 @@ typedef struct vout_sys_s
s32 i_height; s32 i_height;
// u8 *pp_buffer[3]; // u8 *pp_buffer[3];
u32 source_chroma;
int i_index; int i_index;
} vout_sys_t; } vout_sys_t;
...@@ -132,6 +133,10 @@ VideoWindow::VideoWindow( int v_width, int v_height, ...@@ -132,6 +133,10 @@ VideoWindow::VideoWindow( int v_width, int v_height,
{ {
vsync = true; vsync = true;
} }
else
{
vsync = false;
}
delete screen; delete screen;
mode = SelectDrawingMode(v_width, v_height); mode = SelectDrawingMode(v_width, v_height);
...@@ -173,16 +178,14 @@ void VideoWindow::MessageReceived( BMessage *p_message ) ...@@ -173,16 +178,14 @@ void VideoWindow::MessageReceived( BMessage *p_message )
case RESIZE_100: case RESIZE_100:
if (is_zoomed) if (is_zoomed)
{ {
MoveTo(winSize.left, winSize.top); ((BWindow *)this)->Zoom();
be_app->ShowCursor();
} }
ResizeTo(i_width, i_height); ResizeTo(i_width, i_height);
break; break;
case RESIZE_200: case RESIZE_200:
if (is_zoomed) if (is_zoomed)
{ {
MoveTo(winSize.left, winSize.top); ((BWindow *)this)->Zoom();
be_app->ShowCursor();
} }
ResizeTo(i_width * 2, i_height * 2); ResizeTo(i_width * 2, i_height * 2);
break; break;
...@@ -391,43 +394,44 @@ void VLCView::MouseDown(BPoint point) ...@@ -391,43 +394,44 @@ void VLCView::MouseDown(BPoint point)
{ {
BMessage* msg = Window()->CurrentMessage(); BMessage* msg = Window()->CurrentMessage();
int32 clicks = msg->FindInt32("clicks"); int32 clicks = msg->FindInt32("clicks");
VideoWindow *vWindow = (VideoWindow *)Window(); VideoWindow *vWindow = (VideoWindow *)Window();
uint32 mouseButtons;
BPoint where;
GetMouse(&where, &mouseButtons, true);
if (clicks > 1) if ((mouseButtons & B_PRIMARY_MOUSE_BUTTON) && (clicks == 2))
{ {
Window()->Zoom(); Window()->Zoom();
return; return;
} }
uint32 mouseButtons; else
BPoint where; {
GetMouse(&where, &mouseButtons, true); if (mouseButtons & B_SECONDARY_MOUSE_BUTTON)
// bring up pop-up menu {
if (mouseButtons & B_SECONDARY_MOUSE_BUTTON) { //if (!menu) delete menu;
BPopUpMenu *menu = new BPopUpMenu("context menu"); BPopUpMenu *menu = new BPopUpMenu("context menu");
// Toggle FullScreen menu->SetRadioMode(false);
BMenuItem *zoomItem = new BMenuItem("Fullscreen", new BMessage(TOGGLE_FULL_SCREEN)); // Toggle FullScreen
zoomItem->SetMarked(vWindow->is_zoomed); BMenuItem *zoomItem = new BMenuItem("Fullscreen", new BMessage(TOGGLE_FULL_SCREEN));
menu->AddItem(zoomItem); zoomItem->SetMarked(vWindow->is_zoomed);
// Resize to 100% menu->AddItem(zoomItem);
BMenuItem *origItem = new BMenuItem("100%", new BMessage(RESIZE_100)); // Resize to 100%
menu->AddItem(origItem); BMenuItem *origItem = new BMenuItem("100%", new BMessage(RESIZE_100));
// Resize to 200% menu->AddItem(origItem);
BMenuItem *doubleItem = new BMenuItem("200%", new BMessage(RESIZE_200)); // Resize to 200%
menu->AddItem(doubleItem); BMenuItem *doubleItem = new BMenuItem("200%", new BMessage(RESIZE_200));
menu->AddSeparatorItem(); menu->AddItem(doubleItem);
// // Toggle the Aspect Ratio Correction menu->AddSeparatorItem();
// BMenuItem *aspectItem = new BMenuItem("Aspect Correction", // Toggle vSync
// new BMessage(ASPECT_CORRECT)); BMenuItem *vsyncItem = new BMenuItem("Vertical Sync", new BMessage(VERT_SYNC));
// aspectItem->SetMarked(vWindow->is_zoomed); vsyncItem->SetMarked(vWindow->vsync);
// menu->AddItem(aspectItem); menu->AddItem(vsyncItem);
// Toggle vSync
BMenuItem *vsyncItem = new BMenuItem("Vertical Sync", new BMessage(VERT_SYNC));
vsyncItem->SetMarked(vWindow->vsync);
menu->AddItem(vsyncItem);
menu->SetTargetForItems(this); menu->SetTargetForItems(this);
ConvertToScreen(&where); ConvertToScreen(&where);
menu->Go(where, true, false, true); menu->Go(where, true, false, true);
}
} }
} }
...@@ -490,6 +494,7 @@ int vout_Create( vout_thread_t *p_vout ) ...@@ -490,6 +494,7 @@ int vout_Create( vout_thread_t *p_vout )
} }
p_vout->p_sys->i_width = p_vout->render.i_width; p_vout->p_sys->i_width = p_vout->render.i_width;
p_vout->p_sys->i_height = p_vout->render.i_height; p_vout->p_sys->i_height = p_vout->render.i_height;
p_vout->p_sys->source_chroma = p_vout->render.i_chroma;
return( 0 ); return( 0 );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment