minor changes as per RN comments - add some comments and reorder a switch stmt.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell
2006-01-28 18:25:40 +00:00
parent 13a1e96f92
commit 09e28f7f8d

View File

@@ -2086,10 +2086,9 @@ public:
void Notify() void Notify()
{ {
// NB: Stop events could get triggered by the interface // NB: Stop events could get triggered by the interface
// if ShowPlayerControls is enabled, // if ShowPlayerControls is enabled, so the "GetPosition == GetDuration"
// so we need this hack here to make an attempt // hack is needed here to make an attempt at it not getting sent
// at it not getting sent - but its far from ideal - // - but its far from ideal - they can still get sent in some cases
// they can still get sent in some cases
if (m_parent->GetState() == wxMEDIASTATE_STOPPED && if (m_parent->GetState() == wxMEDIASTATE_STOPPED &&
m_parent->GetPosition() == m_parent->GetDuration()) m_parent->GetPosition() == m_parent->GetDuration())
{ {
@@ -2563,8 +2562,7 @@ bool wxAMMediaBackend::Stop()
bool wxAMMediaBackend::SetPosition(wxLongLong where) bool wxAMMediaBackend::SetPosition(wxLongLong where)
{ {
HRESULT hr = GetAM()->put_CurrentPosition( HRESULT hr = GetAM()->put_CurrentPosition(
((LONGLONG)where.GetValue()) / 1000.0 ((LONGLONG)where.GetValue()) / 1000.0 );
);
if (FAILED(hr)) if (FAILED(hr))
{ {
wxAMLOG(hr); wxAMLOG(hr);
@@ -4061,10 +4059,18 @@ Boolean wxQTMediaBackend::MCFilterProc(MovieController WXUNUSED(theController),
void * WXUNUSED(params), void * WXUNUSED(params),
LONG_PTR refCon) LONG_PTR refCon)
{ {
// NB: potential optimisation
// if (action == 1)
// return 0;
wxQTMediaBackend* pThis = (wxQTMediaBackend*)refCon; wxQTMediaBackend* pThis = (wxQTMediaBackend*)refCon;
switch (action) switch (action)
{ {
case 1:
// don't process idle events
break;
case 8: case 8:
// play button triggered - MC will set movie to opposite state // play button triggered - MC will set movie to opposite state
// of current - playing ? paused : playing // of current - playing ? paused : playing
@@ -4078,10 +4084,6 @@ Boolean wxQTMediaBackend::MCFilterProc(MovieController WXUNUSED(theController),
// to help this unfortunately // to help this unfortunately
break; break;
case 1:
// don't process idle events
break;
default: default:
break; break;
} }