[vlc-commits] NPAPI: Win32, Added checking of correct using of fullscreen support.
Sergey Radionov
git at videolan.org
Sat Jul 30 10:06:06 CEST 2011
vlc/vlc-1.1 | branch: master | Sergey Radionov <RSATom at gmail.com> | Fri Jul 29 21:48:35 2011 +0700| [55fe4f34bbf9e6ed9bff0caf8bcc2a7fd310f909] | committer: Rémi Denis-Courmont
NPAPI: Win32, Added checking of correct using of fullscreen support.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=55fe4f34bbf9e6ed9bff0caf8bcc2a7fd310f909
---
projects/mozilla/vlc_win32_fullscreen.cpp | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/projects/mozilla/vlc_win32_fullscreen.cpp b/projects/mozilla/vlc_win32_fullscreen.cpp
index ffbe1e5..a679f59 100644
--- a/projects/mozilla/vlc_win32_fullscreen.cpp
+++ b/projects/mozilla/vlc_win32_fullscreen.cpp
@@ -845,17 +845,27 @@ void VLCWindowsManager::DestroyWindows()
void VLCWindowsManager::LibVlcAttach(libvlc_media_player_t* p_md)
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
_p_md=p_md;
libvlc_media_player_set_hwnd(p_md, _HolderWnd->getHWND());
}
void VLCWindowsManager::LibVlcDetach()
{
+ if(_p_md){
+ libvlc_media_player_set_hwnd(_p_md, 0);
+ }
+
_p_md=0;
}
void VLCWindowsManager::StartFullScreen()
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
if(getMD()&&!IsFullScreen()){
if(!_FSWnd){
_FSWnd= VLCFullScreenWnd::CreateFSWindow(this);
@@ -872,6 +882,9 @@ void VLCWindowsManager::StartFullScreen()
void VLCWindowsManager::EndFullScreen()
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
if(IsFullScreen()){
SetParent(_HolderWnd->getHWND(), _hWindowedParentWnd);
@@ -901,7 +914,7 @@ void VLCWindowsManager::ToggleFullScreen()
bool VLCWindowsManager::IsFullScreen()
{
- return 0!=_FSWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
+ return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
}
#endif //_WIN32
More information about the vlc-commits
mailing list