sdl: added support for prescale2x/3x/4x
This commit is contained in:
parent
5ecf5060ab
commit
640f292d86
|
@ -832,24 +832,31 @@ void resizeGtkWindow()
|
||||||
|
|
||||||
void setScaler(GtkWidget* w, gpointer p)
|
void setScaler(GtkWidget* w, gpointer p)
|
||||||
{
|
{
|
||||||
int x = gtk_combo_box_get_active(GTK_COMBO_BOX(w));
|
int scaler = gtk_combo_box_get_active(GTK_COMBO_BOX(w));
|
||||||
g_config->setOption("SDL.SpecialFilter", x);
|
g_config->setOption("SDL.SpecialFilter", scaler);
|
||||||
|
|
||||||
// 1 - hq2x 2 - Scale2x 3 - NTSC2x 4 - hq3x 5 - Scale3x
|
// 1=hq2x 2=Scale2x 3=NTSC2x 4=hq3x 5=Scale3x 6=Prescale2x 7=Prescale3x 8=Prescale4x 9=pal
|
||||||
if (x >= 1 && x <= 3)
|
switch(scaler)
|
||||||
{
|
|
||||||
g_config->setOption("SDL.XScale", 2.0);
|
|
||||||
g_config->setOption("SDL.YScale", 2.0);
|
|
||||||
resizeGtkWindow();
|
|
||||||
}
|
|
||||||
if (x >= 4 && x < 6)
|
|
||||||
{
|
{
|
||||||
|
case 4: // hq3x
|
||||||
|
case 5: // scale3x
|
||||||
|
case 7: // prescale3x
|
||||||
g_config->setOption("SDL.XScale", 3.0);
|
g_config->setOption("SDL.XScale", 3.0);
|
||||||
g_config->setOption("SDL.YScale", 3.0);
|
g_config->setOption("SDL.YScale", 3.0);
|
||||||
resizeGtkWindow();
|
resizeGtkWindow();
|
||||||
|
break;
|
||||||
|
case 8: // prescale4x
|
||||||
|
g_config->setOption("SDL.XScale", 4.0);
|
||||||
|
g_config->setOption("SDL.YScale", 4.0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_config->setOption("SDL.XScale", 2.0);
|
||||||
|
g_config->setOption("SDL.YScale", 2.0);
|
||||||
|
resizeGtkWindow();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
g_config->save();
|
|
||||||
|
|
||||||
|
g_config->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setRegion(GtkWidget* w, gpointer p)
|
void setRegion(GtkWidget* w, gpointer p)
|
||||||
|
@ -949,6 +956,10 @@ void openVideoConfig()
|
||||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "NTSC 2x");
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "NTSC 2x");
|
||||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "hq3x");
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "hq3x");
|
||||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "scale3x");
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "scale3x");
|
||||||
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "prescale2x");
|
||||||
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "prescale3x");
|
||||||
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "prescale4x");
|
||||||
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(scalerCombo), "pal");
|
||||||
|
|
||||||
// sync with cfg
|
// sync with cfg
|
||||||
int buf;
|
int buf;
|
||||||
|
|
|
@ -305,18 +305,6 @@ InitVideo(FCEUGI *gi)
|
||||||
desbpp = 0;
|
desbpp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -Video Modes Tag-
|
|
||||||
if(s_sponge) {
|
|
||||||
if(s_sponge == 4 || s_sponge == 5) {
|
|
||||||
s_exs = s_eys = 3;
|
|
||||||
} else {
|
|
||||||
s_exs = s_eys = 2;
|
|
||||||
}
|
|
||||||
s_eefx = 0;
|
|
||||||
if(s_sponge == 1 || s_sponge == 4) {
|
|
||||||
desbpp = 32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((s_useOpenGL && !xstretch) || !s_useOpenGL)
|
if((s_useOpenGL && !xstretch) || !s_useOpenGL)
|
||||||
#endif
|
#endif
|
||||||
|
@ -357,12 +345,28 @@ InitVideo(FCEUGI *gi)
|
||||||
|
|
||||||
// -Video Modes Tag-
|
// -Video Modes Tag-
|
||||||
if(s_sponge) {
|
if(s_sponge) {
|
||||||
if(s_sponge >= 4) {
|
if(s_sponge <= 3 && s_sponge >= 1)
|
||||||
s_exs = s_eys = 3;
|
{
|
||||||
} else {
|
|
||||||
s_exs = s_eys = 2;
|
s_exs = s_eys = 2;
|
||||||
|
} else if (s_sponge >=4 && s_sponge <= 5)
|
||||||
|
{
|
||||||
|
s_exs = s_eys = 3;
|
||||||
|
} else if (s_sponge >= 6 && s_sponge <= 8)
|
||||||
|
{
|
||||||
|
s_exs = s_eys = s_sponge - 4;
|
||||||
|
}
|
||||||
|
else if(s_sponge == 9)
|
||||||
|
{
|
||||||
|
s_exs = s_eys = 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s_exs = s_eys = 1;
|
||||||
}
|
}
|
||||||
s_eefx = 0;
|
s_eefx = 0;
|
||||||
|
if(s_sponge == 1 || s_sponge == 4) {
|
||||||
|
desbpp = 32;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENGL
|
#ifdef OPENGL
|
||||||
|
|
|
@ -104,8 +104,8 @@ static const char *DriverUsage=
|
||||||
"--fullscreen {0|1} Enable full screen mode.\n"
|
"--fullscreen {0|1} Enable full screen mode.\n"
|
||||||
"--noframe {0|1} Hide title bar and window decorations.\n"
|
"--noframe {0|1} Hide title bar and window decorations.\n"
|
||||||
"--special {1-4} Use special video scaling filters\n"
|
"--special {1-4} Use special video scaling filters\n"
|
||||||
" (1 = hq2x 2 = Scale2x 3 = NTSC 2x 4 = hq3x\n"
|
" (1 = hq2x; 2 = Scale2x; 3 = NTSC 2x; 4 = hq3x;\n"
|
||||||
" 5 = Scale3x)\n"
|
" 5 = Scale3x; 6 = Prescale2x; 7 = Prescale3x; 8=Precale4x; 9=PAL)\n"
|
||||||
"--palette f Load custom global palette from file f.\n"
|
"--palette f Load custom global palette from file f.\n"
|
||||||
"--sound {0|1} Enable sound.\n"
|
"--sound {0|1} Enable sound.\n"
|
||||||
"--soundrate x Set sound playback rate to x Hz.\n"
|
"--soundrate x Set sound playback rate to x Hz.\n"
|
||||||
|
|
Loading…
Reference in New Issue