For Qt/SDL, added logic to make GUI message video overlays optional via video config dialog. Issue #448.
This commit is contained in:
parent
ed4bb30ffe
commit
c4010846e1
|
@ -67,6 +67,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
g_config->getOption("SDL.ShowFrameCount", &frame_display);
|
g_config->getOption("SDL.ShowFrameCount", &frame_display);
|
||||||
g_config->getOption("SDL.ShowLagCount", &lagCounterDisplay);
|
g_config->getOption("SDL.ShowLagCount", &lagCounterDisplay);
|
||||||
g_config->getOption("SDL.ShowRerecordCount", &rerecord_display);
|
g_config->getOption("SDL.ShowRerecordCount", &rerecord_display);
|
||||||
|
g_config->getOption("SDL.ShowGuiMessages", &vidGuiMsgEna);
|
||||||
|
|
||||||
style = this->style();
|
style = this->style();
|
||||||
|
|
||||||
|
@ -171,6 +172,10 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
// Clip Sides Checkbox
|
// Clip Sides Checkbox
|
||||||
clipSidesCbx = new QCheckBox( tr("Clip Left/Right Sides (8 px on each)") );
|
clipSidesCbx = new QCheckBox( tr("Clip Left/Right Sides (8 px on each)") );
|
||||||
|
|
||||||
|
// Show GUI Messages Checkbox
|
||||||
|
showGuiMsgs_cbx = new QCheckBox( tr("GUI Messages") );
|
||||||
|
showGuiMsgs_cbx->setChecked( vidGuiMsgEna );
|
||||||
|
|
||||||
// Show FPS Checkbox
|
// Show FPS Checkbox
|
||||||
showFPS_cbx = new QCheckBox( tr("Frames Per Second") );
|
showFPS_cbx = new QCheckBox( tr("Frames Per Second") );
|
||||||
|
|
||||||
|
@ -247,6 +252,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
connect(sprtLimCbx , SIGNAL(stateChanged(int)), this, SLOT(useSpriteLimitChanged(int)) );
|
connect(sprtLimCbx , SIGNAL(stateChanged(int)), this, SLOT(useSpriteLimitChanged(int)) );
|
||||||
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(showGuiMsgs_cbx , SIGNAL(stateChanged(int)), this, SLOT(showGuiMsgsChanged(int)) );
|
||||||
connect(aspectCbx , SIGNAL(stateChanged(int)), this, SLOT(aspectEnableChanged(int)) );
|
connect(aspectCbx , SIGNAL(stateChanged(int)), this, SLOT(aspectEnableChanged(int)) );
|
||||||
connect(autoScaleCbx , SIGNAL(stateChanged(int)), this, SLOT(autoScaleChanged(int)) );
|
connect(autoScaleCbx , SIGNAL(stateChanged(int)), this, SLOT(autoScaleChanged(int)) );
|
||||||
connect(drawInputAidsCbx, SIGNAL(stateChanged(int)), this, SLOT(drawInputAidsChanged(int)) );
|
connect(drawInputAidsCbx, SIGNAL(stateChanged(int)), this, SLOT(drawInputAidsChanged(int)) );
|
||||||
|
@ -366,6 +372,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
vbox3->addStretch(5);
|
vbox3->addStretch(5);
|
||||||
gbox->setLayout( vbox );
|
gbox->setLayout( vbox );
|
||||||
|
|
||||||
|
vbox->addWidget( showGuiMsgs_cbx );
|
||||||
vbox->addWidget( drawInputAidsCbx );
|
vbox->addWidget( drawInputAidsCbx );
|
||||||
vbox->addWidget( showFPS_cbx );
|
vbox->addWidget( showFPS_cbx );
|
||||||
vbox->addWidget( showFrameCount_cbx );
|
vbox->addWidget( showFrameCount_cbx );
|
||||||
|
@ -879,6 +886,14 @@ void ConsoleVideoConfDialog_t::showFPSChanged( int value )
|
||||||
FCEU_WRAPPER_UNLOCK();
|
FCEU_WRAPPER_UNLOCK();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
void ConsoleVideoConfDialog_t::showGuiMsgsChanged( int value )
|
||||||
|
{
|
||||||
|
//printf("Value:%i \n", value );
|
||||||
|
vidGuiMsgEna = (value == Qt::Checked);
|
||||||
|
g_config->setOption("SDL.ShowGuiMessages", vidGuiMsgEna );
|
||||||
|
g_config->save ();
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
void ConsoleVideoConfDialog_t::aspectEnableChanged( int value )
|
void ConsoleVideoConfDialog_t::aspectEnableChanged( int value )
|
||||||
{
|
{
|
||||||
//printf("Value:%i \n", value );
|
//printf("Value:%i \n", value );
|
||||||
|
|
|
@ -46,6 +46,7 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
QCheckBox *sprtLimCbx;
|
QCheckBox *sprtLimCbx;
|
||||||
QCheckBox *clipSidesCbx;
|
QCheckBox *clipSidesCbx;
|
||||||
QCheckBox *showFPS_cbx;
|
QCheckBox *showFPS_cbx;
|
||||||
|
QCheckBox *showGuiMsgs_cbx;
|
||||||
QCheckBox *autoScaleCbx;
|
QCheckBox *autoScaleCbx;
|
||||||
QCheckBox *aspectCbx;
|
QCheckBox *aspectCbx;
|
||||||
QCheckBox *cursorVisCbx;
|
QCheckBox *cursorVisCbx;
|
||||||
|
@ -91,6 +92,7 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
void intFrameRate_changed( int value );
|
void intFrameRate_changed( int value );
|
||||||
void useSpriteLimitChanged( int value );
|
void useSpriteLimitChanged( int value );
|
||||||
void clipSidesChanged( int value );
|
void clipSidesChanged( int value );
|
||||||
|
void showGuiMsgsChanged( int value );
|
||||||
void showFPSChanged( int value );
|
void showFPSChanged( int value );
|
||||||
void aspectChanged(int index);
|
void aspectChanged(int index);
|
||||||
void regionChanged(int index);
|
void regionChanged(int index);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "fceu.h"
|
#include "fceu.h"
|
||||||
#include "ppu.h"
|
#include "ppu.h"
|
||||||
|
#include "video.h"
|
||||||
#include "../common/cheat.h"
|
#include "../common/cheat.h"
|
||||||
|
|
||||||
#include "Qt/input.h"
|
#include "Qt/input.h"
|
||||||
|
@ -559,6 +560,7 @@ InitConfig()
|
||||||
config->addOption("SDL.ShowFrameCount", 0);
|
config->addOption("SDL.ShowFrameCount", 0);
|
||||||
config->addOption("SDL.ShowLagCount", 0);
|
config->addOption("SDL.ShowLagCount", 0);
|
||||||
config->addOption("SDL.ShowRerecordCount", 0);
|
config->addOption("SDL.ShowRerecordCount", 0);
|
||||||
|
config->addOption("SDL.ShowGuiMessages", 1);
|
||||||
|
|
||||||
// OpenGL options
|
// OpenGL options
|
||||||
config->addOption("opengl", "SDL.OpenGL", 1);
|
config->addOption("opengl", "SDL.OpenGL", 1);
|
||||||
|
@ -1071,6 +1073,7 @@ UpdateEMUCore(Config *config)
|
||||||
config->getOption("SDL.PostRenderScanlines" , &postrenderscanlines );
|
config->getOption("SDL.PostRenderScanlines" , &postrenderscanlines );
|
||||||
config->getOption("SDL.VBlankScanlines" , &vblankscanlines );
|
config->getOption("SDL.VBlankScanlines" , &vblankscanlines );
|
||||||
config->getOption("SDL.Skip7bitOverClocking", &skip_7bit_overclocking );
|
config->getOption("SDL.Skip7bitOverClocking", &skip_7bit_overclocking );
|
||||||
|
config->getOption("SDL.ShowGuiMessages" , &vidGuiMsgEna );
|
||||||
|
|
||||||
config->getOption("SDL.PAL", ®ion);
|
config->getOption("SDL.PAL", ®ion);
|
||||||
FCEUI_SetRegion(region);
|
FCEUI_SetRegion(region);
|
||||||
|
|
|
@ -209,6 +209,7 @@ int InitVideo(FCEUGI *gi)
|
||||||
g_config->getOption("SDL.ShowFrameCount", &frame_display);
|
g_config->getOption("SDL.ShowFrameCount", &frame_display);
|
||||||
g_config->getOption("SDL.ShowLagCount", &lagCounterDisplay);
|
g_config->getOption("SDL.ShowLagCount", &lagCounterDisplay);
|
||||||
g_config->getOption("SDL.ShowRerecordCount", &rerecord_display);
|
g_config->getOption("SDL.ShowRerecordCount", &rerecord_display);
|
||||||
|
g_config->getOption("SDL.ShowGuiMessages", &vidGuiMsgEna);
|
||||||
g_config->getOption("SDL.ScanLineStartNTSC", &startNTSC);
|
g_config->getOption("SDL.ScanLineStartNTSC", &startNTSC);
|
||||||
g_config->getOption("SDL.ScanLineEndNTSC", &endNTSC);
|
g_config->getOption("SDL.ScanLineEndNTSC", &endNTSC);
|
||||||
g_config->getOption("SDL.ScanLineStartPAL", &startPAL);
|
g_config->getOption("SDL.ScanLineStartPAL", &startPAL);
|
||||||
|
|
|
@ -72,6 +72,8 @@ static u8 *xbsave=NULL;
|
||||||
GUIMESSAGE guiMessage;
|
GUIMESSAGE guiMessage;
|
||||||
GUIMESSAGE subtitleMessage;
|
GUIMESSAGE subtitleMessage;
|
||||||
|
|
||||||
|
bool vidGuiMsgEna = true;
|
||||||
|
|
||||||
//for input display
|
//for input display
|
||||||
extern int input_display;
|
extern int input_display;
|
||||||
extern uint32 cur_input_display;
|
extern uint32 cur_input_display;
|
||||||
|
@ -406,7 +408,10 @@ void FCEU_DispMessageOnMovie(const char *format, ...)
|
||||||
vsnprintf(guiMessage.errmsg,sizeof(guiMessage.errmsg),format,ap);
|
vsnprintf(guiMessage.errmsg,sizeof(guiMessage.errmsg),format,ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
guiMessage.howlong = 180;
|
if ( vidGuiMsgEna )
|
||||||
|
{
|
||||||
|
guiMessage.howlong = 180;
|
||||||
|
}
|
||||||
guiMessage.isMovieMessage = true;
|
guiMessage.isMovieMessage = true;
|
||||||
guiMessage.linesFromBottom = 0;
|
guiMessage.linesFromBottom = 0;
|
||||||
|
|
||||||
|
@ -429,7 +434,10 @@ void FCEU_DispMessage(const char *format, int disppos=0, ...)
|
||||||
strcat(temp, "\n");
|
strcat(temp, "\n");
|
||||||
FCEU_printf(temp);
|
FCEU_printf(temp);
|
||||||
|
|
||||||
guiMessage.howlong = 180;
|
if ( vidGuiMsgEna )
|
||||||
|
{
|
||||||
|
guiMessage.howlong = 180;
|
||||||
|
}
|
||||||
guiMessage.isMovieMessage = false;
|
guiMessage.isMovieMessage = false;
|
||||||
|
|
||||||
guiMessage.linesFromBottom = disppos;
|
guiMessage.linesFromBottom = disppos;
|
||||||
|
|
|
@ -30,6 +30,8 @@ extern struct GUIMESSAGE
|
||||||
|
|
||||||
extern GUIMESSAGE subtitleMessage;
|
extern GUIMESSAGE subtitleMessage;
|
||||||
|
|
||||||
|
extern bool vidGuiMsgEna;
|
||||||
|
|
||||||
void FCEU_DrawNumberRow(uint8 *XBuf, int *nstatus, int cur);
|
void FCEU_DrawNumberRow(uint8 *XBuf, int *nstatus, int cur);
|
||||||
|
|
||||||
std::string FCEUI_GetSnapshotAsName();
|
std::string FCEUI_GetSnapshotAsName();
|
||||||
|
|
Loading…
Reference in New Issue