mirror of https://github.com/stella-emu/stella.git
Scaler support is now selectable from configure, and defaults to off
(no more editing the configure script). It's still not working, though. Added more options to the AudioDialog settings, allowing to set output and TIA frequency, and volume clipping. These are the same options that were always available on the commandline; they're now exposed to the GUI as well. Fixed segfault when launching Stella without a stellarc file. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1137 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
c7a073c6a2
commit
121f75314b
|
@ -28,6 +28,7 @@ _build_cheats=yes
|
|||
_build_static=no
|
||||
_build_profile=no
|
||||
_build_atarivox=no
|
||||
_build_scalers=no
|
||||
|
||||
# more defaults
|
||||
_ranlib=ranlib
|
||||
|
@ -266,8 +267,10 @@ Optional Features:
|
|||
--disable-joystick
|
||||
--enable-cheats enable/disable cheatcode support [enabled]
|
||||
--disable-cheats
|
||||
--enable-atarivox enable/disable AtariVox support [enabled]
|
||||
--enable-atarivox enable/disable AtariVox support [disabled]
|
||||
--disable-atarivox
|
||||
--enable-scalers enable/disable video scalers support [disabled]
|
||||
--disable-scalers
|
||||
--enable-shared build shared binary [enabled]
|
||||
--enable-static build static binary (if possible) [disabled]
|
||||
--disable-static
|
||||
|
@ -317,6 +320,8 @@ for ac_option in $@; do
|
|||
--disable-cheats) _build_cheats=no ;;
|
||||
--enable-atarivox) _build_atarivox=yes ;;
|
||||
--disable-atarivox) _build_atarivox=no ;;
|
||||
--enable-scalers) _build_scalers=yes ;;
|
||||
--disable-scalers) _build_scalers=no ;;
|
||||
--enable-zlib) _zlib=yes ;;
|
||||
--disable-zlib) _zlib=no ;;
|
||||
--enable-png) _png=yes ;;
|
||||
|
@ -773,6 +778,28 @@ else
|
|||
echo
|
||||
fi
|
||||
|
||||
if test "$_build_scalers" = "yes" ; then
|
||||
if test "$_build_gl" = "yes" ; then
|
||||
echo_n " Scaler support enabled in OpenGL mode"
|
||||
echo
|
||||
else
|
||||
echo_n " Scaler support disabled (OpenGL not available)"
|
||||
echo
|
||||
_build_scalers=no
|
||||
fi
|
||||
else
|
||||
echo_n " Scaler support disabled"
|
||||
echo
|
||||
fi
|
||||
|
||||
if test "$_nasm" = yes ; then
|
||||
echo_n " NASM support enabled for x86 assembly code"
|
||||
echo
|
||||
else
|
||||
echo_n " NASM support disabled"
|
||||
echo
|
||||
fi
|
||||
|
||||
if test "$_build_static" = yes ; then
|
||||
echo_n " Static binary enabled"
|
||||
echo
|
||||
|
@ -919,13 +946,10 @@ if test "$_build_atarivox" = yes ; then
|
|||
INCLUDES="$INCLUDES -I$ATARIVOX"
|
||||
fi
|
||||
|
||||
# For now, always include scalers, but only when in OpenGL mode
|
||||
_build_scalers="no"
|
||||
if test "$_build_scalers" = yes ; then
|
||||
if test "$_build_gl" = yes ; then
|
||||
MODULES="$MODULES $SCALER"
|
||||
INCLUDES="$INCLUDES -I$SCALER"
|
||||
fi
|
||||
DEFINES="$DEFINES -DSCALER_SUPPORT"
|
||||
MODULES="$MODULES $SCALER"
|
||||
INCLUDES="$INCLUDES -I$SCALER"
|
||||
fi
|
||||
|
||||
if test "$_build_profile" = no ; then
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.cxx,v 1.65 2006-10-22 18:58:45 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.66 2006-11-03 16:50:16 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
@ -320,8 +320,8 @@ bool FrameBufferGL::createScreen()
|
|||
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 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 0 );
|
||||
SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
|
||||
SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 );
|
||||
|
||||
// Set the screen coordinates
|
||||
GLdouble orthoWidth = 0.0;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.hxx,v 1.34 2006-10-22 18:58:45 stephena Exp $
|
||||
// $Id: FrameBufferGL.hxx,v 1.35 2006-11-03 16:50:16 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef FRAMEBUFFER_GL_HXX
|
||||
|
@ -40,7 +40,7 @@ class GUI::Font;
|
|||
This class implements an SDL OpenGL framebuffer.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferGL.hxx,v 1.34 2006-10-22 18:58:45 stephena Exp $
|
||||
@version $Id: FrameBufferGL.hxx,v 1.35 2006-11-03 16:50:16 stephena Exp $
|
||||
*/
|
||||
class FrameBufferGL : public FrameBuffer
|
||||
{
|
||||
|
@ -294,4 +294,3 @@ class FrameBufferGL : public FrameBuffer
|
|||
#endif // DISPLAY_OPENGL
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: scaler.cxx,v 1.1 2006-10-22 18:58:46 stephena Exp $
|
||||
// $Id: scaler.cxx,v 1.2 2006-11-03 16:50:16 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2001-2006 The ScummVM project
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
#include "intern.hxx"
|
||||
#include "scalebit.hxx"
|
||||
#include "scaler.hxx"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventHandler.cxx,v 1.166 2006-10-22 18:58:46 stephena Exp $
|
||||
// $Id: EventHandler.cxx,v 1.167 2006-11-03 16:50:17 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <sstream>
|
||||
|
@ -69,6 +69,7 @@ EventHandler::EventHandler(OSystem* osystem)
|
|||
myQuitFlag(false),
|
||||
myGrabMouseFlag(false),
|
||||
myUseLauncherFlag(false),
|
||||
myFryingFlag(false),
|
||||
myPaddleMode(0),
|
||||
myPaddleThreshold(0)
|
||||
{
|
||||
|
@ -120,23 +121,6 @@ EventHandler::EventHandler(OSystem* osystem)
|
|||
ourMessageTable[Event::ConsoleLeftDifficultyB] = "Left Difficulty B";
|
||||
ourMessageTable[Event::ConsoleRightDifficultyA] = "Right Difficulty A";
|
||||
ourMessageTable[Event::ConsoleRightDifficultyB] = "Right Difficulty B";
|
||||
|
||||
// Make sure the event/action mappings are correctly set,
|
||||
// and fill the ActionList structure with valid values
|
||||
setSDLMappings();
|
||||
setKeymap();
|
||||
setJoymap();
|
||||
setJoyAxisMap();
|
||||
setJoyHatMap();
|
||||
setActionMappings(kEmulationMode);
|
||||
setActionMappings(kMenuMode);
|
||||
|
||||
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
|
||||
|
||||
setPaddleMode(myOSystem->settings().getInt("paddle"), false);
|
||||
setPaddleThreshold(myOSystem->settings().getInt("pthresh"));
|
||||
|
||||
myFryingFlag = false;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -157,6 +141,25 @@ EventHandler::~EventHandler()
|
|||
#endif
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventHandler::initialize()
|
||||
{
|
||||
// Make sure the event/action mappings are correctly set,
|
||||
// and fill the ActionList structure with valid values
|
||||
setSDLMappings();
|
||||
setKeymap();
|
||||
setJoymap();
|
||||
setJoyAxisMap();
|
||||
setJoyHatMap();
|
||||
setActionMappings(kEmulationMode);
|
||||
setActionMappings(kMenuMode);
|
||||
|
||||
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
|
||||
|
||||
setPaddleMode(myOSystem->settings().getInt("paddle"), false);
|
||||
setPaddleThreshold(myOSystem->settings().getInt("pthresh"));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventHandler::reset(State state)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventHandler.hxx,v 1.88 2006-05-15 12:24:09 stephena Exp $
|
||||
// $Id: EventHandler.hxx,v 1.89 2006-11-03 16:50:17 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef EVENTHANDLER_HXX
|
||||
|
@ -114,7 +114,7 @@ struct JoyMouse {
|
|||
mapping can take place.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: EventHandler.hxx,v 1.88 2006-05-15 12:24:09 stephena Exp $
|
||||
@version $Id: EventHandler.hxx,v 1.89 2006-11-03 16:50:17 stephena Exp $
|
||||
*/
|
||||
class EventHandler
|
||||
{
|
||||
|
@ -139,6 +139,11 @@ class EventHandler
|
|||
*/
|
||||
Event* event() { return myEvent; }
|
||||
|
||||
/**
|
||||
Initialize state of this eventhandler.
|
||||
*/
|
||||
void initialize();
|
||||
|
||||
/**
|
||||
Set up any joysticks on the system. This must be called *after* the
|
||||
framebuffer has been created, since SDL requires the video to be
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OSystem.cxx,v 1.73 2006-10-22 18:58:46 stephena Exp $
|
||||
// $Id: OSystem.cxx,v 1.74 2006-11-03 16:50:18 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -118,6 +118,7 @@ bool OSystem::create()
|
|||
|
||||
// Create the event handler for the system
|
||||
myEventHandler = new EventHandler(this);
|
||||
myEventHandler->initialize();
|
||||
|
||||
// Create a properties set for us to use and set it up
|
||||
myPropSet = new PropertiesSet(this);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AudioDialog.cxx,v 1.19 2006-05-04 17:45:25 stephena Exp $
|
||||
// $Id: AudioDialog.cxx,v 1.20 2006-11-03 16:50:18 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -73,10 +73,40 @@ AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
|
|||
wid.push_back(myFragsizePopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Output frequency
|
||||
myFreqPopup = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth + myVolumeLabel->getWidth() - 4, lineHeight,
|
||||
"Output freq: ", lwidth);
|
||||
myFreqPopup->appendEntry("11025", 1);
|
||||
myFreqPopup->appendEntry("22050", 2);
|
||||
myFreqPopup->appendEntry("31400", 3);
|
||||
myFreqPopup->appendEntry("44100", 4);
|
||||
myFreqPopup->appendEntry("48000", 5);
|
||||
wid.push_back(myFreqPopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// TIA frequency
|
||||
myTiaFreqPopup = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth + myVolumeLabel->getWidth() - 4, lineHeight,
|
||||
"TIA freq: ", lwidth);
|
||||
myTiaFreqPopup->appendEntry("11025", 1);
|
||||
myTiaFreqPopup->appendEntry("22050", 2);
|
||||
myTiaFreqPopup->appendEntry("31400", 3);
|
||||
myTiaFreqPopup->appendEntry("44100", 4);
|
||||
myTiaFreqPopup->appendEntry("48000", 5);
|
||||
wid.push_back(myTiaFreqPopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Stereo sound
|
||||
mySoundTypeCheckbox = new CheckboxWidget(this, font, xpos+28, ypos,
|
||||
mySoundTypeCheckbox = new CheckboxWidget(this, font, 20, ypos,
|
||||
"Stereo mode", 0);
|
||||
wid.push_back(mySoundTypeCheckbox);
|
||||
|
||||
// Clip volume
|
||||
myClipVolumeCheckbox = new CheckboxWidget(this, font,
|
||||
40 + mySoundTypeCheckbox->getWidth(), ypos,
|
||||
"Clip volume", 0);
|
||||
wid.push_back(myClipVolumeCheckbox);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Enable sound
|
||||
|
@ -128,10 +158,34 @@ void AudioDialog::loadConfig()
|
|||
else if(i == 4096) i = 5;
|
||||
myFragsizePopup->setSelectedTag(i);
|
||||
|
||||
// Output frequency
|
||||
i = instance()->settings().getInt("freq");
|
||||
if(i == 11025) i = 1;
|
||||
else if(i == 22050) i = 2;
|
||||
else if(i == 31400) i = 3;
|
||||
else if(i == 44100) i = 4;
|
||||
else if(i == 48000) i = 5;
|
||||
else i = 3; // default to '31400'
|
||||
myFreqPopup->setSelectedTag(i);
|
||||
|
||||
// TIA frequency
|
||||
i = instance()->settings().getInt("tiafreq");
|
||||
if(i == 11025) i = 1;
|
||||
else if(i == 22050) i = 2;
|
||||
else if(i == 31400) i = 3;
|
||||
else if(i == 44100) i = 4;
|
||||
else if(i == 48000) i = 5;
|
||||
else i = 3; // default to '31400'
|
||||
myTiaFreqPopup->setSelectedTag(i);
|
||||
|
||||
// Stereo mode
|
||||
i = instance()->settings().getInt("channels");
|
||||
mySoundTypeCheckbox->setState(i == 2);
|
||||
|
||||
// Clip volume
|
||||
b = instance()->settings().getBool("clipvol");
|
||||
myClipVolumeCheckbox->setState(b);
|
||||
|
||||
// Enable sound
|
||||
b = instance()->settings().getBool("sound");
|
||||
mySoundEnableCheckbox->setState(b);
|
||||
|
@ -160,6 +214,22 @@ void AudioDialog::saveConfig()
|
|||
restart = true;
|
||||
}
|
||||
|
||||
// Output frequency (requires a restart to take effect)
|
||||
s = myFreqPopup->getSelectedString();
|
||||
if(instance()->settings().getString("freq") != s)
|
||||
{
|
||||
instance()->settings().setString("freq", s);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
// TIA frequency (requires a restart to take effect)
|
||||
s = myTiaFreqPopup->getSelectedString();
|
||||
if(instance()->settings().getString("tiafreq") != s)
|
||||
{
|
||||
instance()->settings().setString("tiafreq", s);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
// Enable/disable stereo sound (requires a restart to take effect)
|
||||
b = mySoundTypeCheckbox->getState();
|
||||
if((instance()->settings().getInt("channels") == 2) != b)
|
||||
|
@ -168,6 +238,14 @@ void AudioDialog::saveConfig()
|
|||
restart = true;
|
||||
}
|
||||
|
||||
// Enable/disable volume clipping (requires a restart to take effect)
|
||||
b = myClipVolumeCheckbox->getState();
|
||||
if(instance()->settings().getBool("clipvol") != b)
|
||||
{
|
||||
instance()->settings().setBool("clipvol", b);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
// Enable/disable sound (requires a restart to take effect)
|
||||
b = mySoundEnableCheckbox->getState();
|
||||
if(instance()->settings().getBool("sound") != b)
|
||||
|
@ -197,7 +275,10 @@ void AudioDialog::setDefaults()
|
|||
#else
|
||||
myFragsizePopup->setSelectedTag(2);
|
||||
#endif
|
||||
myFreqPopup->setSelectedTag(3);
|
||||
myTiaFreqPopup->setSelectedTag(3);
|
||||
|
||||
myClipVolumeCheckbox->setState(true);
|
||||
mySoundTypeCheckbox->setState(false);
|
||||
mySoundEnableCheckbox->setState(true);
|
||||
|
||||
|
@ -213,7 +294,10 @@ void AudioDialog::handleSoundEnableChange(bool active)
|
|||
myVolumeSlider->setEnabled(active);
|
||||
myVolumeLabel->setEnabled(active);
|
||||
myFragsizePopup->setEnabled(active);
|
||||
myFreqPopup->setEnabled(active);
|
||||
myTiaFreqPopup->setEnabled(active);
|
||||
mySoundTypeCheckbox->setEnabled(active);
|
||||
myClipVolumeCheckbox->setEnabled(active);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AudioDialog.hxx,v 1.7 2006-02-22 17:38:04 stephena Exp $
|
||||
// $Id: AudioDialog.hxx,v 1.8 2006-11-03 16:50:18 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -49,7 +49,10 @@ class AudioDialog : public Dialog
|
|||
SliderWidget* myVolumeSlider;
|
||||
StaticTextWidget* myVolumeLabel;
|
||||
PopUpWidget* myFragsizePopup;
|
||||
PopUpWidget* myFreqPopup;
|
||||
PopUpWidget* myTiaFreqPopup;
|
||||
CheckboxWidget* mySoundTypeCheckbox;
|
||||
CheckboxWidget* myClipVolumeCheckbox;
|
||||
CheckboxWidget* mySoundEnableCheckbox;
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OptionsDialog.cxx,v 1.40 2006-10-16 01:09:00 stephena Exp $
|
||||
// $Id: OptionsDialog.cxx,v 1.41 2006-11-03 16:50:19 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -120,7 +120,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
|
|||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||
myVideoDialog = new VideoDialog(myOSystem, parent, font, x, y, w, h);
|
||||
|
||||
w = 200; h = 110;
|
||||
w = 200; h = 140;
|
||||
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
|
||||
myAudioDialog = new AudioDialog(myOSystem, parent, font, x, y, w, h);
|
||||
|
||||
|
|
Loading…
Reference in New Issue