Item | Brief description | For more information, see CommandLine |
Renderer (*) | use specified rendering mode (requires restart) | -video |
- TIA Filter | filter for emulation mode | -tia_filter |
+ TIA Filter | filter for emulation mode | -tia.filter |
TIA Palette | palette for emulation mode | -palette |
Fullscrn Res | resolution for fullscreen mode | -fullres |
Timing (*) | how to wait between frames (requires restart) | -timing |
GL Filter | OpenGL filter mode | -gl_filter |
- GL Aspect (N) | OpenGL width of TIA image in NTSC mode | -gl_aspectn |
- GL Aspect (P) | OpenGL width of TIA image in PAL mode | -gl_aspectp |
+ Aspect (N) | Width of TIA image in NTSC mode | -tia.aspectn |
+ Aspect (P) | Width of TIA image in PAL mode | -tia.aspectp |
Framerate | frames per second in emulation mode | -framerate |
Fullscreen mode | self-explanatory | -fullscreen |
GL FS Stretch | stretch fullscreen OpenGL in emulation mode | -gl_fsmax |
- GL VBO | enable OpenGL Vertex Buffer Objects | -gl_vbo |
- GL VSync | enable OpenGL vertical synchronization | -gl_vsync |
+ VSync | enable vertical sync'ed updates | -vsync |
PAL color-loss | use PAL color-loss effect | -colorloss |
Fast SC/AR BIOS | skip progress loading bars for SuperCharger ROMs | -fastscbios |
Show UI messages | overlay UI messages onscreen | -uimessages |
@@ -2417,10 +2399,10 @@
Item | Brief description | For more information, see CommandLine |
- TV Mode | disable TV effects, or select TV preset | -tv_filter |
- Scanline Intensity | sets scanline black-level intensity | -tv_scanlines |
- Scanline Interpolation | smooth/blend scanlines into image | -tv_scaninter |
- Adjustable sliders | set specific attribute in 'Custom' mode | -tv_contrast, tv_hue, etc. |
+ TV Mode | disable TV effects, or select TV preset | -tv.filter |
+ Scanline Intensity | sets scanline black-level intensity | -tv.scanlines |
+ Scanline Interpolation | smooth/blend scanlines into image | -tv.scaninter |
+ Adjustable sliders | set specific attribute in 'Custom' mode | -tv.contrast, tv.hue, etc. |
Clone Composite | copy 'Composite' attributes to 'Custom' sliders | |
Clone S-Video | copy 'S-Video' attributes to 'Custom' sliders | |
Clone RGB | copy 'RGB' attributes to 'Custom' sliders | |
diff --git a/src/common/FBSurfaceTIA.cxx b/src/common/FBSurfaceTIA.cxx
index 1d4f1f38f..1fe683835 100644
--- a/src/common/FBSurfaceTIA.cxx
+++ b/src/common/FBSurfaceTIA.cxx
@@ -39,17 +39,17 @@ FBSurfaceTIA::FBSurfaceTIA(FrameBufferSDL2& buffer)
int height = 320;
// Create a surface in the same format as the parent GL class
- const SDL_PixelFormat& pf = myFB.myPixelFormat;
+ const SDL_PixelFormat* pf = myFB.myPixelFormat;
mySurface = SDL_CreateRGBSurface(0, width, height,
- pf.BitsPerPixel, pf.Rmask, pf.Gmask, pf.Bmask, pf.Amask);
+ pf->BitsPerPixel, pf->Rmask, pf->Gmask, pf->Bmask, pf->Amask);
mySrcR.x = mySrcR.y = myDstR.x = myDstR.y = myScanR.x = myScanR.y = 0;
mySrcR.w = myDstR.w = width;
mySrcR.h = myDstR.h = height;
myScanR.w = 1; myScanR.h = 0;
- myPitch = mySurface->pitch / pf.BytesPerPixel;
+ myPitch = mySurface->pitch / pf->BytesPerPixel;
// Generate scanline data
for(int i = 0; i < mySurface->h; i+=2)
diff --git a/src/common/FBSurfaceUI.cxx b/src/common/FBSurfaceUI.cxx
index 88acf9f58..cd514c414 100644
--- a/src/common/FBSurfaceUI.cxx
+++ b/src/common/FBSurfaceUI.cxx
@@ -28,16 +28,16 @@ FBSurfaceUI::FBSurfaceUI(FrameBufferSDL2& buffer, uInt32 width, uInt32 height)
mySurfaceIsDirty(true)
{
// Create a surface in the same format as the parent GL class
- const SDL_PixelFormat& pf = myFB.myPixelFormat;
+ const SDL_PixelFormat* pf = myFB.myPixelFormat;
mySurface = SDL_CreateRGBSurface(0, width, height,
- pf.BitsPerPixel, pf.Rmask, pf.Gmask, pf.Bmask, pf.Amask);
+ pf->BitsPerPixel, pf->Rmask, pf->Gmask, pf->Bmask, pf->Amask);
mySrc.x = mySrc.y = myDst.x = myDst.y = 0;
mySrc.w = myDst.w = width;
mySrc.h = myDst.h = height;
- myPitch = mySurface->pitch / pf.BytesPerPixel;
+ myPitch = mySurface->pitch / pf->BytesPerPixel;
// To generate texture
reload();
diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx
index 59906ca43..d6b6d166e 100644
--- a/src/common/FrameBufferSDL2.cxx
+++ b/src/common/FrameBufferSDL2.cxx
@@ -58,17 +58,14 @@ FrameBufferSDL2::FrameBufferSDL2(OSystem* osystem)
// It's done this way (vs directly accessing a FBSurfaceUI object)
// since the structure may be needed before any FBSurface's have
// been created
- // Note: alpha disabled for now, since it's not used
- SDL_Surface* s = SDL_CreateRGBSurface(SDL_SWSURFACE, 1, 1, 32,
- 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
-
- myPixelFormat = *(s->format);
- SDL_FreeSurface(s);
+ myPixelFormat = SDL_AllocFormat(SDL_PIXELFORMAT_ARGB8888);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBufferSDL2::~FrameBufferSDL2()
{
+ SDL_FreeFormat(myPixelFormat);
+
if(myRenderer)
{
SDL_DestroyRenderer(myRenderer);
@@ -103,39 +100,6 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu
if(SDL_WasInit(SDL_INIT_VIDEO) == 0)
return false;
- // (Re)create window and renderer
- if(myRenderer)
- {
- SDL_DestroyRenderer(myRenderer);
- myRenderer = NULL;
- }
- if(myWindow)
- {
- SDL_DestroyWindow(myWindow);
- myWindow = NULL;
- }
-
- myWindow = SDL_CreateWindow(title.c_str(),
- SDL_WINDOWPOS_CENTERED,
- SDL_WINDOWPOS_CENTERED,
- mode.image_w, mode.image_h,
- 0);
- if(myWindow == NULL)
- {
- string msg = "ERROR: Unable to open SDL window: " + string(SDL_GetError());
- myOSystem->logMessage(msg, 0);
- return false;
- }
-
- myRenderer = SDL_CreateRenderer(myWindow, -1,
- SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
- if(myWindow == NULL)
- {
- string msg = "ERROR: Unable to create SDL renderer: " + string(SDL_GetError());
- myOSystem->logMessage(msg, 0);
- return false;
- }
-
bool inTIAMode =
myOSystem->eventHandler().state() != EventHandler::S_LAUNCHER &&
myOSystem->eventHandler().state() != EventHandler::S_DEBUGGER;
@@ -144,7 +108,6 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu
// We need it for the creating the TIA surface
uInt32 baseHeight = mode.image_h / mode.gfxmode.zoom;
-#if 0
// Aspect ratio and fullscreen stretching only applies to the TIA
if(inTIAMode)
{
@@ -154,7 +117,7 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu
{
const string& frate = myOSystem->console().about().InitialFrameRate;
int aspect =
- myOSystem->settings().getInt(frate == "60" ? "gl_aspectn" : "gl_aspectp");
+ myOSystem->settings().getInt(frate == "60" ? "tia.aspectn" : "tia.aspectp");
mode.image_w = (uInt16)(float(mode.image_w * aspect) / 100.0);
}
@@ -199,40 +162,42 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu
mode.image_x = (mode.screen_w - mode.image_w) >> 1;
mode.image_y = (mode.screen_h - mode.image_h) >> 1;
- SDL_GL_SetAttribute( SDL_GL_RED_SIZE, myRGB[0] );
- SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, myRGB[1] );
- SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, myRGB[2] );
- SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, myRGB[3] );
- SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+ // (Re)create window and renderer
+ if(myRenderer)
+ {
+ SDL_DestroyRenderer(myRenderer);
+ myRenderer = NULL;
+ }
+ if(myWindow)
+ {
+ SDL_DestroyWindow(myWindow);
+ myWindow = NULL;
+ }
- // There's no guarantee this is supported on all hardware
- // We leave it to the user to test and decide
- int vsync = myOSystem->settings().getBool("gl_vsync") ? 1 : 0;
- SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, vsync );
-#endif
+ // Window centering option
+ int pos = myOSystem->settings().getBool("center")
+ ? SDL_WINDOWPOS_CENTERED : SDL_WINDOWPOS_UNDEFINED;
+ myWindow = SDL_CreateWindow(title.c_str(),
+ pos, pos, mode.image_w, mode.image_h,
+ 0);
+ if(myWindow == NULL)
+ {
+ string msg = "ERROR: Unable to open SDL window: " + string(SDL_GetError());
+ myOSystem->logMessage(msg, 0);
+ return false;
+ }
- // Make sure the flags represent the current screen state
-// myWindowFlags = myScreen->flags;
-
-#if 0
- // Optimization hints
- p_gl.ShadeModel(GL_FLAT);
- p_gl.Disable(GL_CULL_FACE);
- p_gl.Disable(GL_DEPTH_TEST);
- p_gl.Disable(GL_ALPHA_TEST);
- p_gl.Disable(GL_LIGHTING);
- p_gl.Hint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
-
- // Initialize GL display
- p_gl.Viewport(0, 0, mode.screen_w, mode.screen_h);
- p_gl.MatrixMode(GL_PROJECTION);
- p_gl.LoadIdentity();
- p_gl.Ortho(0.0, mode.screen_w, mode.screen_h, 0.0, -1.0, 1.0);
- p_gl.MatrixMode(GL_MODELVIEW);
- p_gl.LoadIdentity();
- p_gl.Translatef(0.375, 0.375, 0.0); // fix scanline mis-draw issues
-#endif
-//cerr << "dimensions: " << (fullScreen() ? "(full)" : "") << endl << mode << endl;
+ // V'synced blits option
+ Uint32 renderFlags = SDL_RENDERER_ACCELERATED;
+ if(myOSystem->settings().getBool("vsync"))
+ renderFlags |= SDL_RENDERER_PRESENTVSYNC;
+ myRenderer = SDL_CreateRenderer(myWindow, -1, renderFlags);
+ if(myWindow == NULL)
+ {
+ string msg = "ERROR: Unable to create SDL renderer: " + string(SDL_GetError());
+ myOSystem->logMessage(msg, 0);
+ return false;
+ }
// The framebuffer only takes responsibility for TIA surfaces
// Other surfaces (such as the ones used for dialogs) are allocated
@@ -249,9 +214,9 @@ bool FrameBufferSDL2::setVideoMode(const string& title, VideoMode& mode, bool fu
mode.image_w, mode.image_h);
myTiaSurface->enableScanlines(ntscEnabled());
- myTiaSurface->setScanIntensity(myOSystem->settings().getInt("tv_scanlines"));
- myTiaSurface->setTexInterpolation(myOSystem->settings().getBool("gl_inter"));
- myTiaSurface->setScanInterpolation(myOSystem->settings().getBool("tv_scaninter"));
+ myTiaSurface->setTexInterpolation(myOSystem->settings().getBool("tia.inter"));
+ myTiaSurface->setScanIntensity(myOSystem->settings().getInt("tv.scanlines"));
+ myTiaSurface->setScanInterpolation(myOSystem->settings().getBool("tv.scaninter"));
myTiaSurface->setTIA(myOSystem->console().tia());
}
@@ -416,9 +381,9 @@ void FrameBufferSDL2::enableNTSC(bool enable)
myTiaSurface->updateCoords();
myTiaSurface->enableScanlines(ntscEnabled());
- myTiaSurface->setScanIntensity(myOSystem->settings().getInt("tv_scanlines"));
- myTiaSurface->setTexInterpolation(myOSystem->settings().getBool("gl_inter"));
- myTiaSurface->setScanInterpolation(myOSystem->settings().getBool("tv_scaninter"));
+ myTiaSurface->setScanIntensity(myOSystem->settings().getInt("tv.scanlines"));
+ myTiaSurface->setTexInterpolation(myOSystem->settings().getBool("tia.inter"));
+ myTiaSurface->setScanInterpolation(myOSystem->settings().getBool("tv.scaninter"));
myRedrawEntireFrame = true;
}
diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx
index 4f1903560..cb067f3e6 100644
--- a/src/common/FrameBufferSDL2.hxx
+++ b/src/common/FrameBufferSDL2.hxx
@@ -99,8 +99,8 @@ class FrameBufferSDL2 : public FrameBuffer
@param g The green component of the color
@param b The blue component of the color
*/
- void getRGB(Uint32 pixel, Uint8* r, Uint8* g, Uint8* b) const
- { SDL_GetRGB(pixel, (SDL_PixelFormat*)&myPixelFormat, r, g, b); }
+ inline void getRGB(Uint32 pixel, Uint8* r, Uint8* g, Uint8* b) const
+ { SDL_GetRGB(pixel, myPixelFormat, r, g, b); }
/**
This method is called to map a given R/G/B triple to the screen palette.
@@ -109,8 +109,8 @@ class FrameBufferSDL2 : public FrameBuffer
@param g The green component of the color.
@param b The blue component of the color.
*/
- Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const
- { return SDL_MapRGB((SDL_PixelFormat*)&myPixelFormat, r, g, b); }
+ inline Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const
+ { return SDL_MapRGB(myPixelFormat, r, g, b); }
/**
This method is called to query the type of the FrameBuffer.
@@ -235,7 +235,7 @@ class FrameBufferSDL2 : public FrameBuffer
FBSurfaceTIA* myTiaSurface;
// Used by mapRGB (when palettes are created)
- SDL_PixelFormat myPixelFormat;
+ SDL_PixelFormat* myPixelFormat;
// The depth of the texture buffer
uInt32 myDepth;
diff --git a/src/common/tv_filters/NTSCFilter.cxx b/src/common/tv_filters/NTSCFilter.cxx
index 7f389d076..1bc15407b 100644
--- a/src/common/tv_filters/NTSCFilter.cxx
+++ b/src/common/tv_filters/NTSCFilter.cxx
@@ -194,32 +194,32 @@ string NTSCFilter::decreaseAdjustable()
void NTSCFilter::loadConfig(const Settings& settings)
{
// Load adjustables for custom mode
- myCustomSetup.hue = BSPF_clamp(settings.getFloat("tv_hue"), -1.0f, 1.0f);
- myCustomSetup.saturation = BSPF_clamp(settings.getFloat("tv_saturation"), -1.0f, 1.0f);
- myCustomSetup.contrast = BSPF_clamp(settings.getFloat("tv_contrast"), -1.0f, 1.0f);
- myCustomSetup.brightness = BSPF_clamp(settings.getFloat("tv_brightness"), -1.0f, 1.0f);
- myCustomSetup.sharpness = BSPF_clamp(settings.getFloat("tv_sharpness"), -1.0f, 1.0f);
- myCustomSetup.gamma = BSPF_clamp(settings.getFloat("tv_gamma"), -1.0f, 1.0f);
- myCustomSetup.resolution = BSPF_clamp(settings.getFloat("tv_resolution"), -1.0f, 1.0f);
- myCustomSetup.artifacts = BSPF_clamp(settings.getFloat("tv_artifacts"), -1.0f, 1.0f);
- myCustomSetup.fringing = BSPF_clamp(settings.getFloat("tv_fringing"), -1.0f, 1.0f);
- myCustomSetup.bleed = BSPF_clamp(settings.getFloat("tv_bleed"), -1.0f, 1.0f);
+ myCustomSetup.hue = BSPF_clamp(settings.getFloat("tv.hue"), -1.0f, 1.0f);
+ myCustomSetup.saturation = BSPF_clamp(settings.getFloat("tv.saturation"), -1.0f, 1.0f);
+ myCustomSetup.contrast = BSPF_clamp(settings.getFloat("tv.contrast"), -1.0f, 1.0f);
+ myCustomSetup.brightness = BSPF_clamp(settings.getFloat("tv.brightness"), -1.0f, 1.0f);
+ myCustomSetup.sharpness = BSPF_clamp(settings.getFloat("tv.sharpness"), -1.0f, 1.0f);
+ myCustomSetup.gamma = BSPF_clamp(settings.getFloat("tv.gamma"), -1.0f, 1.0f);
+ myCustomSetup.resolution = BSPF_clamp(settings.getFloat("tv.resolution"), -1.0f, 1.0f);
+ myCustomSetup.artifacts = BSPF_clamp(settings.getFloat("tv.artifacts"), -1.0f, 1.0f);
+ myCustomSetup.fringing = BSPF_clamp(settings.getFloat("tv.fringing"), -1.0f, 1.0f);
+ myCustomSetup.bleed = BSPF_clamp(settings.getFloat("tv.bleed"), -1.0f, 1.0f);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void NTSCFilter::saveConfig(Settings& settings) const
{
// Save adjustables for custom mode
- settings.setValue("tv_hue", myCustomSetup.hue);
- settings.setValue("tv_saturation", myCustomSetup.saturation);
- settings.setValue("tv_contrast", myCustomSetup.contrast);
- settings.setValue("tv_brightness", myCustomSetup.brightness);
- settings.setValue("tv_sharpness", myCustomSetup.sharpness);
- settings.setValue("tv_gamma", myCustomSetup.gamma);
- settings.setValue("tv_resolution", myCustomSetup.resolution);
- settings.setValue("tv_artifacts", myCustomSetup.artifacts);
- settings.setValue("tv_fringing", myCustomSetup.fringing);
- settings.setValue("tv_bleed", myCustomSetup.bleed);
+ settings.setValue("tv.hue", myCustomSetup.hue);
+ settings.setValue("tv.saturation", myCustomSetup.saturation);
+ settings.setValue("tv.contrast", myCustomSetup.contrast);
+ settings.setValue("tv.brightness", myCustomSetup.brightness);
+ settings.setValue("tv.sharpness", myCustomSetup.sharpness);
+ settings.setValue("tv.gamma", myCustomSetup.gamma);
+ settings.setValue("tv.resolution", myCustomSetup.resolution);
+ settings.setValue("tv.artifacts", myCustomSetup.artifacts);
+ settings.setValue("tv.fringing", myCustomSetup.fringing);
+ settings.setValue("tv.bleed", myCustomSetup.bleed);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx
index 955e23f1e..c5d48f547 100644
--- a/src/emucore/Console.cxx
+++ b/src/emucore/Console.cxx
@@ -422,7 +422,7 @@ FBInitStatus Console::initializeVideo(bool full)
int blend = atoi(myProperties.get(Display_PPBlend).c_str());
myOSystem->frameBuffer().enablePhosphor(enable, blend);
myOSystem->frameBuffer().setNTSC(
- (NTSCFilter::Preset)myOSystem->settings().getInt("tv_filter"), false);
+ (NTSCFilter::Preset)myOSystem->settings().getInt("tv.filter"), false);
setPalette(myOSystem->settings().getString("palette"));
// Set the correct framerate based on the format of the ROM
diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx
index 6d21663fe..df7291fd2 100644
--- a/src/emucore/FrameBuffer.cxx
+++ b/src/emucore/FrameBuffer.cxx
@@ -591,7 +591,7 @@ void FrameBuffer::setNTSC(NTSCFilter::Preset preset, bool show)
const string& mode = myNTSCFilter.setPreset(preset);
buf << "TV filtering (" << mode << " mode)";
}
- myOSystem->settings().setValue("tv_filter", (int)preset);
+ myOSystem->settings().setValue("tv.filter", (int)preset);
}
else
buf << "TV filtering not available in software mode";
@@ -609,7 +609,7 @@ void FrameBuffer::setScanlineIntensity(int amount)
{
uInt32 intensity = enableScanlines(amount);
buf << "Scanline intensity at " << intensity << "%";
- myOSystem->settings().setValue("tv_scanlines", intensity);
+ myOSystem->settings().setValue("tv.scanlines", intensity);
}
else
buf << "Scanlines only available in TV filtering mode";
@@ -628,10 +628,10 @@ void FrameBuffer::toggleScanlineInterpolation()
{
if(ntscEnabled())
{
- bool enable = !myOSystem->settings().getBool("tv_scaninter");
+ bool enable = !myOSystem->settings().getBool("tv.scaninter");
enableScanlineInterpolation(enable);
buf << "Scanline interpolation " << (enable ? "enabled" : "disabled");
- myOSystem->settings().setValue("tv_scaninter", enable);
+ myOSystem->settings().setValue("tv.scaninter", enable);
}
else
buf << "Scanlines only available in TV filtering mode";
@@ -821,7 +821,7 @@ bool FrameBuffer::changeVidMode(int direction)
showMessage(vidmode.gfxmode.description);
}
if(saveModeChange)
- myOSystem->settings().setValue("tia_filter", vidmode.gfxmode.name);
+ myOSystem->settings().setValue("tia.filter", vidmode.gfxmode.name);
refresh();
}
@@ -1025,7 +1025,7 @@ FrameBuffer::VideoMode FrameBuffer::getSavedVidMode()
}
else
{
- const string& name = myOSystem->settings().getString("tia_filter");
+ const string& name = myOSystem->settings().getString("tia.filter");
myCurrentModeList->setByGfxMode(name);
}
diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx
index 5070be5df..c85c5d26e 100644
--- a/src/emucore/Settings.cxx
+++ b/src/emucore/Settings.cxx
@@ -40,17 +40,8 @@ Settings::Settings(OSystem* osystem)
// Add options that are common to all versions of Stella
setInternal("video", "soft");
- // OpenGL specific options
- setInternal("gl_inter", "false");
- setInternal("gl_aspectn", "90");
- setInternal("gl_aspectp", "100");
- setInternal("gl_fsscale", "false");
- setInternal("gl_lib", "libGL.so");
- setInternal("gl_vsync", "true");
- setInternal("gl_vbo", "true");
-
- // Framebuffer-related options
- setInternal("tia_filter", "zoom2x");
+ // Video-related options
+ setInternal("vsync", "true");
setInternal("fullscreen", "0");
setInternal("fullres", "auto");
setInternal("center", "false");
@@ -60,21 +51,28 @@ Settings::Settings(OSystem* osystem)
setInternal("timing", "sleep");
setInternal("uimessages", "true");
+ // TIA specific options
+ setInternal("tia.filter", "zoom2x");
+ setInternal("tia.inter", "false");
+ setInternal("tia.aspectn", "90");
+ setInternal("tia.aspectp", "100");
+ setInternal("gl_fsscale", "false"); //FIXSDL - deprecated
+
// TV filtering options
- setInternal("tv_filter", "0");
- setInternal("tv_scanlines", "25");
- setInternal("tv_scaninter", "true");
+ setInternal("tv.filter", "0");
+ setInternal("tv.scanlines", "25");
+ setInternal("tv.scaninter", "true");
// TV options when using 'custom' mode
- setInternal("tv_contrast", "0.0");
- setInternal("tv_brightness", "0.0");
- setInternal("tv_hue", "0.0");
- setInternal("tv_saturation", "0.0");
- setInternal("tv_gamma", "0.0");
- setInternal("tv_sharpness", "0.0");
- setInternal("tv_resolution", "0.0");
- setInternal("tv_artifacts", "0.0");
- setInternal("tv_fringing", "0.0");
- setInternal("tv_bleed", "0.0");
+ setInternal("tv.contrast", "0.0");
+ setInternal("tv.brightness", "0.0");
+ setInternal("tv.hue", "0.0");
+ setInternal("tv.saturation", "0.0");
+ setInternal("tv.gamma", "0.0");
+ setInternal("tv.sharpness", "0.0");
+ setInternal("tv.resolution", "0.0");
+ setInternal("tv.artifacts", "0.0");
+ setInternal("tv.fringing", "0.0");
+ setInternal("tv.bleed", "0.0");
// Sound options
setInternal("sound", "true");
@@ -284,13 +282,13 @@ void Settings::validate()
if(s != "sleep" && s != "busy") setInternal("timing", "sleep");
//FIXSDL
- i = getInt("gl_aspectn");
- if(i < 80 || i > 120) setInternal("gl_aspectn", "100");
- i = getInt("gl_aspectp");
- if(i < 80 || i > 120) setInternal("gl_aspectp", "100");
+ i = getInt("tia.aspectn");
+ if(i < 80 || i > 120) setInternal("tia.aspectn", "100");
+ i = getInt("tia.aspectp");
+ if(i < 80 || i > 120) setInternal("tia.aspectp", "100");
- i = getInt("tv_filter");
- if(i < 0 || i > 5) setInternal("tv_filter", "0");
+ i = getInt("tv.filter");
+ if(i < 0 || i > 5) setInternal("tv.filter", "0");
//////////////////
#ifdef SOUND_SUPPORT
@@ -354,29 +352,27 @@ void Settings::usage()
// FIXSDL
<< " gl SDL OpenGL mode\n"
<< endl
- << " -gl_lib Specify the OpenGL library\n"
- << " -gl_inter <1|0> Enable interpolated (smooth) scaling\n"
- << " -gl_aspectn Scale the TIA width by the given percentage in NTSC mode\n"
- << " -gl_aspectp Scale the TIA width by the given percentage in PAL mode\n"
+ << " -tia.filter Use the specified filter for TIA image\n"
+ << " -tia.inter <1|0> Enable interpolated (smooth) scaling for TIA image\n"
+ << " -tia.aspectn Scale the TIA width by the given percentage in NTSC mode\n"
+ << " -tia.aspectp Scale the TIA width by the given percentage in PAL mode\n"
<< " -gl_fsscale <1|0> Stretch GL image in fullscreen emulation mode to max/integer scale\n"
- << " -gl_vsync <1|0> Enable 'synchronize to vertical blank interrupt'\n"
- << " -gl_vbo <1|0> Enable 'vertex buffer objects'\n"
<< endl
- << " -tv_filter <0-5> Set TV effects off (0) or to specified mode (1-5)\n"
- << " -tv_scanlines <0-100> Set scanline intensity to percentage (0 disables completely)\n"
- << " -tv_scaninter <1|0> Enable interpolated (smooth) scanlines\n"
- << " -tv_contrast Set TV effects custom contrast to value 1.0 - 1.0\n"
- << " -tv_brightness Set TV effects custom brightness to value 1.0 - 1.0\n"
- << " -tv_hue Set TV effects custom hue to value 1.0 - 1.0\n"
- << " -tv_saturation Set TV effects custom saturation to value 1.0 - 1.0\n"
- << " -tv_gamma Set TV effects custom gamma to value 1.0 - 1.0\n"
- << " -tv_sharpness Set TV effects custom sharpness to value 1.0 - 1.0\n"
- << " -tv_resolution Set TV effects custom resolution to value 1.0 - 1.0\n"
- << " -tv_artifacts Set TV effects custom artifacts to value 1.0 - 1.0\n"
- << " -tv_fringing Set TV effects custom fringing to value 1.0 - 1.0\n"
- << " -tv_bleed Set TV effects custom bleed to value 1.0 - 1.0\n"
+ << " -tv.filter <0-5> Set TV effects off (0) or to specified mode (1-5)\n"
+ << " -tv.scanlines <0-100> Set scanline intensity to percentage (0 disables completely)\n"
+ << " -tv.scaninter <1|0> Enable interpolated (smooth) scanlines\n"
+ << " -tv.contrast Set TV effects custom contrast to value 1.0 - 1.0\n"
+ << " -tv.brightness Set TV effects custom brightness to value 1.0 - 1.0\n"
+ << " -tv.hue Set TV effects custom hue to value 1.0 - 1.0\n"
+ << " -tv.saturation Set TV effects custom saturation to value 1.0 - 1.0\n"
+ << " -tv.gamma Set TV effects custom gamma to value 1.0 - 1.0\n"
+ << " -tv.sharpness Set TV effects custom sharpness to value 1.0 - 1.0\n"
+ << " -tv.resolution Set TV effects custom resolution to value 1.0 - 1.0\n"
+ << " -tv.artifacts Set TV effects custom artifacts to value 1.0 - 1.0\n"
+ << " -tv.fringing Set TV effects custom fringing to value 1.0 - 1.0\n"
+ << " -tv.bleed Set TV effects custom bleed to value 1.0 - 1.0\n"
<< endl
- << " -tia_filter Use the specified filter in emulation mode\n"
+ << " -vsync <1|0> Enable 'synchronize to vertical blank interrupt'\n"
<< " -fullscreen <1|0|-1> Use fullscreen mode (1 or 0), or disable switching to fullscreen entirely\n"
<< " -fullres The resolution to use in fullscreen mode\n"
<< " -center <1|0> Centers game window (if possible)\n"
diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx
index a634d008e..3ec372695 100644
--- a/src/gui/VideoDialog.cxx
+++ b/src/gui/VideoDialog.cxx
@@ -407,7 +407,7 @@ void VideoDialog::loadConfig()
const VariantList& items =
instance().frameBuffer().supportedTIAFilters(gl ? "gl" : "soft");
myTIAFilterPopup->addItems(items);
- myTIAFilterPopup->setSelected(instance().settings().getString("tia_filter"),
+ myTIAFilterPopup->setSelected(instance().settings().getString("tia.filter"),
instance().desktopWidth() < 640 ? "zoom1x" : "zoom2x");
// TIA Palette
@@ -423,19 +423,19 @@ void VideoDialog::loadConfig()
instance().settings().getString("timing"), "sleep");
// GL Filter setting
- const string& gl_inter = instance().settings().getBool("gl_inter") ?
+ const string& tia_inter = instance().settings().getBool("tia.inter") ?
"linear" : "nearest";
- myGLFilterPopup->setSelected(gl_inter, "nearest");
+ myGLFilterPopup->setSelected(tia_inter, "nearest");
myGLFilterPopup->setEnabled(gl);
// GL aspect ratio setting (NTSC and PAL)
- myNAspectRatioSlider->setValue(instance().settings().getInt("gl_aspectn"));
+ myNAspectRatioSlider->setValue(instance().settings().getInt("tia.aspectn"));
myNAspectRatioSlider->setEnabled(gl);
- myNAspectRatioLabel->setLabel(instance().settings().getString("gl_aspectn"));
+ myNAspectRatioLabel->setLabel(instance().settings().getString("tia.aspectn"));
myNAspectRatioLabel->setEnabled(gl);
- myPAspectRatioSlider->setValue(instance().settings().getInt("gl_aspectp"));
+ myPAspectRatioSlider->setValue(instance().settings().getInt("tia.aspectp"));
myPAspectRatioSlider->setEnabled(gl);
- myPAspectRatioLabel->setLabel(instance().settings().getString("gl_aspectp"));
+ myPAspectRatioLabel->setLabel(instance().settings().getString("tia.aspectp"));
myPAspectRatioLabel->setEnabled(gl);
// Framerate (0 or -1 means automatic framerate calculation)
@@ -457,7 +457,7 @@ void VideoDialog::loadConfig()
myGLStretchCheckbox->setEnabled(gl);
// Use sync to vertical blank (GL mode only)
- myUseVSyncCheckbox->setState(instance().settings().getBool("gl_vsync"));
+ myUseVSyncCheckbox->setState(instance().settings().getBool("vsync"));
myUseVSyncCheckbox->setEnabled(gl);
// Show UI messages
@@ -471,17 +471,17 @@ void VideoDialog::loadConfig()
// TV Mode
myTVMode->setSelected(
- instance().settings().getString("tv_filter"), "0");
- int preset = instance().settings().getInt("tv_filter");
+ instance().settings().getString("tv.filter"), "0");
+ int preset = instance().settings().getInt("tv.filter");
handleTVModeChange((NTSCFilter::Preset)preset);
// TV Custom adjustables
loadTVAdjustables(NTSCFilter::PRESET_CUSTOM);
// TV scanline intensity and interpolation
- myTVScanIntense->setValue(instance().settings().getInt("tv_scanlines"));
- myTVScanIntenseLabel->setLabel(instance().settings().getString("tv_scanlines"));
- myTVScanInterpolate->setState(instance().settings().getBool("tv_scaninter"));
+ myTVScanIntense->setValue(instance().settings().getInt("tv.scanlines"));
+ myTVScanIntenseLabel->setLabel(instance().settings().getString("tv.scanlines"));
+ myTVScanInterpolate->setState(instance().settings().getBool("tv.scaninter"));
myTab->loadConfig();
}
@@ -494,7 +494,7 @@ void VideoDialog::saveConfig()
myRendererPopup->getSelectedTag().toString());
// TIA Filter
- instance().settings().setValue("tia_filter",
+ instance().settings().setValue("tia.filter",
myTIAFilterPopup->getSelectedTag().toString());
// TIA Palette
@@ -510,12 +510,12 @@ void VideoDialog::saveConfig()
myFrameTimingPopup->getSelectedTag().toString());
// GL Filter setting
- instance().settings().setValue("gl_inter",
+ instance().settings().setValue("tia.inter",
myGLFilterPopup->getSelectedTag().toString() == "linear" ? true : false);
// GL aspect ratio setting (NTSC and PAL)
- instance().settings().setValue("gl_aspectn", myNAspectRatioLabel->getLabel());
- instance().settings().setValue("gl_aspectp", myPAspectRatioLabel->getLabel());
+ instance().settings().setValue("tia.aspectn", myNAspectRatioLabel->getLabel());
+ instance().settings().setValue("tia.aspectp", myPAspectRatioLabel->getLabel());
// Framerate
int i = myFrameRateSlider->getValue();
@@ -540,7 +540,7 @@ void VideoDialog::saveConfig()
instance().settings().setValue("gl_fsscale", myGLStretchCheckbox->getState());
// Use sync to vertical blank (GL mode only)
- instance().settings().setValue("gl_vsync", myUseVSyncCheckbox->getState());
+ instance().settings().setValue("vsync", myUseVSyncCheckbox->getState());
// Show UI messages
instance().settings().setValue("uimessages", myUIMessagesCheckbox->getState());
@@ -552,7 +552,7 @@ void VideoDialog::saveConfig()
instance().settings().setValue("fastscbios", myFastSCBiosCheckbox->getState());
// TV Mode
- instance().settings().setValue("tv_filter",
+ instance().settings().setValue("tv.filter",
myTVMode->getSelectedTag().toString());
// TV Custom adjustables
@@ -570,8 +570,8 @@ void VideoDialog::saveConfig()
instance().frameBuffer().ntsc().setCustomAdjustables(adj);
// TV scanline intensity and interpolation
- instance().settings().setValue("tv_scanlines", myTVScanIntenseLabel->getLabel());
- instance().settings().setValue("tv_scaninter", myTVScanInterpolate->getState());
+ instance().settings().setValue("tv.scanlines", myTVScanIntenseLabel->getLabel());
+ instance().settings().setValue("tv.scaninter", myTVScanInterpolate->getState());
// Finally, issue a complete framebuffer re-initialization
instance().createFrameBuffer();
diff --git a/src/macosx/SettingsMACOSX.cxx b/src/macosx/SettingsMACOSX.cxx
index c171b107b..660140d19 100644
--- a/src/macosx/SettingsMACOSX.cxx
+++ b/src/macosx/SettingsMACOSX.cxx
@@ -31,9 +31,6 @@ extern "C" {
SettingsMACOSX::SettingsMACOSX(OSystem* osystem)
: Settings(osystem)
{
- setInternal("video", "gl"); // Use opengl mode by default
- setInternal("gl_lib", "libGL.so"); // Try this one first, then let the system decide
- setInternal("gl_vsync", "true"); // OSX almost always supports vsync; let's use it
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/unix/SettingsUNIX.cxx b/src/unix/SettingsUNIX.cxx
index ccf985b57..c0efcc99c 100644
--- a/src/unix/SettingsUNIX.cxx
+++ b/src/unix/SettingsUNIX.cxx
@@ -25,9 +25,6 @@
SettingsUNIX::SettingsUNIX(OSystem* osystem)
: Settings(osystem)
{
- setInternal("gl_lib", "libGL.so");
- // Most Linux GL implementations don't support this yet
- setInternal("gl_vsync", "false");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/windows/SettingsWINDOWS.cxx b/src/windows/SettingsWINDOWS.cxx
index b0a7ef670..cab85379c 100644
--- a/src/windows/SettingsWINDOWS.cxx
+++ b/src/windows/SettingsWINDOWS.cxx
@@ -25,7 +25,6 @@
SettingsWINDOWS::SettingsWINDOWS(OSystem* osystem)
: Settings(osystem)
{
- setInternal("gl_lib", "opengl32.dll");
setInternal("fragsize", "512");
}
|