Added a config parameter to save VfW compressor choice for Qt GUI.
This commit is contained in:
parent
21cc75eb45
commit
15c4a729b9
|
@ -24,6 +24,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -326,17 +327,33 @@ static LPVOID outBuf = NULL;
|
||||||
static int chooseConfig(int width, int height)
|
static int chooseConfig(int width, int height)
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
|
char fccHandler[8];
|
||||||
|
std::string fccHandlerString;
|
||||||
|
|
||||||
if ( cmpSet )
|
if ( cmpSet )
|
||||||
{
|
{
|
||||||
ICCompressorFree( &cmpvars );
|
ICCompressorFree( &cmpvars );
|
||||||
cmpSet = false;
|
cmpSet = false;
|
||||||
}
|
}
|
||||||
|
memset( fccHandler, 0, sizeof(fccHandler));
|
||||||
memset( &cmpvars, 0, sizeof(COMPVARS));
|
memset( &cmpvars, 0, sizeof(COMPVARS));
|
||||||
cmpvars.cbSize = sizeof(COMPVARS);
|
cmpvars.cbSize = sizeof(COMPVARS);
|
||||||
|
|
||||||
|
g_config->getOption("SDL.AviVfwFccHandler", &fccHandlerString);
|
||||||
|
|
||||||
|
if ( fccHandlerString.size() > 0 )
|
||||||
|
{
|
||||||
|
strcpy( fccHandler, fccHandlerString.c_str() );
|
||||||
|
memcpy( &cmpvars.fccHandler, fccHandler, 4 );
|
||||||
|
cmpvars.dwFlags = ICMF_COMPVARS_VALID;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ICCompressorChoose( HWND(consoleWindow->winId()), ICMF_CHOOSE_ALLCOMPRESSORS,
|
ret = ICCompressorChoose( HWND(consoleWindow->winId()), ICMF_CHOOSE_ALLCOMPRESSORS,
|
||||||
0, NULL, &cmpvars, 0);
|
0, NULL, &cmpvars, 0);
|
||||||
|
|
||||||
|
memcpy( fccHandler, &cmpvars.fccHandler, 4 );
|
||||||
|
fccHandler[4] = 0;
|
||||||
|
|
||||||
printf("FCC:%08X %c%c%c%c \n", cmpvars.fccHandler,
|
printf("FCC:%08X %c%c%c%c \n", cmpvars.fccHandler,
|
||||||
(cmpvars.fccHandler & 0x000000FF) ,
|
(cmpvars.fccHandler & 0x000000FF) ,
|
||||||
(cmpvars.fccHandler & 0x0000FF00) >> 8,
|
(cmpvars.fccHandler & 0x0000FF00) >> 8,
|
||||||
|
@ -345,6 +362,7 @@ static int chooseConfig(int width, int height)
|
||||||
|
|
||||||
if ( ret )
|
if ( ret )
|
||||||
{
|
{
|
||||||
|
g_config->setOption("SDL.AviVfwFccHandler", fccHandler);
|
||||||
cmpSet = true;
|
cmpSet = true;
|
||||||
}
|
}
|
||||||
return (cmpSet == false) ? -1 : 0;
|
return (cmpSet == false) ? -1 : 0;
|
||||||
|
|
|
@ -603,6 +603,10 @@ InitConfig()
|
||||||
config->addOption("SDL.AviVideoFormat", AVI_RGB24);
|
config->addOption("SDL.AviVideoFormat", AVI_RGB24);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
config->addOption("SDL.AviVfwFccHandler", "");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Cheat Options
|
// Cheat Options
|
||||||
config->addOption("SDL.CheatsDisabled", 0);
|
config->addOption("SDL.CheatsDisabled", 0);
|
||||||
config->addOption("SDL.CheatsDisableAutoLS", 0);
|
config->addOption("SDL.CheatsDisableAutoLS", 0);
|
||||||
|
|
Loading…
Reference in New Issue