Added logic to save the video auto scaling config setting between restarts of Qt GUI. This addresses part of issue #311.
This commit is contained in:
parent
6f4537733c
commit
6cbcc9cc59
|
@ -164,6 +164,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
connect(clipSidesCbx, SIGNAL(stateChanged(int)), this, SLOT(clipSidesChanged(int)) );
|
connect(clipSidesCbx, SIGNAL(stateChanged(int)), this, SLOT(clipSidesChanged(int)) );
|
||||||
connect(showFPS_cbx , SIGNAL(stateChanged(int)), this, SLOT(showFPSChanged(int)) );
|
connect(showFPS_cbx , SIGNAL(stateChanged(int)), this, SLOT(showFPSChanged(int)) );
|
||||||
connect(sqrPixCbx , SIGNAL(stateChanged(int)), this, SLOT(sqrPixChanged(int)) );
|
connect(sqrPixCbx , SIGNAL(stateChanged(int)), this, SLOT(sqrPixChanged(int)) );
|
||||||
|
connect(autoScaleCbx, SIGNAL(stateChanged(int)), this, SLOT(autoScaleChanged(int)) );
|
||||||
|
|
||||||
main_vbox->addWidget( new_PPU_ena );
|
main_vbox->addWidget( new_PPU_ena );
|
||||||
main_vbox->addWidget( frmskipcbx );
|
main_vbox->addWidget( frmskipcbx );
|
||||||
|
@ -309,6 +310,26 @@ void ConsoleVideoConfDialog_t::openGL_linearFilterChanged( int value )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
|
void ConsoleVideoConfDialog_t::autoScaleChanged( int value )
|
||||||
|
{
|
||||||
|
bool opt = (value != Qt::Unchecked);
|
||||||
|
g_config->setOption("SDL.AutoScale", opt );
|
||||||
|
g_config->save ();
|
||||||
|
|
||||||
|
if ( consoleWindow != NULL )
|
||||||
|
{
|
||||||
|
if ( consoleWindow->viewport_GL )
|
||||||
|
{
|
||||||
|
consoleWindow->viewport_GL->setAutoScaleOpt( opt );
|
||||||
|
}
|
||||||
|
if ( consoleWindow->viewport_SDL )
|
||||||
|
{
|
||||||
|
consoleWindow->viewport_SDL->setAutoScaleOpt( opt );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void ConsoleVideoConfDialog_t::use_new_PPU_changed( int value )
|
void ConsoleVideoConfDialog_t::use_new_PPU_changed( int value )
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,6 +56,7 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void openGL_linearFilterChanged( int value );
|
void openGL_linearFilterChanged( int value );
|
||||||
|
void autoScaleChanged( int value );
|
||||||
void sqrPixChanged( int value );
|
void sqrPixChanged( int value );
|
||||||
void use_new_PPU_changed( int value );
|
void use_new_PPU_changed( int value );
|
||||||
void frameskip_changed( int value );
|
void frameskip_changed( int value );
|
||||||
|
|
|
@ -79,6 +79,10 @@ ConsoleViewGL_t::ConsoleViewGL_t(QWidget *parent)
|
||||||
g_config->getOption("SDL.OpenGLip", &opt );
|
g_config->getOption("SDL.OpenGLip", &opt );
|
||||||
|
|
||||||
linearFilter = (opt) ? true : false;
|
linearFilter = (opt) ? true : false;
|
||||||
|
|
||||||
|
g_config->getOption ("SDL.AutoScale", &opt);
|
||||||
|
|
||||||
|
autoScaleEna = (opt) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,10 @@ ConsoleViewSDL_t::ConsoleViewSDL_t(QWidget *parent)
|
||||||
g_config->getOption("SDL.OpenGLip", &opt );
|
g_config->getOption("SDL.OpenGLip", &opt );
|
||||||
|
|
||||||
linearFilter = (opt) ? true : false;
|
linearFilter = (opt) ? true : false;
|
||||||
|
|
||||||
|
g_config->getOption ("SDL.AutoScale", &opt);
|
||||||
|
|
||||||
|
autoScaleEna = (opt) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue