Moved Vfw compressor choose window popup to be after file overwrite warning popup for Qt GUI.

This commit is contained in:
mjbudd77 2021-08-31 15:25:48 -04:00
parent 8d3a27e1a5
commit 77c3fa8ab4
1 changed files with 17 additions and 11 deletions

View File

@ -443,6 +443,7 @@ static int init( int width, int height )
// Allocate a buffer and get lpOutput to point to it. // Allocate a buffer and get lpOutput to point to it.
h = GlobalAlloc(GHND, dwCompressBufferSize); h = GlobalAlloc(GHND, dwCompressBufferSize);
outBuf = (LPVOID)GlobalLock(h); outBuf = (LPVOID)GlobalLock(h);
memset( outBuf, 0, dwCompressBufferSize);
//dwQuality = ICGetDefaultQuality( cmpvars.hic ); //dwQuality = ICGetDefaultQuality( cmpvars.hic );
if ( qualitySupported ) if ( qualitySupported )
@ -456,7 +457,12 @@ static int init( int width, int height )
//printf("Quality Setting: %i\n", dwQuality ); //printf("Quality Setting: %i\n", dwQuality );
ICCompressBegin( cmpvars.hic, &bmapIn, bmapOut ); if ( ICCompressBegin( cmpvars.hic, &bmapIn, bmapOut ) != ICERR_OK )
{
printf("Error: ICCompressBegin\n");
icErrCount = 9999;
return -1;
}
frameNum = 0; frameNum = 0;
flagsOut = 0; flagsOut = 0;
@ -531,16 +537,6 @@ int aviRecordOpenFile( const char *filepath )
double fps; double fps;
char fileName[1024]; char fileName[1024];
#ifdef WIN32
if ( videoFormat == AVI_VFW )
{
if ( VFW::chooseConfig( nes_shm->video.ncol, nes_shm->video.nrow ) )
{
return -1;
}
}
#endif
if ( filepath != NULL ) if ( filepath != NULL )
{ {
strcpy( fileName, filepath ); strcpy( fileName, filepath );
@ -599,6 +595,16 @@ int aviRecordOpenFile( const char *filepath )
} }
} }
#ifdef WIN32
if ( videoFormat == AVI_VFW )
{
if ( VFW::chooseConfig( nes_shm->video.ncol, nes_shm->video.nrow ) )
{
return -1;
}
}
#endif
if ( gwavi != NULL ) if ( gwavi != NULL )
{ {
delete gwavi; gwavi = NULL; delete gwavi; gwavi = NULL;