Added new commandline option: --noframe

When enabled, this passed the SDL_NOFRAME flag when setting video.  This is useful for people who want to use fceux dual head.
This commit is contained in:
punkrockguy318 2008-06-14 04:41:46 +00:00
parent 62d4ca6cdb
commit f51b7f29aa
3 changed files with 9 additions and 1 deletions

View File

@ -155,6 +155,7 @@ InitConfig()
config->addOption("yscale", "SDL.YScale", 1.0);
config->addOption("xstretch", "SDL.XStretch", 0);
config->addOption("ystretch", "SDL.YStretch", 0);
config->addOption("noframe", "SDL.NoFrame", 0);
// OpenGL options
config->addOption("opengl", "SDL.OpenGL", 0);

View File

@ -57,6 +57,7 @@ static double s_exs, s_eys;
static int s_eefx;
static int s_clipSides;
static int s_fullscreen;
static int noframe;
#define NWIDTH (256 - (s_clipSides ? 16 : 0))
#define NOFFSET (s_clipSides ? 8 : 0)
@ -136,6 +137,7 @@ InitVideo(FCEUGI *gi)
g_config->getOption("SDL.XResolution", &xres);
g_config->getOption("SDL.YResolution", &yres);
g_config->getOption("SDL.ClipSides", &s_clipSides);
g_config->getOption("SDL.NoFrame", &noframe);
// check the starting, ending, and total scan lines
FCEUI_GetCurrentVidSystem(&s_srendline, &s_erendline);
@ -172,6 +174,10 @@ InitVideo(FCEUGI *gi)
if(s_fullscreen) {
flags |= SDL_FULLSCREEN;
}
if(noframe) {
flags |= SDL_NOFRAME;
}
// gives the SDL exclusive palette control... ensures the requested colors
flags |= SDL_HWPALETTE;
@ -280,7 +286,7 @@ InitVideo(FCEUGI *gi)
return -1;
}
#endif
s_screen = SDL_SetVideoMode((int)(NWIDTH * s_exs),
(int)(s_tlines * s_eys),
desbpp, flags);

View File

@ -63,6 +63,7 @@ char *DriverUsage=
--doublebuf x Enable SDL double-buffering if x is nonzero.\n\
--fullscreen x, -f x Select full screen mode if x is nonzero.\n\
--clipsides x Clip left- and rightmost 8 columns of pixels if x is nonzero.\n\
--noframe x Hides title bar and window decorations.\n\
--slstart x Set the first drawn emulated scanline. Valid values for x are\n\
0 through 239.\n\
--slend x Set the last drawn emulated scanline. Valid values for x are\n\