added directx and divx checkers and divx auto installer

This commit is contained in:
Chris Danford
2001-11-26 08:28:48 +00:00
parent 6dee14eb22
commit 6d5e88563a
5 changed files with 133 additions and 1 deletions
+40
View File
@@ -326,7 +326,47 @@ HRESULT RageMovieTexture::InitDShowTextureRenderer()
// Add the source filter
if( FAILED( hr = m_pGB->AddSourceFilter( wFileName, L"SOURCE", &pFSrc ) ) )
{
int iRetVal = MessageBox( NULL, "Could not locate the DivX video codec. \n\
DivX is required to play the animations in this game and must \n\
be installed before running the application.\n\n\
If you'd like, we can install the DivX codec version 3.11 \n\
automatically for you. Would you like to do this?", "Error - DivX missing", MB_YESNO|MB_ICONSTOP );
if( iRetVal == IDYES )
{
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
CreateProcess(
NULL,
"divx/Register_DivX.exe", // pointer to command line string
NULL, // process security attributes
NULL, // thread security attributes
FALSE, // handle inheritance flag
0, // creation flags
NULL, // pointer to new environment block
"divx", // pointer to current directory name
&si, // pointer to STARTUPINFO
&pi // pointer to PROCESS_INFORMATION
);
}
else
{
int iRetVal = MessageBox( NULL, "We're sorry, but you must install DivX before using this application.\n\
Would you like to visit www.divx.com for more information on DivX codec?", "Sorry", MB_YESNO|MB_ICONSTOP );
if( iRetVal == IDYES )
{
GotoURL("http://www.divx.com");
}
}
exit(1);
// if this fails, it's probably because the user doesn't have DivX installed
RageErrorHr( "Could not create source filter to graph!", hr );
}
// Find the source's output and the renderer's input
if( FAILED( hr = pFTR->FindPin( L"In", &pFTRPinIn ) ) )