Added draw input aid configuration option to Qt GUI.
This commit is contained in:
parent
5c4f402a1f
commit
7bd1d6c2e8
|
@ -164,12 +164,16 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
// Force Aspect Ratio
|
// Force Aspect Ratio
|
||||||
aspectCbx = new QCheckBox( tr("Force Aspect Ratio") );
|
aspectCbx = new QCheckBox( tr("Force Aspect Ratio") );
|
||||||
|
|
||||||
|
// Draw Input Aids
|
||||||
|
drawInputAidsCbx = new QCheckBox( tr("Draw Input Aids") );
|
||||||
|
|
||||||
setCheckBoxFromProperty( autoRegion , "SDL.AutoDetectPAL");
|
setCheckBoxFromProperty( autoRegion , "SDL.AutoDetectPAL");
|
||||||
setCheckBoxFromProperty( new_PPU_ena , "SDL.NewPPU");
|
setCheckBoxFromProperty( new_PPU_ena , "SDL.NewPPU");
|
||||||
setCheckBoxFromProperty( frmskipcbx , "SDL.Frameskip");
|
setCheckBoxFromProperty( frmskipcbx , "SDL.Frameskip");
|
||||||
setCheckBoxFromProperty( sprtLimCbx , "SDL.DisableSpriteLimit");
|
setCheckBoxFromProperty( sprtLimCbx , "SDL.DisableSpriteLimit");
|
||||||
setCheckBoxFromProperty( clipSidesCbx , "SDL.ClipSides");
|
setCheckBoxFromProperty( clipSidesCbx , "SDL.ClipSides");
|
||||||
setCheckBoxFromProperty( showFPS_cbx , "SDL.ShowFPS");
|
setCheckBoxFromProperty( showFPS_cbx , "SDL.ShowFPS");
|
||||||
|
setCheckBoxFromProperty( drawInputAidsCbx, "SDL.DrawInputAids" );
|
||||||
|
|
||||||
if ( consoleWindow )
|
if ( consoleWindow )
|
||||||
{
|
{
|
||||||
|
@ -193,12 +197,14 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
connect(showFPS_cbx , SIGNAL(stateChanged(int)), this, SLOT(showFPSChanged(int)) );
|
connect(showFPS_cbx , SIGNAL(stateChanged(int)), this, SLOT(showFPSChanged(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)) );
|
||||||
|
|
||||||
vbox1->addWidget( autoRegion );
|
vbox1->addWidget( autoRegion );
|
||||||
vbox1->addWidget( new_PPU_ena );
|
vbox1->addWidget( new_PPU_ena );
|
||||||
vbox1->addWidget( frmskipcbx );
|
vbox1->addWidget( frmskipcbx );
|
||||||
vbox1->addWidget( sprtLimCbx );
|
vbox1->addWidget( sprtLimCbx );
|
||||||
//vbox1->addWidget( clipSidesCbx);
|
//vbox1->addWidget( clipSidesCbx);
|
||||||
|
vbox1->addWidget( drawInputAidsCbx );
|
||||||
vbox1->addWidget( showFPS_cbx );
|
vbox1->addWidget( showFPS_cbx );
|
||||||
vbox1->addWidget( autoScaleCbx);
|
vbox1->addWidget( autoScaleCbx);
|
||||||
vbox1->addWidget( aspectCbx );
|
vbox1->addWidget( aspectCbx );
|
||||||
|
@ -412,6 +418,8 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
setCheckBoxFromProperty( cursorVisCbx, "SDL.CursorVis" );
|
setCheckBoxFromProperty( cursorVisCbx, "SDL.CursorVis" );
|
||||||
grid->addWidget( cursorVisCbx, 1, 0, 2, 1, Qt::AlignLeft);
|
grid->addWidget( cursorVisCbx, 1, 0, 2, 1, Qt::AlignLeft);
|
||||||
|
|
||||||
|
//grid->addWidget( drawInputAidsCbx, 2, 0, 2, 1, Qt::AlignLeft);
|
||||||
|
|
||||||
connect(cursorVisCbx , SIGNAL(stateChanged(int)), this, SLOT(cursorVisChanged(int)) );
|
connect(cursorVisCbx , SIGNAL(stateChanged(int)), this, SLOT(cursorVisChanged(int)) );
|
||||||
|
|
||||||
vbox2->addStretch( 5 );
|
vbox2->addStretch( 5 );
|
||||||
|
@ -825,6 +833,19 @@ void ConsoleVideoConfDialog_t::cursorVisChanged( int value )
|
||||||
consoleWindow->loadCursor();
|
consoleWindow->loadCursor();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
void ConsoleVideoConfDialog_t::drawInputAidsChanged( int value )
|
||||||
|
{
|
||||||
|
int draw;
|
||||||
|
|
||||||
|
draw = (value != Qt::Unchecked);
|
||||||
|
|
||||||
|
//printf("Value:%i \n", value );
|
||||||
|
g_config->setOption("SDL.DrawInputAids", draw );
|
||||||
|
g_config->save ();
|
||||||
|
|
||||||
|
drawInputAidsEnable = draw;
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
QSize ConsoleVideoConfDialog_t::calcNewScreenSize(void)
|
QSize ConsoleVideoConfDialog_t::calcNewScreenSize(void)
|
||||||
{
|
{
|
||||||
QSize out( GL_NES_WIDTH, GL_NES_HEIGHT );
|
QSize out( GL_NES_WIDTH, GL_NES_HEIGHT );
|
||||||
|
|
|
@ -45,6 +45,7 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
QCheckBox *autoScaleCbx;
|
QCheckBox *autoScaleCbx;
|
||||||
QCheckBox *aspectCbx;
|
QCheckBox *aspectCbx;
|
||||||
QCheckBox *cursorVisCbx;
|
QCheckBox *cursorVisCbx;
|
||||||
|
QCheckBox *drawInputAidsCbx;
|
||||||
QDoubleSpinBox *xScaleBox;
|
QDoubleSpinBox *xScaleBox;
|
||||||
QDoubleSpinBox *yScaleBox;
|
QDoubleSpinBox *yScaleBox;
|
||||||
QLabel *aspectSelectLabel;
|
QLabel *aspectSelectLabel;
|
||||||
|
@ -85,6 +86,7 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
void scalerChanged(int index);
|
void scalerChanged(int index);
|
||||||
void cursorShapeChanged(int index);
|
void cursorShapeChanged(int index);
|
||||||
void cursorVisChanged(int value);
|
void cursorVisChanged(int value);
|
||||||
|
void drawInputAidsChanged(int value);
|
||||||
void applyChanges( void );
|
void applyChanges( void );
|
||||||
void ntscStartScanLineChanged(const QString &);
|
void ntscStartScanLineChanged(const QString &);
|
||||||
void ntscEndScanLineChanged(const QString &);
|
void ntscEndScanLineChanged(const QString &);
|
||||||
|
|
|
@ -504,6 +504,7 @@ InitConfig()
|
||||||
config->addOption("togglemenu", "SDL.ToggleMenu", 0);
|
config->addOption("togglemenu", "SDL.ToggleMenu", 0);
|
||||||
config->addOption("cursorType", "SDL.CursorType", 0);
|
config->addOption("cursorType", "SDL.CursorType", 0);
|
||||||
config->addOption("cursorVis" , "SDL.CursorVis", 1);
|
config->addOption("cursorVis" , "SDL.CursorVis", 1);
|
||||||
|
config->addOption("SDL.DrawInputAids", 1);
|
||||||
|
|
||||||
// OpenGL options
|
// OpenGL options
|
||||||
config->addOption("opengl", "SDL.OpenGL", 1);
|
config->addOption("opengl", "SDL.OpenGL", 1);
|
||||||
|
|
|
@ -84,6 +84,7 @@ bool turbo = false;
|
||||||
bool pauseAfterPlayback = false;
|
bool pauseAfterPlayback = false;
|
||||||
bool suggestReadOnlyReplay = true;
|
bool suggestReadOnlyReplay = true;
|
||||||
bool showStatusIconOpt = true;
|
bool showStatusIconOpt = true;
|
||||||
|
bool drawInputAidsEnable = true;
|
||||||
unsigned int gui_draw_area_width = 256;
|
unsigned int gui_draw_area_width = 256;
|
||||||
unsigned int gui_draw_area_height = 256;
|
unsigned int gui_draw_area_height = 256;
|
||||||
|
|
||||||
|
@ -736,6 +737,8 @@ int fceuWrapperInit( int argc, char *argv[] )
|
||||||
AutoResumePlay = false;
|
AutoResumePlay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_config->getOption ("SDL.DrawInputAids", &drawInputAidsEnable);
|
||||||
|
|
||||||
// check to see if recording HUD to AVI is enabled
|
// check to see if recording HUD to AVI is enabled
|
||||||
int rh;
|
int rh;
|
||||||
g_config->getOption("SDL.RecordHUD", &rh);
|
g_config->getOption("SDL.RecordHUD", &rh);
|
||||||
|
@ -1549,6 +1552,11 @@ void FCEUD_ToggleStatusIcon(void)
|
||||||
showStatusIconOpt = !showStatusIconOpt;
|
showStatusIconOpt = !showStatusIconOpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FCEUD_ShouldDrawInputAids(void)
|
||||||
|
{
|
||||||
|
return drawInputAidsEnable;
|
||||||
|
}
|
||||||
|
|
||||||
void FCEUD_TurboOn (void) { /* TODO */ };
|
void FCEUD_TurboOn (void) { /* TODO */ };
|
||||||
void FCEUD_TurboOff (void) { /* TODO */ };
|
void FCEUD_TurboOff (void) { /* TODO */ };
|
||||||
void FCEUD_TurboToggle(void) { /* TODO */ };
|
void FCEUD_TurboToggle(void) { /* TODO */ };
|
||||||
|
|
|
@ -17,6 +17,7 @@ extern bool pauseAfterPlayback;
|
||||||
extern bool suggestReadOnlyReplay;
|
extern bool suggestReadOnlyReplay;
|
||||||
extern bool emulatorCycleToggle;
|
extern bool emulatorCycleToggle;
|
||||||
extern bool showStatusIconOpt;
|
extern bool showStatusIconOpt;
|
||||||
|
extern bool drawInputAidsEnable;
|
||||||
extern unsigned int gui_draw_area_width;
|
extern unsigned int gui_draw_area_width;
|
||||||
extern unsigned int gui_draw_area_height;
|
extern unsigned int gui_draw_area_height;
|
||||||
extern unsigned int emulatorCycleCount;
|
extern unsigned int emulatorCycleCount;
|
||||||
|
|
|
@ -77,15 +77,8 @@ extern bool MaxSpeed;
|
||||||
* Attempts to destroy the graphical video display. Returns 0 on
|
* Attempts to destroy the graphical video display. Returns 0 on
|
||||||
* success, -1 on failure.
|
* success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//draw input aids if we are fullscreen
|
|
||||||
bool FCEUD_ShouldDrawInputAids()
|
|
||||||
{
|
|
||||||
return s_fullscreen!=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
KillVideo()
|
KillVideo(void)
|
||||||
{
|
{
|
||||||
//printf("Killing Video\n");
|
//printf("Killing Video\n");
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,10 @@ static void UpdateZapper(int w, void *data, int arg)
|
||||||
ZD[w].mzx=ptr[0];
|
ZD[w].mzx=ptr[0];
|
||||||
ZD[w].mzy=ptr[1];
|
ZD[w].mzy=ptr[1];
|
||||||
}
|
}
|
||||||
|
// Always update X,Y so that gunsight draw function
|
||||||
|
// is always following the cursor.
|
||||||
|
ZD[w].mzx=ptr[0];
|
||||||
|
ZD[w].mzy=ptr[1];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue