2005-03-14 04:08:15 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2015-12-29 19:22:46 +00:00
|
|
|
// Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2005-03-14 04:08:15 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2005-03-14 04:08:15 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2009-05-13 13:55:40 +00:00
|
|
|
// $Id$
|
2005-03-14 04:08:15 +00:00
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef VIDEO_DIALOG_HXX
|
|
|
|
#define VIDEO_DIALOG_HXX
|
|
|
|
|
|
|
|
class CommandSender;
|
2009-05-25 17:51:52 +00:00
|
|
|
class CheckboxWidget;
|
2005-05-10 19:20:45 +00:00
|
|
|
class DialogContainer;
|
2005-03-14 04:08:15 +00:00
|
|
|
class PopUpWidget;
|
2005-03-26 04:19:56 +00:00
|
|
|
class SliderWidget;
|
|
|
|
class StaticTextWidget;
|
2009-05-25 17:51:52 +00:00
|
|
|
class TabWidget;
|
2010-10-18 18:39:57 +00:00
|
|
|
class OSystem;
|
2005-03-14 04:08:15 +00:00
|
|
|
|
2005-05-27 18:00:49 +00:00
|
|
|
#include "Dialog.hxx"
|
2005-03-14 04:08:15 +00:00
|
|
|
#include "bspf.hxx"
|
|
|
|
|
|
|
|
class VideoDialog : public Dialog
|
|
|
|
{
|
|
|
|
public:
|
2014-10-26 17:45:42 +00:00
|
|
|
VideoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
|
Some fixes for 'small screen' functionality. The lower bound of 320x240
is now enforced in more areas of the code, specifically, in BrowserDialog,
VideoDialog and InputDialog.
Rearranged some options in InputDialog (for spacing), and removed the
'mouse is paddle ...' option. It was never being saved to the config
file anyway, and is still selectable with Ctrl-0,1,2,3 keys.
Added 'maxres' commandline argument, which overrides the built-in
determination of desktop size normally done by SDL. This is not
documented, and is not meant to be used by anyone other than those
testing Stella on 'small' systems. It's basically a way to set the
desktop size without recompiling Stella each time.
Still TODO is look at all other dialogs, making sure they fit in the
minimum size. PopupDialog in particular needs to be fixed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1942 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-02-13 18:34:24 +00:00
|
|
|
int max_w, int max_h);
|
2014-10-26 17:45:42 +00:00
|
|
|
virtual ~VideoDialog();
|
2005-03-14 04:08:15 +00:00
|
|
|
|
2006-11-18 13:29:12 +00:00
|
|
|
private:
|
2015-07-10 18:59:03 +00:00
|
|
|
void loadConfig() override;
|
|
|
|
void saveConfig() override;
|
|
|
|
void setDefaults() override;
|
2006-11-18 13:29:12 +00:00
|
|
|
|
Added 'WINDOWED_SUPPORT' compile-time argument, which can be used for
those systems which don't actually have a windowing environment. When
this is set, toggling from fullscreen will not be possible, and certain
window-related UI functions will not be accessible.
Completely revamped video subsystem. Windowed and fullscreen modes are
now dealt with separately. Windows can be zoomed using the 'zoom_ui'
and 'zoom_tia' arguments. Fullscreen modes are now set by resolution,
not zoom, so you can specify to always use a certain fullscreen
resolution, and the images will be scaled appropriately. This also
fixes the fullscreen issues on widescreen monitors; just select a
widescreen video mode, and the aspect ratio will always be correct.
Removed dirty-rect support for software rendering of the TIA image,
as it ended up being slower than just updating the entire image.
For those resolutions where it will start to slow down (1024x768 or
higher), one should be using OpenGL.
Fixed issue in Windows when returning from fullscreen mode made the
window constantly 'shrink' in size. It was related to auto-detecting
the desktop resolution, which is really the job of SDL. As such, all
further releases of Stella will require SDL 1.2.10, which includes
this auto-detection code internally.
Made ROM launcher resizable, configurable in sizes from 320x240
to 800x600. Updated the UIDialog to change these quantities from the
UI (Stella will need to be restarted for it to take effect).
Removed aspect ratio support, since it was causing problems, and the
new fullscreen mode work has made it obsolete. i *may* consider it
again in the future, if there's sufficient demand.
Added 'fullres' commandline argument, used to set the fullscreen
resolution.
Added 'launcherres' commandline argument, used to set the ROM
launcher resolution. This replaces 'launchersize' argument, which
has been removed.
Changed 'scale_ui' and 'scale_tia' to 'zoom_ui' and 'zoom_tia',
respectively. Their function remains the same.
Changed meaning of 'gl_fsmax' argument to specify what modes to use
fullscreen OpenGL scaling (previously, this was a boolean, and
didn't consider different modes).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1323 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-06-20 16:33:23 +00:00
|
|
|
void handleFullscreenChange(bool enable);
|
2012-05-12 22:21:59 +00:00
|
|
|
void handleTVModeChange(NTSCFilter::Preset);
|
|
|
|
void loadTVAdjustables(NTSCFilter::Preset preset);
|
2015-07-10 18:59:03 +00:00
|
|
|
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
|
2006-11-18 13:29:12 +00:00
|
|
|
|
|
|
|
private:
|
2009-05-25 17:51:52 +00:00
|
|
|
TabWidget* myTab;
|
|
|
|
|
|
|
|
// General options
|
2014-03-07 22:12:39 +00:00
|
|
|
PopUpWidget* myRenderer;
|
2014-04-28 16:47:10 +00:00
|
|
|
PopUpWidget* myTIAZoom;
|
2014-03-07 22:12:39 +00:00
|
|
|
PopUpWidget* myTIAPalette;
|
|
|
|
PopUpWidget* myFrameTiming;
|
|
|
|
PopUpWidget* myTIAInterpolate;
|
|
|
|
SliderWidget* myNAspectRatio;
|
2009-01-24 17:32:29 +00:00
|
|
|
StaticTextWidget* myNAspectRatioLabel;
|
2014-03-07 22:12:39 +00:00
|
|
|
SliderWidget* myPAspectRatio;
|
2009-01-24 17:32:29 +00:00
|
|
|
StaticTextWidget* myPAspectRatioLabel;
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
|
2014-03-07 22:12:39 +00:00
|
|
|
SliderWidget* myFrameRate;
|
2005-03-26 04:19:56 +00:00
|
|
|
StaticTextWidget* myFrameRateLabel;
|
2014-04-28 16:47:10 +00:00
|
|
|
CheckboxWidget* myFullscreen;
|
|
|
|
CheckboxWidget* myUseStretch;
|
2014-03-07 22:12:39 +00:00
|
|
|
CheckboxWidget* myUseVSync;
|
2014-04-28 16:47:10 +00:00
|
|
|
CheckboxWidget* myColorLoss;
|
2014-03-07 22:12:39 +00:00
|
|
|
CheckboxWidget* myUIMessages;
|
|
|
|
CheckboxWidget* myCenter;
|
|
|
|
CheckboxWidget* myFastSCBios;
|
2005-03-14 04:08:15 +00:00
|
|
|
|
2012-05-12 22:21:59 +00:00
|
|
|
// TV effects adjustables (custom mode)
|
2012-05-10 15:36:20 +00:00
|
|
|
PopUpWidget* myTVMode;
|
|
|
|
SliderWidget* myTVSharp;
|
|
|
|
StaticTextWidget* myTVSharpLabel;
|
2012-05-12 22:21:59 +00:00
|
|
|
SliderWidget* myTVHue;
|
|
|
|
StaticTextWidget* myTVHueLabel;
|
2012-05-10 15:36:20 +00:00
|
|
|
SliderWidget* myTVRes;
|
|
|
|
StaticTextWidget* myTVResLabel;
|
|
|
|
SliderWidget* myTVArtifacts;
|
|
|
|
StaticTextWidget* myTVArtifactsLabel;
|
|
|
|
SliderWidget* myTVFringe;
|
|
|
|
StaticTextWidget* myTVFringeLabel;
|
2012-05-12 22:21:59 +00:00
|
|
|
SliderWidget* myTVBleed;
|
|
|
|
StaticTextWidget* myTVBleedLabel;
|
2012-05-10 15:36:20 +00:00
|
|
|
SliderWidget* myTVBright;
|
|
|
|
StaticTextWidget* myTVBrightLabel;
|
|
|
|
SliderWidget* myTVContrast;
|
|
|
|
StaticTextWidget* myTVContrastLabel;
|
|
|
|
SliderWidget* myTVSatur;
|
|
|
|
StaticTextWidget* myTVSaturLabel;
|
|
|
|
SliderWidget* myTVGamma;
|
|
|
|
StaticTextWidget* myTVGammaLabel;
|
2009-06-12 21:47:03 +00:00
|
|
|
|
2012-05-12 22:21:59 +00:00
|
|
|
// TV scanline intensity and interpolation
|
|
|
|
StaticTextWidget* myTVScanLabel;
|
|
|
|
SliderWidget* myTVScanIntense;
|
|
|
|
StaticTextWidget* myTVScanIntenseLabel;
|
|
|
|
CheckboxWidget* myTVScanInterpolate;
|
|
|
|
|
|
|
|
// TV effects adjustables presets (custom mode)
|
|
|
|
ButtonWidget* myCloneComposite;
|
|
|
|
ButtonWidget* myCloneSvideo;
|
|
|
|
ButtonWidget* myCloneRGB;
|
|
|
|
ButtonWidget* myCloneBad;
|
|
|
|
ButtonWidget* myCloneCustom;
|
|
|
|
|
2006-11-04 19:38:25 +00:00
|
|
|
enum {
|
2009-01-24 17:32:29 +00:00
|
|
|
kNAspectRatioChanged = 'VDan',
|
|
|
|
kPAspectRatioChanged = 'VDap',
|
|
|
|
kFrameRateChanged = 'VDfr',
|
2012-05-10 15:36:20 +00:00
|
|
|
|
|
|
|
kTVModeChanged = 'VDtv',
|
|
|
|
kTVSharpChanged = 'TVsh',
|
2012-05-12 22:21:59 +00:00
|
|
|
kTVHueChanged = 'TVhu',
|
2012-05-10 15:36:20 +00:00
|
|
|
kTVResChanged = 'TVrs',
|
|
|
|
kTVArtifactsChanged = 'TVar',
|
|
|
|
kTVFringeChanged = 'TVfr',
|
2012-05-12 22:21:59 +00:00
|
|
|
kTVBleedChanged = 'TVbl',
|
2012-05-10 15:36:20 +00:00
|
|
|
kTVBrightChanged = 'TVbr',
|
|
|
|
kTVContrastChanged = 'TVct',
|
|
|
|
kTVSaturChanged = 'TVsa',
|
|
|
|
kTVGammaChanged = 'TVga',
|
2012-05-12 22:21:59 +00:00
|
|
|
kTVScanIntenseChanged= 'TVsc',
|
|
|
|
|
|
|
|
kCloneCompositeCmd = 'CLcp',
|
|
|
|
kCloneSvideoCmd = 'CLsv',
|
|
|
|
kCloneRGBCmd = 'CLrb',
|
|
|
|
kCloneBadCmd = 'CLbd',
|
|
|
|
kCloneCustomCmd = 'CLcu'
|
2006-11-04 19:38:25 +00:00
|
|
|
};
|
2015-04-26 19:02:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Following constructors and assignment operators not supported
|
|
|
|
VideoDialog() = delete;
|
|
|
|
VideoDialog(const VideoDialog&) = delete;
|
|
|
|
VideoDialog(VideoDialog&&) = delete;
|
|
|
|
VideoDialog& operator=(const VideoDialog&) = delete;
|
|
|
|
VideoDialog& operator=(VideoDialog&&) = delete;
|
2005-03-14 04:08:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|