commit
36c39aa0e9
|
@ -431,6 +431,7 @@ set(SRC_DRIVERS_SDL
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/GuiConf.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/GuiConf.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/LuaControl.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/LuaControl.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/CheatsConf.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/CheatsConf.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/HexEditor.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleUtilities.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleUtilities.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleVideoConf.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleVideoConf.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleSoundConf.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers/Qt/ConsoleSoundConf.cpp
|
||||||
|
|
|
@ -50,7 +50,8 @@ GuiCheatsDialog_t::GuiCheatsDialog_t(QWidget *parent)
|
||||||
|
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(font);
|
||||||
|
|
||||||
fontCharWidth = fm.boundingRect('X').width() * devPixRatio;
|
//fontCharWidth = fm.boundingRect('X').width() * devPixRatio;
|
||||||
|
fontCharWidth = 2.00 * fm.averageCharWidth() * devPixRatio;
|
||||||
|
|
||||||
setWindowTitle("Cheat Search");
|
setWindowTitle("Cheat Search");
|
||||||
|
|
||||||
|
@ -415,12 +416,22 @@ GuiCheatsDialog_t::~GuiCheatsDialog_t(void)
|
||||||
}
|
}
|
||||||
wasPausedByCheats = false;
|
wasPausedByCheats = false;
|
||||||
|
|
||||||
|
printf("Destroy Cheat Window Event\n");
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void GuiCheatsDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Cheat Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void GuiCheatsDialog_t::closeWindow(void)
|
void GuiCheatsDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Close Window\n");
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
int GuiCheatsDialog_t::addSearchResult (uint32_t a, uint8_t last, uint8_t current)
|
int GuiCheatsDialog_t::addSearchResult (uint32_t a, uint8_t last, uint8_t current)
|
||||||
|
@ -742,25 +753,10 @@ void GuiCheatsDialog_t::saveCheatFile(void)
|
||||||
|
|
||||||
if ( GameInfo )
|
if ( GameInfo )
|
||||||
{
|
{
|
||||||
char *_filename;
|
getFileBaseName( GameInfo->filename, dir );
|
||||||
if ((_filename = strrchr(GameInfo->filename, '\\')) || (_filename = strrchr(GameInfo->filename, '/')))
|
|
||||||
{
|
strcat( dir, ".cht");
|
||||||
strcpy( dir, _filename + 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy( dir, GameInfo->filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
_filename = strrchr( dir, '.');
|
|
||||||
if (_filename)
|
|
||||||
{
|
|
||||||
strcpy(_filename, ".cht");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcat( dir, ".cht");
|
|
||||||
}
|
|
||||||
dialog.selectFile( dir );
|
dialog.selectFile( dir );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ class GuiCheatsDialog_t : public QDialog
|
||||||
int activeCheatListCB (char *name, uint32 a, uint8 v, int c, int s, int type, void *data);
|
int activeCheatListCB (char *name, uint32 a, uint8 v, int c, int s, int type, void *data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
QGroupBox *actCheatFrame;
|
QGroupBox *actCheatFrame;
|
||||||
QGroupBox *cheatSearchFrame;
|
QGroupBox *cheatSearchFrame;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// ConsoleSoundConf.cpp
|
// ConsoleSoundConf.cpp
|
||||||
//
|
//
|
||||||
|
#include <QCloseEvent>
|
||||||
|
|
||||||
#include "../../fceu.h"
|
#include "../../fceu.h"
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "Qt/ConsoleSoundConf.h"
|
#include "Qt/ConsoleSoundConf.h"
|
||||||
|
@ -217,7 +219,22 @@ ConsoleSndConfDialog_t::ConsoleSndConfDialog_t(QWidget *parent)
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
ConsoleSndConfDialog_t::~ConsoleSndConfDialog_t(void)
|
ConsoleSndConfDialog_t::~ConsoleSndConfDialog_t(void)
|
||||||
{
|
{
|
||||||
|
printf("Destroy Sound Config Window\n");
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void ConsoleSndConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Sound Config Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void ConsoleSndConfDialog_t::closeWindow(void)
|
||||||
|
{
|
||||||
|
//printf("Sound Close Window\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void ConsoleSndConfDialog_t::setCheckBoxFromProperty( QCheckBox *cbx, const char *property )
|
void ConsoleSndConfDialog_t::setCheckBoxFromProperty( QCheckBox *cbx, const char *property )
|
||||||
|
|
|
@ -25,6 +25,8 @@ class ConsoleSndConfDialog_t : public QDialog
|
||||||
~ConsoleSndConfDialog_t(void);
|
~ConsoleSndConfDialog_t(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
QCheckBox *enaChkbox;
|
QCheckBox *enaChkbox;
|
||||||
QCheckBox *enaLowPass;
|
QCheckBox *enaLowPass;
|
||||||
QCheckBox *swapDutyChkbox;
|
QCheckBox *swapDutyChkbox;
|
||||||
|
@ -44,6 +46,7 @@ class ConsoleSndConfDialog_t : public QDialog
|
||||||
void setSliderFromProperty( QSlider *slider, QLabel *lbl, const char *property );
|
void setSliderFromProperty( QSlider *slider, QLabel *lbl, const char *property );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void closeWindow(void);
|
||||||
void bufSizeChanged(int value);
|
void bufSizeChanged(int value);
|
||||||
void volumeChanged(int value);
|
void volumeChanged(int value);
|
||||||
void triangleChanged(int value);
|
void triangleChanged(int value);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "../../fceu.h"
|
||||||
#include "Qt/ConsoleUtilities.h"
|
#include "Qt/ConsoleUtilities.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -35,3 +36,50 @@ int getDirFromFile( const char *path, char *dir )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
const char *getRomFile( void )
|
||||||
|
{
|
||||||
|
if ( GameInfo )
|
||||||
|
{
|
||||||
|
return GameInfo->filename;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
// Return file base name stripping out preceding path and trailing suffix.
|
||||||
|
int getFileBaseName( const char *filepath, char *base )
|
||||||
|
{
|
||||||
|
int i=0,j=0,end=0;
|
||||||
|
if ( filepath == NULL )
|
||||||
|
{
|
||||||
|
base[0] = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
i=0; j=0;
|
||||||
|
while ( filepath[i] != 0 )
|
||||||
|
{
|
||||||
|
if ( (filepath[i] == '/') || (filepath[i] == '\\') )
|
||||||
|
{
|
||||||
|
j = i;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
i = j;
|
||||||
|
|
||||||
|
j=0;
|
||||||
|
while ( filepath[i] != 0 )
|
||||||
|
{
|
||||||
|
base[j] = filepath[i]; i++; j++;
|
||||||
|
}
|
||||||
|
base[j] = 0; end=j;
|
||||||
|
|
||||||
|
while ( j > 1 )
|
||||||
|
{
|
||||||
|
j--;
|
||||||
|
if ( base[j] == '.' )
|
||||||
|
{
|
||||||
|
end=j; base[j] = 0; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
// ConsoleUtilities.h
|
// ConsoleUtilities.h
|
||||||
|
|
||||||
int getDirFromFile( const char *path, char *dir );
|
int getDirFromFile( const char *path, char *dir );
|
||||||
|
|
||||||
|
const char *getRomFile( void );
|
||||||
|
|
||||||
|
int getFileBaseName( const char *filepath, char *base );
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// ConsoleVideoConf.cpp
|
// ConsoleVideoConf.cpp
|
||||||
//
|
//
|
||||||
|
#include <QCloseEvent>
|
||||||
|
|
||||||
#include "../../fceu.h"
|
#include "../../fceu.h"
|
||||||
#include "Qt/main.h"
|
#include "Qt/main.h"
|
||||||
#include "Qt/dface.h"
|
#include "Qt/dface.h"
|
||||||
|
@ -105,7 +107,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
|
|
||||||
button = new QPushButton( tr("Close") );
|
button = new QPushButton( tr("Close") );
|
||||||
hbox1->addWidget( button );
|
hbox1->addWidget( button );
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(closewindow(void)) );
|
connect(button, SIGNAL(clicked()), this, SLOT(closeWindow(void)) );
|
||||||
|
|
||||||
main_vbox->addLayout( hbox1 );
|
main_vbox->addLayout( hbox1 );
|
||||||
|
|
||||||
|
@ -115,8 +117,24 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
ConsoleVideoConfDialog_t::~ConsoleVideoConfDialog_t(void)
|
ConsoleVideoConfDialog_t::~ConsoleVideoConfDialog_t(void)
|
||||||
{
|
{
|
||||||
|
printf("Destroy Video Config Window\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void ConsoleVideoConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Video Config Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void ConsoleVideoConfDialog_t::closeWindow(void)
|
||||||
|
{
|
||||||
|
//printf("Video Config Close Window\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void ConsoleVideoConfDialog_t::resetVideo(void)
|
void ConsoleVideoConfDialog_t::resetVideo(void)
|
||||||
{
|
{
|
||||||
|
@ -237,8 +255,3 @@ void ConsoleVideoConfDialog_t::applyChanges( void )
|
||||||
resetVideo();
|
resetVideo();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void ConsoleVideoConfDialog_t::closewindow( void )
|
|
||||||
{
|
|
||||||
done(0);
|
|
||||||
}
|
|
||||||
//----------------------------------------------------
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
~ConsoleVideoConfDialog_t(void);
|
~ConsoleVideoConfDialog_t(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *bar);
|
||||||
|
|
||||||
QComboBox *driverSelect;
|
QComboBox *driverSelect;
|
||||||
QComboBox *regionSelect;
|
QComboBox *regionSelect;
|
||||||
QCheckBox *gl_LF_chkBox;
|
QCheckBox *gl_LF_chkBox;
|
||||||
|
@ -40,6 +42,9 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
|
|
||||||
void resetVideo(void);
|
void resetVideo(void);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void closeWindow(void);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void use_new_PPU_changed( int value );
|
void use_new_PPU_changed( int value );
|
||||||
void frameskip_changed( int value );
|
void frameskip_changed( int value );
|
||||||
|
@ -49,7 +54,6 @@ class ConsoleVideoConfDialog_t : public QDialog
|
||||||
void regionChanged(int index);
|
void regionChanged(int index);
|
||||||
void driverChanged(int index);
|
void driverChanged(int index);
|
||||||
void applyChanges( void );
|
void applyChanges( void );
|
||||||
void closewindow( void );
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "Qt/GuiConf.h"
|
#include "Qt/GuiConf.h"
|
||||||
#include "Qt/LuaControl.h"
|
#include "Qt/LuaControl.h"
|
||||||
#include "Qt/CheatsConf.h"
|
#include "Qt/CheatsConf.h"
|
||||||
|
#include "Qt/HexEditor.h"
|
||||||
#include "Qt/ConsoleUtilities.h"
|
#include "Qt/ConsoleUtilities.h"
|
||||||
#include "Qt/ConsoleSoundConf.h"
|
#include "Qt/ConsoleSoundConf.h"
|
||||||
#include "Qt/ConsoleVideoConf.h"
|
#include "Qt/ConsoleVideoConf.h"
|
||||||
|
@ -74,8 +75,6 @@ consoleWin_t::consoleWin_t(QWidget *parent)
|
||||||
|
|
||||||
emulatorThread->start();
|
emulatorThread->start();
|
||||||
|
|
||||||
gamePadConfWin = NULL;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
consoleWin_t::~consoleWin_t(void)
|
consoleWin_t::~consoleWin_t(void)
|
||||||
|
@ -84,10 +83,8 @@ consoleWin_t::~consoleWin_t(void)
|
||||||
|
|
||||||
gameTimer->stop();
|
gameTimer->stop();
|
||||||
|
|
||||||
if ( gamePadConfWin != NULL )
|
closeGamePadConfWindow();
|
||||||
{
|
|
||||||
gamePadConfWin->closeWindow();
|
|
||||||
}
|
|
||||||
fceuWrapperLock();
|
fceuWrapperLock();
|
||||||
fceuWrapperClose();
|
fceuWrapperClose();
|
||||||
fceuWrapperUnLock();
|
fceuWrapperUnLock();
|
||||||
|
@ -143,11 +140,8 @@ void consoleWin_t::QueueErrorMsgWindow( const char *msg )
|
||||||
void consoleWin_t::closeEvent(QCloseEvent *event)
|
void consoleWin_t::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
//printf("Main Window Close Event\n");
|
//printf("Main Window Close Event\n");
|
||||||
if ( gamePadConfWin != NULL )
|
closeGamePadConfWindow();
|
||||||
{
|
|
||||||
//printf("Command Game Pad Close\n");
|
|
||||||
gamePadConfWin->closeWindow();
|
|
||||||
}
|
|
||||||
event->accept();
|
event->accept();
|
||||||
|
|
||||||
closeApp();
|
closeApp();
|
||||||
|
@ -484,6 +478,18 @@ void consoleWin_t::createMainMenu(void)
|
||||||
|
|
||||||
toolsMenu->addAction(cheatsAct);
|
toolsMenu->addAction(cheatsAct);
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------
|
||||||
|
// Debug
|
||||||
|
debugMenu = menuBar()->addMenu(tr("Debug"));
|
||||||
|
|
||||||
|
// Debug -> Hex Editor
|
||||||
|
hexEditAct = new QAction(tr("Hex Editor..."), this);
|
||||||
|
//hexEditAct->setShortcut( QKeySequence(tr("Shift+F7")));
|
||||||
|
hexEditAct->setStatusTip(tr("Open Memory Hex Editor"));
|
||||||
|
connect(hexEditAct, SIGNAL(triggered()), this, SLOT(openHexEditor(void)) );
|
||||||
|
|
||||||
|
debugMenu->addAction(hexEditAct);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Movie
|
// Movie
|
||||||
movieMenu = menuBar()->addMenu(tr("Movie"));
|
movieMenu = menuBar()->addMenu(tr("Movie"));
|
||||||
|
@ -888,30 +894,14 @@ void consoleWin_t::loadLua(void)
|
||||||
luaCtrlWin = new LuaControlDialog_t(this);
|
luaCtrlWin = new LuaControlDialog_t(this);
|
||||||
|
|
||||||
luaCtrlWin->show();
|
luaCtrlWin->show();
|
||||||
luaCtrlWin->exec();
|
|
||||||
|
|
||||||
delete luaCtrlWin;
|
|
||||||
|
|
||||||
//printf("Lua Control Window Destroyed\n");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openGamePadConfWin(void)
|
void consoleWin_t::openGamePadConfWin(void)
|
||||||
{
|
{
|
||||||
if ( gamePadConfWin != NULL )
|
|
||||||
{
|
|
||||||
printf("GamePad Config Window Already Open\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//printf("Open GamePad Config Window\n");
|
//printf("Open GamePad Config Window\n");
|
||||||
gamePadConfWin = new GamePadConfDialog_t(this);
|
|
||||||
|
|
||||||
gamePadConfWin->show();
|
openGamePadConfWindow(this);
|
||||||
gamePadConfWin->exec();
|
|
||||||
|
|
||||||
delete gamePadConfWin;
|
|
||||||
gamePadConfWin = NULL;
|
|
||||||
//printf("GamePad Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openGameSndConfWin(void)
|
void consoleWin_t::openGameSndConfWin(void)
|
||||||
|
@ -923,11 +913,6 @@ void consoleWin_t::openGameSndConfWin(void)
|
||||||
sndConfWin = new ConsoleSndConfDialog_t(this);
|
sndConfWin = new ConsoleSndConfDialog_t(this);
|
||||||
|
|
||||||
sndConfWin->show();
|
sndConfWin->show();
|
||||||
sndConfWin->exec();
|
|
||||||
|
|
||||||
delete sndConfWin;
|
|
||||||
|
|
||||||
//printf("Sound Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openGameVideoConfWin(void)
|
void consoleWin_t::openGameVideoConfWin(void)
|
||||||
|
@ -939,11 +924,6 @@ void consoleWin_t::openGameVideoConfWin(void)
|
||||||
vidConfWin = new ConsoleVideoConfDialog_t(this);
|
vidConfWin = new ConsoleVideoConfDialog_t(this);
|
||||||
|
|
||||||
vidConfWin->show();
|
vidConfWin->show();
|
||||||
vidConfWin->exec();
|
|
||||||
|
|
||||||
delete vidConfWin;
|
|
||||||
|
|
||||||
//printf("Video Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openHotkeyConfWin(void)
|
void consoleWin_t::openHotkeyConfWin(void)
|
||||||
|
@ -955,11 +935,6 @@ void consoleWin_t::openHotkeyConfWin(void)
|
||||||
hkConfWin = new HotKeyConfDialog_t(this);
|
hkConfWin = new HotKeyConfDialog_t(this);
|
||||||
|
|
||||||
hkConfWin->show();
|
hkConfWin->show();
|
||||||
hkConfWin->exec();
|
|
||||||
|
|
||||||
delete hkConfWin;
|
|
||||||
|
|
||||||
//printf("Hotkey Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openPaletteConfWin(void)
|
void consoleWin_t::openPaletteConfWin(void)
|
||||||
|
@ -971,11 +946,6 @@ void consoleWin_t::openPaletteConfWin(void)
|
||||||
paletteConfWin = new PaletteConfDialog_t(this);
|
paletteConfWin = new PaletteConfDialog_t(this);
|
||||||
|
|
||||||
paletteConfWin->show();
|
paletteConfWin->show();
|
||||||
paletteConfWin->exec();
|
|
||||||
|
|
||||||
delete paletteConfWin;
|
|
||||||
|
|
||||||
//printf("Palette Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openGuiConfWin(void)
|
void consoleWin_t::openGuiConfWin(void)
|
||||||
|
@ -987,11 +957,6 @@ void consoleWin_t::openGuiConfWin(void)
|
||||||
guiConfWin = new GuiConfDialog_t(this);
|
guiConfWin = new GuiConfDialog_t(this);
|
||||||
|
|
||||||
guiConfWin->show();
|
guiConfWin->show();
|
||||||
guiConfWin->exec();
|
|
||||||
|
|
||||||
delete guiConfWin;
|
|
||||||
|
|
||||||
//printf("GUI Config Window Destroyed\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::openCheats(void)
|
void consoleWin_t::openCheats(void)
|
||||||
|
@ -1003,11 +968,17 @@ void consoleWin_t::openCheats(void)
|
||||||
cheatWin = new GuiCheatsDialog_t(this);
|
cheatWin = new GuiCheatsDialog_t(this);
|
||||||
|
|
||||||
cheatWin->show();
|
cheatWin->show();
|
||||||
cheatWin->exec();
|
}
|
||||||
|
|
||||||
delete cheatWin;
|
void consoleWin_t::openHexEditor(void)
|
||||||
|
{
|
||||||
|
HexEditorDialog_t *hexEditWin;
|
||||||
|
|
||||||
//printf("GUI Cheat Window Destroyed\n");
|
//printf("Open GUI Hex Editor Window\n");
|
||||||
|
|
||||||
|
hexEditWin = new HexEditorDialog_t(this);
|
||||||
|
|
||||||
|
hexEditWin->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void consoleWin_t::toggleAutoResume(void)
|
void consoleWin_t::toggleAutoResume(void)
|
||||||
|
@ -1383,11 +1354,6 @@ void consoleWin_t::aboutFCEUX(void)
|
||||||
aboutWin = new AboutWindow(this);
|
aboutWin = new AboutWindow(this);
|
||||||
|
|
||||||
aboutWin->show();
|
aboutWin->show();
|
||||||
aboutWin->exec();
|
|
||||||
|
|
||||||
delete aboutWin;
|
|
||||||
|
|
||||||
//printf("About Window Destroyed\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ class consoleWin_t : public QMainWindow
|
||||||
QMenu *optMenu;
|
QMenu *optMenu;
|
||||||
QMenu *emuMenu;
|
QMenu *emuMenu;
|
||||||
QMenu *toolsMenu;
|
QMenu *toolsMenu;
|
||||||
|
QMenu *debugMenu;
|
||||||
QMenu *movieMenu;
|
QMenu *movieMenu;
|
||||||
QMenu *helpMenu;
|
QMenu *helpMenu;
|
||||||
|
|
||||||
|
@ -88,6 +89,7 @@ class consoleWin_t : public QMainWindow
|
||||||
QAction *fdsEjectAct;
|
QAction *fdsEjectAct;
|
||||||
QAction *fdsLoadBiosAct;
|
QAction *fdsLoadBiosAct;
|
||||||
QAction *cheatsAct;
|
QAction *cheatsAct;
|
||||||
|
QAction *hexEditAct;
|
||||||
QAction *openMovAct;
|
QAction *openMovAct;
|
||||||
QAction *stopMovAct;
|
QAction *stopMovAct;
|
||||||
QAction *recMovAct;
|
QAction *recMovAct;
|
||||||
|
@ -97,8 +99,6 @@ class consoleWin_t : public QMainWindow
|
||||||
|
|
||||||
emulatorThread_t *emulatorThread;
|
emulatorThread_t *emulatorThread;
|
||||||
|
|
||||||
GamePadConfDialog_t *gamePadConfWin;
|
|
||||||
|
|
||||||
std::string errorMsg;
|
std::string errorMsg;
|
||||||
bool errorMsgValid;
|
bool errorMsgValid;
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ class consoleWin_t : public QMainWindow
|
||||||
void fdsEjectDisk(void);
|
void fdsEjectDisk(void);
|
||||||
void fdsLoadBiosFile(void);
|
void fdsLoadBiosFile(void);
|
||||||
void openCheats(void);
|
void openCheats(void);
|
||||||
|
void openHexEditor(void);
|
||||||
void openMovie(void);
|
void openMovie(void);
|
||||||
void stopMovie(void);
|
void stopMovie(void);
|
||||||
void recordMovie(void);
|
void recordMovie(void);
|
||||||
|
|
|
@ -36,6 +36,30 @@ struct GamePadConfigLocalData_t
|
||||||
|
|
||||||
static GamePadConfigLocalData_t lcl[GAMEPAD_NUM_DEVICES];
|
static GamePadConfigLocalData_t lcl[GAMEPAD_NUM_DEVICES];
|
||||||
|
|
||||||
|
static GamePadConfDialog_t *gamePadConfWin = NULL;
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
int openGamePadConfWindow( QWidget *parent )
|
||||||
|
{
|
||||||
|
if ( gamePadConfWin != NULL )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
gamePadConfWin = new GamePadConfDialog_t(parent);
|
||||||
|
|
||||||
|
gamePadConfWin->show();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
|
int closeGamePadConfWindow(void)
|
||||||
|
{
|
||||||
|
if ( gamePadConfWin != NULL )
|
||||||
|
{
|
||||||
|
gamePadConfWin->closeWindow();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
: QDialog( parent )
|
: QDialog( parent )
|
||||||
|
@ -56,6 +80,8 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
std::string prefix;
|
std::string prefix;
|
||||||
char stmp[256];
|
char stmp[256];
|
||||||
|
|
||||||
|
gamePadConfWin = this;
|
||||||
|
|
||||||
// Ensure that joysticks are enabled, no harm calling init again.
|
// Ensure that joysticks are enabled, no harm calling init again.
|
||||||
InitJoysticks();
|
InitJoysticks();
|
||||||
|
|
||||||
|
@ -279,6 +305,9 @@ GamePadConfDialog_t::~GamePadConfDialog_t(void)
|
||||||
{
|
{
|
||||||
inputTimer->stop();
|
inputTimer->stop();
|
||||||
buttonConfigStatus = 0;
|
buttonConfigStatus = 0;
|
||||||
|
gamePadConfWin = NULL;
|
||||||
|
|
||||||
|
printf("GamePad Window Deleted\n");
|
||||||
}
|
}
|
||||||
void GamePadConfDialog_t::keyPressEvent(QKeyEvent *event)
|
void GamePadConfDialog_t::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
|
@ -500,6 +529,7 @@ void GamePadConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
printf("GamePad Close Window Event\n");
|
printf("GamePad Close Window Event\n");
|
||||||
buttonConfigStatus = 0;
|
buttonConfigStatus = 0;
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
@ -510,6 +540,7 @@ void GamePadConfDialog_t::closeWindow(void)
|
||||||
printf("Close Window\n");
|
printf("Close Window\n");
|
||||||
buttonConfigStatus = 0;
|
buttonConfigStatus = 0;
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void GamePadConfDialog_t::changeButton0(void)
|
void GamePadConfDialog_t::changeButton0(void)
|
||||||
|
|
|
@ -99,3 +99,7 @@ class GamePadConfDialog_t : public QDialog
|
||||||
void updatePeriodic(void);
|
void updatePeriodic(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int openGamePadConfWindow( QWidget *parent );
|
||||||
|
|
||||||
|
int closeGamePadConfWindow(void);
|
||||||
|
|
|
@ -46,13 +46,22 @@ GuiConfDialog_t::GuiConfDialog_t(QWidget *parent)
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
GuiConfDialog_t::~GuiConfDialog_t(void)
|
GuiConfDialog_t::~GuiConfDialog_t(void)
|
||||||
{
|
{
|
||||||
|
printf("Destroy GUI Config Close Window\n");
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void GuiConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("GUI Config Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void GuiConfDialog_t::closeWindow(void)
|
void GuiConfDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Close Window\n");
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void GuiConfDialog_t::useNativeFileDialogChanged(int state)
|
void GuiConfDialog_t::useNativeFileDialogChanged(int state)
|
||||||
|
|
|
@ -26,6 +26,8 @@ class GuiConfDialog_t : public QDialog
|
||||||
~GuiConfDialog_t(void);
|
~GuiConfDialog_t(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
QCheckBox *useNativeFileDialog;
|
QCheckBox *useNativeFileDialog;
|
||||||
QCheckBox *useNativeMenuBar;
|
QCheckBox *useNativeMenuBar;
|
||||||
private:
|
private:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,171 @@
|
||||||
|
// GamePadConf.h
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QFrame>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QPlainTextEdit>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
|
||||||
|
struct memByte_t
|
||||||
|
{
|
||||||
|
unsigned char data;
|
||||||
|
unsigned char color;
|
||||||
|
unsigned char actv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct memBlock_t
|
||||||
|
{
|
||||||
|
memBlock_t(void);
|
||||||
|
~memBlock_t(void);
|
||||||
|
|
||||||
|
void init(void);
|
||||||
|
int size(void){ return _size; }
|
||||||
|
int numLines(void){ return _maxLines; }
|
||||||
|
int reAlloc( int newSize );
|
||||||
|
void setAccessFunc( int (*newMemAccessFunc)( unsigned int offset) );
|
||||||
|
|
||||||
|
struct memByte_t *buf;
|
||||||
|
int _size;
|
||||||
|
int _maxLines;
|
||||||
|
int (*memAccessFunc)( unsigned int offset);
|
||||||
|
};
|
||||||
|
|
||||||
|
class QHexEdit : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
QHexEdit(QWidget *parent = 0);
|
||||||
|
~QHexEdit(void);
|
||||||
|
|
||||||
|
int getMode(void){ return viewMode; };
|
||||||
|
void setMode( int mode );
|
||||||
|
void setLine( int newLineOffset );
|
||||||
|
void setAddr( int newAddrOffset );
|
||||||
|
void setScrollBars( QScrollBar *h, QScrollBar *v );
|
||||||
|
void setHorzScroll( int value );
|
||||||
|
void setHighlightActivity( int enable );
|
||||||
|
void setHighlightReverseVideo( int enable );
|
||||||
|
void setForeGroundColor( QColor fg );
|
||||||
|
void setBackGroundColor( QColor bg );
|
||||||
|
void memModeUpdate(void);
|
||||||
|
int checkMemActivity(void);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MODE_NES_RAM = 0,
|
||||||
|
MODE_NES_PPU,
|
||||||
|
MODE_NES_OAM,
|
||||||
|
MODE_NES_ROM
|
||||||
|
};
|
||||||
|
static const int HIGHLIGHT_ACTIVITY_NUM_COLORS = 16;
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
void keyReleaseEvent(QKeyEvent *event);
|
||||||
|
void mousePressEvent(QMouseEvent * event);
|
||||||
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *event);
|
||||||
|
|
||||||
|
void calcFontData(void);
|
||||||
|
void resetCursor(void);
|
||||||
|
QPoint convPixToCursor( QPoint p );
|
||||||
|
int convPixToAddr( QPoint p );
|
||||||
|
|
||||||
|
QFont font;
|
||||||
|
|
||||||
|
memBlock_t mb;
|
||||||
|
int (*memAccessFunc)( unsigned int offset);
|
||||||
|
|
||||||
|
QScrollBar *vbar;
|
||||||
|
QScrollBar *hbar;
|
||||||
|
QColor highLightColor[ HIGHLIGHT_ACTIVITY_NUM_COLORS ];
|
||||||
|
QColor rvActvTextColor[ HIGHLIGHT_ACTIVITY_NUM_COLORS ];
|
||||||
|
|
||||||
|
uint64_t total_instructions_lp;
|
||||||
|
|
||||||
|
int viewMode;
|
||||||
|
int lineOffset;
|
||||||
|
int pxCharWidth;
|
||||||
|
int pxCharHeight;
|
||||||
|
int pxCursorHeight;
|
||||||
|
int pxLineSpacing;
|
||||||
|
int pxLineLead;
|
||||||
|
int pxLineWidth;
|
||||||
|
int pxLineXScroll;
|
||||||
|
int pxXoffset;
|
||||||
|
int pxYoffset;
|
||||||
|
int pxHexOffset;
|
||||||
|
int pxHexAscii;
|
||||||
|
int cursorPosX;
|
||||||
|
int cursorPosY;
|
||||||
|
int cursorBlinkCount;
|
||||||
|
int viewLines;
|
||||||
|
int viewWidth;
|
||||||
|
int viewHeight;
|
||||||
|
int maxLineOffset;
|
||||||
|
int editAddr;
|
||||||
|
int editValue;
|
||||||
|
int editMask;
|
||||||
|
int jumpToRomValue;
|
||||||
|
|
||||||
|
bool cursorBlink;
|
||||||
|
bool reverseVideo;
|
||||||
|
bool actvHighlightEnable;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void jumpToROM(void);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class HexEditorDialog_t : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
HexEditorDialog_t(QWidget *parent = 0);
|
||||||
|
~HexEditorDialog_t(void);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *bar);
|
||||||
|
|
||||||
|
void gotoAddress(int newAddr);
|
||||||
|
void populateBookmarkMenu(void);
|
||||||
|
|
||||||
|
QScrollBar *vbar;
|
||||||
|
QScrollBar *hbar;
|
||||||
|
QHexEdit *editor;
|
||||||
|
QTimer *periodicTimer;
|
||||||
|
QMenu *bookmarkMenu;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void closeWindow(void);
|
||||||
|
private slots:
|
||||||
|
void updatePeriodic(void);
|
||||||
|
void vbarMoved(int value);
|
||||||
|
void vbarChanged(int value);
|
||||||
|
void hbarChanged(int value);
|
||||||
|
void saveRomFile(void);
|
||||||
|
void saveRomFileAs(void);
|
||||||
|
void setViewRAM(void);
|
||||||
|
void setViewPPU(void);
|
||||||
|
void setViewOAM(void);
|
||||||
|
void setViewROM(void);
|
||||||
|
void actvHighlightCB(bool value);
|
||||||
|
void actvHighlightRVCB(bool value);
|
||||||
|
void pickForeGroundColor(void);
|
||||||
|
void pickBackGroundColor(void);
|
||||||
|
};
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
#include <QCloseEvent>
|
||||||
|
|
||||||
#include "Qt/main.h"
|
#include "Qt/main.h"
|
||||||
#include "Qt/dface.h"
|
#include "Qt/dface.h"
|
||||||
|
@ -68,13 +69,22 @@ HotKeyConfDialog_t::HotKeyConfDialog_t(QWidget *parent)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
HotKeyConfDialog_t::~HotKeyConfDialog_t(void)
|
HotKeyConfDialog_t::~HotKeyConfDialog_t(void)
|
||||||
{
|
{
|
||||||
|
printf("Destroy Hot Key Config Window\n");
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void HotKeyConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Hot Key Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void HotKeyConfDialog_t::closeWindow(void)
|
void HotKeyConfDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Close Window\n");
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void HotKeyConfDialog_t::assignHotkey(QKeyEvent *event)
|
void HotKeyConfDialog_t::assignHotkey(QKeyEvent *event)
|
||||||
|
|
|
@ -27,6 +27,7 @@ class HotKeyConfDialog_t : public QDialog
|
||||||
~HotKeyConfDialog_t(void);
|
~HotKeyConfDialog_t(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
void keyReleaseEvent(QKeyEvent *event);
|
void keyReleaseEvent(QKeyEvent *event);
|
||||||
void assignHotkey(QKeyEvent *event);
|
void assignHotkey(QKeyEvent *event);
|
||||||
|
|
|
@ -102,6 +102,8 @@ LuaControlDialog_t::~LuaControlDialog_t(void)
|
||||||
{
|
{
|
||||||
std::list <LuaControlDialog_t*>::iterator it;
|
std::list <LuaControlDialog_t*>::iterator it;
|
||||||
|
|
||||||
|
printf("Destroy Lua Control Window\n");
|
||||||
|
|
||||||
for (it = winList.begin(); it != winList.end(); it++)
|
for (it = winList.begin(); it != winList.end(); it++)
|
||||||
{
|
{
|
||||||
if ( (*it) == this )
|
if ( (*it) == this )
|
||||||
|
@ -113,10 +115,19 @@ LuaControlDialog_t::~LuaControlDialog_t(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
void LuaControlDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Lua Control Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
//----------------------------------------------------
|
||||||
void LuaControlDialog_t::closeWindow(void)
|
void LuaControlDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Lua Control Close Window\n");
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void LuaControlDialog_t::openLuaScriptFile(void)
|
void LuaControlDialog_t::openLuaScriptFile(void)
|
||||||
|
|
|
@ -29,6 +29,8 @@ class LuaControlDialog_t : public QDialog
|
||||||
void refreshState(void);
|
void refreshState(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *bar);
|
||||||
|
|
||||||
QLineEdit *scriptPath;
|
QLineEdit *scriptPath;
|
||||||
QLineEdit *scriptArgs;
|
QLineEdit *scriptArgs;
|
||||||
QPushButton *browseButton;
|
QPushButton *browseButton;
|
||||||
|
|
|
@ -148,13 +148,22 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
PaletteConfDialog_t::~PaletteConfDialog_t(void)
|
PaletteConfDialog_t::~PaletteConfDialog_t(void)
|
||||||
{
|
{
|
||||||
|
printf("Destroy Palette Config Window\n");
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void PaletteConfDialog_t::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
printf("Palette Config Close Window Event\n");
|
||||||
|
done(0);
|
||||||
|
deleteLater();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void PaletteConfDialog_t::closeWindow(void)
|
void PaletteConfDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Close Window\n");
|
||||||
done(0);
|
done(0);
|
||||||
|
deleteLater();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
void PaletteConfDialog_t::hueChanged(int v)
|
void PaletteConfDialog_t::hueChanged(int v)
|
||||||
|
|
|
@ -26,6 +26,8 @@ class PaletteConfDialog_t : public QDialog
|
||||||
~PaletteConfDialog_t(void);
|
~PaletteConfDialog_t(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
QLineEdit *custom_palette_path;
|
QLineEdit *custom_palette_path;
|
||||||
QCheckBox *useCustom;
|
QCheckBox *useCustom;
|
||||||
QCheckBox *GrayScale;
|
QCheckBox *GrayScale;
|
||||||
|
|
|
@ -104,7 +104,8 @@ void FCEUD_PrintError(const char *errormsg)
|
||||||
*/
|
*/
|
||||||
FILE *FCEUD_UTF8fopen(const char *fn, const char *mode)
|
FILE *FCEUD_UTF8fopen(const char *fn, const char *mode)
|
||||||
{
|
{
|
||||||
return(fopen(fn,mode));
|
FILE *fp = ::fopen(fn,mode);
|
||||||
|
return(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1570,6 +1570,7 @@ const char * ButtonName (const ButtConfig * bc)
|
||||||
{
|
{
|
||||||
int joyNum, inputNum;
|
int joyNum, inputNum;
|
||||||
const char *inputType, *inputDirection;
|
const char *inputType, *inputDirection;
|
||||||
|
char direction[128] = "";
|
||||||
|
|
||||||
joyNum = bc->DeviceNum;
|
joyNum = bc->DeviceNum;
|
||||||
|
|
||||||
|
@ -1582,7 +1583,6 @@ const char * ButtonName (const ButtConfig * bc)
|
||||||
else if (bc->ButtonNum & 0x2000)
|
else if (bc->ButtonNum & 0x2000)
|
||||||
{
|
{
|
||||||
int inputValue;
|
int inputValue;
|
||||||
char direction[128] = "";
|
|
||||||
|
|
||||||
inputType = "Hat";
|
inputType = "Hat";
|
||||||
inputNum = (bc->ButtonNum >> 8) & 0x1F;
|
inputNum = (bc->ButtonNum >> 8) & 0x1F;
|
||||||
|
|
|
@ -956,7 +956,7 @@ init_ok:
|
||||||
}
|
}
|
||||||
|
|
||||||
// bbit edited: the whole function below was added
|
// bbit edited: the whole function below was added
|
||||||
int iNesSave() {
|
int iNesSave(void) {
|
||||||
char name[2048];
|
char name[2048];
|
||||||
|
|
||||||
strcpy(name, LoadedRomFName);
|
strcpy(name, LoadedRomFName);
|
||||||
|
@ -967,7 +967,7 @@ int iNesSave() {
|
||||||
return iNesSaveAs(name);
|
return iNesSaveAs(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int iNesSaveAs(char* name)
|
int iNesSaveAs(const char* name)
|
||||||
{
|
{
|
||||||
//adelikat: TODO: iNesSave() and this have pretty much the same code, outsource the common code to a single function
|
//adelikat: TODO: iNesSave() and this have pretty much the same code, outsource the common code to a single function
|
||||||
//caitsith2: done. iNesSave() now gets filename and calls iNesSaveAs with that filename.
|
//caitsith2: done. iNesSave() now gets filename and calls iNesSaveAs with that filename.
|
||||||
|
|
|
@ -43,8 +43,8 @@ extern uint8 *VROM;
|
||||||
extern uint32 VROM_size;
|
extern uint32 VROM_size;
|
||||||
extern uint32 ROM_size;
|
extern uint32 ROM_size;
|
||||||
extern uint8 *ExtraNTARAM;
|
extern uint8 *ExtraNTARAM;
|
||||||
extern int iNesSave(); //bbit Edited: line added
|
extern int iNesSave(void); //bbit Edited: line added
|
||||||
extern int iNesSaveAs(char* name);
|
extern int iNesSaveAs(const char* name);
|
||||||
extern char LoadedRomFName[2048]; //bbit Edited: line added
|
extern char LoadedRomFName[2048]; //bbit Edited: line added
|
||||||
extern const TMasterRomInfo* MasterRomInfo;
|
extern const TMasterRomInfo* MasterRomInfo;
|
||||||
extern TMasterRomInfoParams MasterRomInfoParams;
|
extern TMasterRomInfoParams MasterRomInfoParams;
|
||||||
|
|
Loading…
Reference in New Issue