parent
9f9cb9c2fc
commit
d1bab4ef09
|
@ -157,6 +157,21 @@ void setScaler(GtkWidget* w, gpointer p)
|
||||||
g_config->setOption("SDL.SpecialFilter", x);
|
g_config->setOption("SDL.SpecialFilter", x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setPal(GtkWidget* w, gpointer p)
|
||||||
|
{
|
||||||
|
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
|
||||||
|
{
|
||||||
|
g_config->setOption("SDL.PAL", 1);
|
||||||
|
FCEUI_SetVidSystem(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_config->setOption("SDL.PAL", 0);
|
||||||
|
FCEUI_SetVidSystem(0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void setGL(GtkWidget* w, gpointer p)
|
void setGL(GtkWidget* w, gpointer p)
|
||||||
{
|
{
|
||||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
|
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
|
||||||
|
@ -174,6 +189,7 @@ void openVideoConfig()
|
||||||
GtkWidget* scalerLbl;
|
GtkWidget* scalerLbl;
|
||||||
GtkWidget* scalerCombo;
|
GtkWidget* scalerCombo;
|
||||||
GtkWidget* glChk;
|
GtkWidget* glChk;
|
||||||
|
GtkWidget* palChk;
|
||||||
|
|
||||||
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_title(GTK_WINDOW(win), "Video Prefernces");
|
gtk_window_set_title(GTK_WINDOW(win), "Video Prefernces");
|
||||||
|
@ -212,11 +228,23 @@ void openVideoConfig()
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glChk), 1);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glChk), 1);
|
||||||
else
|
else
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glChk), 0);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glChk), 0);
|
||||||
|
|
||||||
|
// PAL check
|
||||||
|
palChk = gtk_check_button_new_with_label("Enable PAL mode");
|
||||||
|
g_signal_connect(GTK_OBJECT(palChk), "clicked", G_CALLBACK(setPal), NULL);
|
||||||
|
|
||||||
|
// sync with config
|
||||||
|
g_config->getOption("SDL.PAL", &buf);
|
||||||
|
if(buf)
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(palChk), 1);
|
||||||
|
else
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(palChk), 0);
|
||||||
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), lbl, FALSE, FALSE, 2);
|
gtk_box_pack_start(GTK_BOX(vbox), lbl, FALSE, FALSE, 2);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 2);
|
gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 2);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), glChk, FALSE, FALSE, 2);
|
gtk_box_pack_start(GTK_BOX(vbox), glChk, FALSE, FALSE, 2);
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), palChk, FALSE, FALSE, 2);
|
||||||
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(win), vbox);
|
gtk_container_add(GTK_CONTAINER(win), vbox);
|
||||||
|
|
|
@ -133,7 +133,15 @@ inline double GetYScale(int yres)
|
||||||
{
|
{
|
||||||
return ((double)yres) / s_tlines;
|
return ((double)yres) / s_tlines;
|
||||||
}
|
}
|
||||||
|
void FCEUD_VideoChanged()
|
||||||
|
{
|
||||||
|
int buf;
|
||||||
|
g_config->getOption("SDL.PAL", &buf);
|
||||||
|
if(buf)
|
||||||
|
PAL = 1;
|
||||||
|
else
|
||||||
|
PAL = 0;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Attempts to initialize the graphical video display. Returns 0 on
|
* Attempts to initialize the graphical video display. Returns 0 on
|
||||||
* success, -1 on failure.
|
* success, -1 on failure.
|
||||||
|
|
|
@ -190,6 +190,15 @@ int LoadGame(const char *path)
|
||||||
if(!DriverInitialize(GameInfo)) {
|
if(!DriverInitialize(GameInfo)) {
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set pal/ntsc
|
||||||
|
int buf;
|
||||||
|
g_config->getOption("SDL.PAL", &buf);
|
||||||
|
if(buf)
|
||||||
|
FCEUI_SetVidSystem(1);
|
||||||
|
else
|
||||||
|
FCEUI_SetVidSystem(0);
|
||||||
|
|
||||||
|
|
||||||
g_config->getOption("SDL.SoundRecordFile", &filename);
|
g_config->getOption("SDL.SoundRecordFile", &filename);
|
||||||
if(filename.size()) {
|
if(filename.size()) {
|
||||||
|
@ -519,6 +528,7 @@ SDL_GL_LoadLibrary(0);
|
||||||
|
|
||||||
// Initialize the configuration system
|
// Initialize the configuration system
|
||||||
g_config = InitConfig();
|
g_config = InitConfig();
|
||||||
|
|
||||||
|
|
||||||
if(!g_config) {
|
if(!g_config) {
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
@ -532,7 +542,7 @@ SDL_GL_LoadLibrary(0);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int romIndex = g_config->parse(argc, argv);
|
int romIndex = g_config->parse(argc, argv);
|
||||||
|
|
||||||
//mbg 8/23/2008 - this is also here so that the inputcfg routines can have a chance to dump the new inputcfg to the fceux.cfg
|
//mbg 8/23/2008 - this is also here so that the inputcfg routines can have a chance to dump the new inputcfg to the fceux.cfg
|
||||||
|
@ -543,11 +553,14 @@ SDL_GL_LoadLibrary(0);
|
||||||
g_config->getOption("SDL.NoConfig", &noconfig);
|
g_config->getOption("SDL.NoConfig", &noconfig);
|
||||||
if (!noconfig)
|
if (!noconfig)
|
||||||
g_config->save();
|
g_config->save();
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
g_config->getOption("SDL.InputCfg", &s);
|
g_config->getOption("SDL.InputCfg", &s);
|
||||||
|
|
||||||
// update the input devices
|
// update the input devices
|
||||||
UpdateInput(g_config);
|
UpdateInput(g_config);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check for a .fcm file to convert to .fm2
|
// check for a .fcm file to convert to .fm2
|
||||||
g_config->getOption ("SDL.FCMConvert", &s);
|
g_config->getOption ("SDL.FCMConvert", &s);
|
||||||
|
@ -831,7 +844,6 @@ DUMMY(FCEUD_MovieReplayFrom)
|
||||||
DUMMY(FCEUD_ToggleStatusIcon)
|
DUMMY(FCEUD_ToggleStatusIcon)
|
||||||
DUMMY(FCEUD_AviRecordTo)
|
DUMMY(FCEUD_AviRecordTo)
|
||||||
DUMMY(FCEUD_AviStop)
|
DUMMY(FCEUD_AviStop)
|
||||||
DUMMY(FCEUD_VideoChanged);
|
|
||||||
void FCEUI_AviVideoUpdate(const unsigned char* buffer) { }
|
void FCEUI_AviVideoUpdate(const unsigned char* buffer) { }
|
||||||
int FCEUD_ShowStatusIcon(void) {return 0;}
|
int FCEUD_ShowStatusIcon(void) {return 0;}
|
||||||
bool FCEUI_AviIsRecording(void) {return false;}
|
bool FCEUI_AviIsRecording(void) {return false;}
|
||||||
|
|
Loading…
Reference in New Issue