Skip to content

Commit

Permalink
clean it up to actually run again :P
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Sep 6, 2011
1 parent 7e169e1 commit 9a10677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dvdsample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ LRESULT CApp::ToolTipProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
TText->lpszText = TEXT("Full Screen\0");
break;
case ID_PLAYBACK_STEPFORWARD:
TText->lpszText = TEXT("Step Forward\0");
TText->lpszText = TEXT("Step Forward One Frame\0");
break;
}

Expand Down Expand Up @@ -688,8 +688,8 @@ void CApp::DrawStatus(HDC hDC)
TextOut(hDC, 10, 50, location, lstrlen(location));

TCHAR time[25];
hr = StringCchPrintf(time, NUMELMS(time), TEXT("Time: %02d:%02d:%02d\0"), m_pDvdCore->GetTime().bHours,
m_pDvdCore->GetTime().bMinutes, m_pDvdCore->GetTime().bSeconds);
hr = StringCchPrintf(time, NUMELMS(time), TEXT("Time: %02d:%02d:%02d %d\0"), m_pDvdCore->GetTime().bHours,
m_pDvdCore->GetTime().bMinutes, m_pDvdCore->GetTime().bSeconds, m_pDvdCore->GetTime().bFrames);
TextOut(hDC, 10, 65, time, lstrlen(time));

if(timeGetTime() <= (m_dwProhibitedTime + 5000)) // if less than 5 seconds has passed
Expand Down
10 changes: 5 additions & 5 deletions on_dvd_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ LRESULT CDvdCore::OnDvdEvent(UINT uMessage, WPARAM wParam, LPARAM lParam)
{
case EC_DVD_CURRENT_HMSF_TIME:
{
// we get these like once a second...
// "This event is triggered at the beginning of every VOBU, which occurs every 0.4 to 1.0 seconds."
//OutputDebugString(L"ts event");
DVD_HMSF_TIMECODE * pTC = reinterpret_cast<DVD_HMSF_TIMECODE *>(&lParam1);
m_CurTime = *pTC;
Expand All @@ -74,11 +74,11 @@ LRESULT CDvdCore::OnDvdEvent(UINT uMessage, WPARAM wParam, LPARAM lParam)

case EC_DVD_TITLE_CHANGE:
m_ulCurTitle = static_cast<ULONG>(lParam1);
XTRACE(L"ts event %d", m_ulCurTitle);
XTRACE(L"title change event %d", m_ulCurTitle);
if(m_ulCurTitle == 1) {

m_pIDvdC2->PlayPeriodInTitleAutoStop(1, &start, &end, DVD_CMD_FLAG_None, NULL);
XTRACE(L"Commanded it to change...\n");
//m_pIDvdC2->PlayPeriodInTitleAutoStop(1, &start, &end, DVD_CMD_FLAG_None, NULL);
XTRACE(L"NOT Commanded it to change though we are within title 1...\n");
}
break;

Expand All @@ -89,7 +89,7 @@ LRESULT CDvdCore::OnDvdEvent(UINT uMessage, WPARAM wParam, LPARAM lParam)

case EC_DVD_PLAYPERIOD_AUTOSTOP:
playbackCount++;
XTRACE(L"The good one! %d\n", playbackCount);
XTRACE(L"Got good autostop message! %d\n", playbackCount);
m_eState = Nav_Paused;
// probably wants something like "seek to that end now and run " [like it has totally lost current location...it does not pause at the end...it sets itself to something else...]

Expand Down

0 comments on commit 9a10677

Please sign in to comment.