stella/src/gui/VideoDialog.hxx

147 lines
4.5 KiB
C++
Raw Normal View History

//============================================================================
//
// 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
//
// Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef VIDEO_DIALOG_HXX
#define VIDEO_DIALOG_HXX
class CommandSender;
class CheckboxWidget;
class DialogContainer;
class PopUpWidget;
class SliderWidget;
class StaticTextWidget;
class TabWidget;
class OSystem;
#include "Dialog.hxx"
#include "bspf.hxx"
class VideoDialog : public Dialog
{
public:
VideoDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
int max_w, int max_h);
virtual ~VideoDialog();
private:
void loadConfig() override;
void saveConfig() override;
void setDefaults() override;
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);
void handleTVModeChange(NTSCFilter::Preset);
void loadTVAdjustables(NTSCFilter::Preset preset);
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
private:
TabWidget* myTab;
// General options
PopUpWidget* myRenderer;
PopUpWidget* myTIAZoom;
PopUpWidget* myTIAPalette;
PopUpWidget* myFrameTiming;
PopUpWidget* myTIAInterpolate;
SliderWidget* myNAspectRatio;
StaticTextWidget* myNAspectRatioLabel;
SliderWidget* myPAspectRatio;
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
SliderWidget* myFrameRate;
StaticTextWidget* myFrameRateLabel;
CheckboxWidget* myFullscreen;
CheckboxWidget* myUseStretch;
CheckboxWidget* myUseVSync;
CheckboxWidget* myColorLoss;
CheckboxWidget* myUIMessages;
CheckboxWidget* myCenter;
CheckboxWidget* myFastSCBios;
// TV effects adjustables (custom mode)
PopUpWidget* myTVMode;
SliderWidget* myTVSharp;
StaticTextWidget* myTVSharpLabel;
SliderWidget* myTVHue;
StaticTextWidget* myTVHueLabel;
SliderWidget* myTVRes;
StaticTextWidget* myTVResLabel;
SliderWidget* myTVArtifacts;
StaticTextWidget* myTVArtifactsLabel;
SliderWidget* myTVFringe;
StaticTextWidget* myTVFringeLabel;
SliderWidget* myTVBleed;
StaticTextWidget* myTVBleedLabel;
SliderWidget* myTVBright;
StaticTextWidget* myTVBrightLabel;
SliderWidget* myTVContrast;
StaticTextWidget* myTVContrastLabel;
SliderWidget* myTVSatur;
StaticTextWidget* myTVSaturLabel;
SliderWidget* myTVGamma;
StaticTextWidget* myTVGammaLabel;
// 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;
enum {
kNAspectRatioChanged = 'VDan',
kPAspectRatioChanged = 'VDap',
kFrameRateChanged = 'VDfr',
kTVModeChanged = 'VDtv',
kTVSharpChanged = 'TVsh',
kTVHueChanged = 'TVhu',
kTVResChanged = 'TVrs',
kTVArtifactsChanged = 'TVar',
kTVFringeChanged = 'TVfr',
kTVBleedChanged = 'TVbl',
kTVBrightChanged = 'TVbr',
kTVContrastChanged = 'TVct',
kTVSaturChanged = 'TVsa',
kTVGammaChanged = 'TVga',
kTVScanIntenseChanged= 'TVsc',
kCloneCompositeCmd = 'CLcp',
kCloneSvideoCmd = 'CLsv',
kCloneRGBCmd = 'CLrb',
kCloneBadCmd = 'CLbd',
kCloneCustomCmd = 'CLcu'
};
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;
};
#endif