GUI support is now conditional in Stella. This is enabled by default for all ports except libretro.

- When disabled, it also disables the debugger and cheatcode support
- UI-wise, this reverts Stella to 1.x functionality (before any internal UI was added)
- Eliminates 47000 lines of code for those ports (like libretro) that don't need it.
This commit is contained in:
Stephen Anthony 2019-05-02 17:58:39 -02:30
parent 5a7d18159b
commit 83a3bdd6cd
63 changed files with 361 additions and 414 deletions

View File

@ -70,6 +70,10 @@
* PNG/ZIP image support is now conditionally compiled into Stella. * PNG/ZIP image support is now conditionally compiled into Stella.
All major ports (Linux/macOS/Windows) have it enabled by default. All major ports (Linux/macOS/Windows) have it enabled by default.
* SDL/GUI support is now conditionally compiled into Stella. All major
ports (Linux/macOS/Windows) have it enabled by default. This is
currently used only by the libretro port.
-Have fun! -Have fun!

View File

@ -150,13 +150,12 @@ MODULES := $(MODULES)
# After the game specific modules follow the shared modules # After the game specific modules follow the shared modules
MODULES += \ MODULES += \
src/common \
src/common/audio \
src/common/tv_filters \
src/emucore \ src/emucore \
src/emucore/tia \ src/emucore/tia \
src/emucore/tia/frame-manager \ src/emucore/tia/frame-manager
src/gui \
src/common \
src/common/tv_filters \
src/common/audio
###################################################################### ######################################################################
# The build rules follow - normally you should have no need to # The build rules follow - normally you should have no need to

26
configure vendored
View File

@ -14,6 +14,7 @@
CXXFLAGS="$CXXFLAGS $CPPFLAGS" CXXFLAGS="$CXXFLAGS $CPPFLAGS"
# default option behaviour yes/no # default option behaviour yes/no
_build_gui=yes
_build_windowed=yes _build_windowed=yes
_build_sound=yes _build_sound=yes
_build_debugger=yes _build_debugger=yes
@ -190,9 +191,11 @@ Installation directories:
--datadir=DIR directory to install icons/data files [PREFIX/share] --datadir=DIR directory to install icons/data files [PREFIX/share]
Optional Features: Optional Features:
--enable-gui enable/disable the entire built-in UI [enabled]
--disable-gui
--enable-sound enable/disable sound support [enabled] --enable-sound enable/disable sound support [enabled]
--disable-sound --disable-sound
--enable-debugger enable/disable all debugger options [disabled] --enable-debugger enable/disable all debugger options [enabled]
--disable-debugger --disable-debugger
--enable-joystick enable/disable joystick support [enabled] --enable-joystick enable/disable joystick support [enabled]
--disable-joystick --disable-joystick
@ -235,6 +238,8 @@ done # for parm in ...
for ac_option in $@; do for ac_option in $@; do
case "$ac_option" in case "$ac_option" in
--enable-gui) _build_gui=yes ;;
--disable-gui) _build_gui=no ;;
--enable-sound) _build_sound=yes ;; --enable-sound) _build_sound=yes ;;
--disable-sound) _build_sound=no ;; --disable-sound) _build_sound=no ;;
--enable-debugger) _build_debugger=yes ;; --enable-debugger) _build_debugger=yes ;;
@ -530,6 +535,7 @@ if test -n "$_host"; then
case "$_host" in case "$_host" in
retron77) retron77)
echo "Compiling for $_host, disabling windowed mode, debugger and cheats." echo "Compiling for $_host, disabling windowed mode, debugger and cheats."
_build_gui=yes
_build_windowed=no _build_windowed=no
_build_debugger=no _build_debugger=no
_build_cheats=no _build_cheats=no
@ -686,6 +692,16 @@ echo
echo_n "Summary:" echo_n "Summary:"
echo echo
if test "$_build_gui" = "yes" ; then
echo_n " GUI enabled"
echo
else
echo_n " GUI disabled"
echo
_build_debugger=no
_build_cheats=no
fi
if test "$_build_sound" = "yes" ; then if test "$_build_sound" = "yes" ; then
echo_n " Sound support enabled" echo_n " Sound support enabled"
echo echo
@ -797,7 +813,7 @@ LIBPNG="$SRC/libpng"
ZLIB="$SRC/zlib" ZLIB="$SRC/zlib"
SQLITE="$SRC/common/repository/sqlite" SQLITE="$SRC/common/repository/sqlite"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA -I$TIA_FRAME_MANAGER" INCLUDES="-I$CORE -I$COMMON -I$TV -I$TIA -I$TIA_FRAME_MANAGER"
INCLUDES="$INCLUDES `$_sdlconfig --cflags`" INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
if test "$_build_static" = yes ; then if test "$_build_static" = yes ; then
@ -838,6 +854,12 @@ case $_host_os in
;; ;;
esac esac
if test "$_build_gui" = yes ; then
DEFINES="$DEFINES -DGUI_SUPPORT"
MODULES="$MODULES $GUI"
INCLUDES="$INCLUDES -I$GUI"
fi
if test "$_build_windowed" = yes ; then if test "$_build_windowed" = yes ; then
DEFINES="$DEFINES -DWINDOWED_SUPPORT" DEFINES="$DEFINES -DWINDOWED_SUPPORT"
fi fi

View File

@ -77,13 +77,13 @@ uInt32 FBSurfaceSDL2::height() const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const GUI::Rect& FBSurfaceSDL2::srcRect() const const Common::Rect& FBSurfaceSDL2::srcRect() const
{ {
return mySrcGUIR; return mySrcGUIR;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const GUI::Rect& FBSurfaceSDL2::dstRect() const const Common::Rect& FBSurfaceSDL2::dstRect() const
{ {
return myDstGUIR; return myDstGUIR;
} }

View File

@ -45,8 +45,8 @@ class FBSurfaceSDL2 : public FBSurface
uInt32 width() const override; uInt32 width() const override;
uInt32 height() const override; uInt32 height() const override;
const GUI::Rect& srcRect() const override; const Common::Rect& srcRect() const override;
const GUI::Rect& dstRect() const override; const Common::Rect& dstRect() const override;
void setSrcPos(uInt32 x, uInt32 y) override; void setSrcPos(uInt32 x, uInt32 y) override;
void setSrcSize(uInt32 w, uInt32 h) override; void setSrcSize(uInt32 w, uInt32 h) override;
void setDstPos(uInt32 x, uInt32 y) override; void setDstPos(uInt32 x, uInt32 y) override;
@ -92,7 +92,7 @@ class FBSurfaceSDL2 : public FBSurface
unique_ptr<uInt32[]> myStaticData; // The data to use when the buffer contents are static unique_ptr<uInt32[]> myStaticData; // The data to use when the buffer contents are static
uInt32 myStaticPitch; // The number of bytes in a row of static data uInt32 myStaticPitch; // The number of bytes in a row of static data
GUI::Rect mySrcGUIR, myDstGUIR; Common::Rect mySrcGUIR, myDstGUIR;
}; };
#endif #endif

View File

@ -20,15 +20,13 @@
#include "Logger.hxx" #include "Logger.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "Font.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "ThreadDebugging.hxx"
#include "FBSurfaceSDL2.hxx" #include "FBSurfaceSDL2.hxx"
#include "FrameBufferSDL2.hxx" #include "FrameBufferSDL2.hxx"
#include "ThreadDebugging.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBufferSDL2::FrameBufferSDL2(OSystem& osystem) FrameBufferSDL2::FrameBufferSDL2(OSystem& osystem)
: FrameBuffer(osystem), : FrameBuffer(osystem),
@ -83,8 +81,8 @@ FrameBufferSDL2::~FrameBufferSDL2()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::queryHardware(vector<GUI::Size>& fullscreenRes, void FrameBufferSDL2::queryHardware(vector<Common::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes, vector<Common::Size>& windowedRes,
VariantList& renderers) VariantList& renderers)
{ {
ASSERT_MAIN_THREAD; ASSERT_MAIN_THREAD;
@ -377,7 +375,7 @@ unique_ptr<FBSurface>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::readPixels(uInt8* pixels, uInt32 pitch, void FrameBufferSDL2::readPixels(uInt8* pixels, uInt32 pitch,
const GUI::Rect& rect) const const Common::Rect& rect) const
{ {
ASSERT_MAIN_THREAD; ASSERT_MAIN_THREAD;

View File

@ -95,7 +95,7 @@ class FrameBufferSDL2 : public FrameBuffer
@param pitch The pitch (in bytes) for the pixel data @param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer @param rect The bounding rectangle for the buffer
*/ */
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override; void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const override;
/** /**
Clear the frame buffer Clear the frame buffer
@ -115,8 +115,8 @@ class FrameBufferSDL2 : public FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode @param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name) @param renderers List of renderer names (internal name -> end-user name)
*/ */
void queryHardware(vector<GUI::Size>& fullscreenRes, void queryHardware(vector<Common::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes, vector<Common::Size>& windowedRes,
VariantList& renderers) override; VariantList& renderers) override;
/** /**

View File

@ -21,9 +21,12 @@
#include "Joystick.hxx" #include "Joystick.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"
#include "DialogContainer.hxx"
#include "PJoystickHandler.hxx" #include "PJoystickHandler.hxx"
#ifdef GUI_SUPPORT
#include "DialogContainer.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::PhysicalJoystickHandler( PhysicalJoystickHandler::PhysicalJoystickHandler(
OSystem& system, EventHandler& handler, Event& event) OSystem& system, EventHandler& handler, Event& event)
@ -565,7 +568,9 @@ void PhysicalJoystickHandler::handleAxisEvent(int stick, int axis, int value)
// (only pass on the event if the state has changed) // (only pass on the event if the state has changed)
if(value != j->axisLastValue[axis]) if(value != j->axisLastValue[axis])
{ {
#ifdef GUI_SUPPORT
myHandler.overlay().handleJoyAxisEvent(stick, axis, value); myHandler.overlay().handleJoyAxisEvent(stick, axis, value);
#endif
j->axisLastValue[axis] = value; j->axisLastValue[axis] = value;
} }
} }
@ -608,8 +613,10 @@ void PhysicalJoystickHandler::handleBtnEvent(int stick, int button, bool pressed
// Determine which mode we're in, then send the event to the appropriate place // Determine which mode we're in, then send the event to the appropriate place
if(myHandler.state() == EventHandlerState::EMULATION) if(myHandler.state() == EventHandlerState::EMULATION)
myHandler.handleEvent(j->btnTable[button][kEmulationMode], pressed); myHandler.handleEvent(j->btnTable[button][kEmulationMode], pressed);
#ifdef GUI_SUPPORT
else if(myHandler.hasOverlay()) else if(myHandler.hasOverlay())
myHandler.overlay().handleJoyBtnEvent(stick, button, pressed); myHandler.overlay().handleJoyBtnEvent(stick, button, pressed);
#endif
break; // Regular button break; // Regular button
// These events don't have to pass through handleEvent, since // These events don't have to pass through handleEvent, since
@ -671,6 +678,7 @@ void PhysicalJoystickHandler::handleHatEvent(int stick, int hat, int value)
myHandler.handleEvent(j->hatTable[hat][int(JoyHat::LEFT)][kEmulationMode], myHandler.handleEvent(j->hatTable[hat][int(JoyHat::LEFT)][kEmulationMode],
value & EVENT_HATLEFT_M); value & EVENT_HATLEFT_M);
} }
#ifdef GUI_SUPPORT
else if(myHandler.hasOverlay()) else if(myHandler.hasOverlay())
{ {
if(value == EVENT_HATCENTER_M) if(value == EVENT_HATCENTER_M)
@ -687,6 +695,7 @@ void PhysicalJoystickHandler::handleHatEvent(int stick, int hat, int value)
myHandler.overlay().handleJoyHatEvent(stick, hat, JoyHat::LEFT); myHandler.overlay().handleJoyHatEvent(stick, hat, JoyHat::LEFT);
} }
} }
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -25,12 +25,14 @@
#include "StellaKeys.hxx" #include "StellaKeys.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "PNGLibrary.hxx" #include "PNGLibrary.hxx"
#include "DialogContainer.hxx"
#include "PKeyboardHandler.hxx" #include "PKeyboardHandler.hxx"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx" #include "Debugger.hxx"
#endif #endif
#ifdef GUI_SUPPORT
#include "DialogContainer.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalKeyboardHandler::PhysicalKeyboardHandler( PhysicalKeyboardHandler::PhysicalKeyboardHandler(
@ -337,8 +339,10 @@ void PhysicalKeyboardHandler::handleEvent(StellaKey key, StellaMod mod, bool pre
break; break;
default: default:
#ifdef GUI_SUPPORT
if(myHandler.hasOverlay()) if(myHandler.hasOverlay())
myHandler.overlay().handleKeyEvent(key, mod, pressed); myHandler.overlay().handleKeyEvent(key, mod, pressed);
#endif
break; break;
} }
} }

View File

@ -131,7 +131,7 @@ void PNGLibrary::saveImage(const string& filename, const VariantList& comments)
throw runtime_error("ERROR: Couldn't create snapshot file"); throw runtime_error("ERROR: Couldn't create snapshot file");
const FrameBuffer& fb = myOSystem.frameBuffer(); const FrameBuffer& fb = myOSystem.frameBuffer();
const GUI::Rect& rect = fb.imageRect(); const Common::Rect& rect = fb.imageRect();
png_uint_32 width = rect.width(), height = rect.height(); png_uint_32 width = rect.width(), height = rect.height();
// Get framebuffer pixel data (we get ABGR format) // Get framebuffer pixel data (we get ABGR format)
@ -149,7 +149,7 @@ void PNGLibrary::saveImage(const string& filename, const VariantList& comments)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PNGLibrary::saveImage(const string& filename, const FBSurface& surface, void PNGLibrary::saveImage(const string& filename, const FBSurface& surface,
const GUI::Rect& rect, const VariantList& comments) const Common::Rect& rect, const VariantList& comments)
{ {
ofstream out(filename, std::ios_base::binary); ofstream out(filename, std::ios_base::binary);
if(!out.is_open()) if(!out.is_open())
@ -347,7 +347,7 @@ void PNGLibrary::takeSnapshot(uInt32 number)
string message = "Snapshot saved"; string message = "Snapshot saved";
try try
{ {
GUI::Rect rect; Common::Rect rect;
const FBSurface& surface = myOSystem.frameBuffer().tiaSurface().baseSurface(rect); const FBSurface& surface = myOSystem.frameBuffer().tiaSurface().baseSurface(rect);
myOSystem.png().saveImage(filename, surface, rect, comments); myOSystem.png().saveImage(filename, surface, rect, comments);
} }

View File

@ -15,11 +15,11 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#if defined(PNG_SUPPORT)
#ifndef PNGLIBRARY_HXX #ifndef PNGLIBRARY_HXX
#define PNGLIBRARY_HXX #define PNGLIBRARY_HXX
#if defined(PNG_SUPPORT)
#include <png.h> #include <png.h>
class OSystem; class OSystem;
@ -82,7 +82,7 @@ class PNGLibrary
more detailed error message. more detailed error message.
*/ */
void saveImage(const string& filename, const FBSurface& surface, void saveImage(const string& filename, const FBSurface& surface,
const GUI::Rect& rect = GUI::EmptyRect, const Common::Rect& rect = Common::EmptyRect,
const VariantList& comments = EmptyVarList); const VariantList& comments = EmptyVarList);
/** /**
@ -199,6 +199,6 @@ class PNGLibrary
PNGLibrary& operator=(PNGLibrary&&) = delete; PNGLibrary& operator=(PNGLibrary&&) = delete;
}; };
#endif // PNG_SUPPORT
#endif #endif
#endif // PNG_SUPPORT

View File

@ -25,7 +25,7 @@
#include "bspf.hxx" #include "bspf.hxx"
namespace GUI { namespace Common {
/* /*
This small class is an helper for position and size values. This small class is an helper for position and size values.
@ -163,6 +163,6 @@ struct Rect
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Rect EmptyRect; static const Rect EmptyRect;
} // End of namespace GUI } // End of namespace Common
#endif #endif

View File

@ -52,7 +52,7 @@ class Variant
Variant(float f) { buf().str(""); buf() << f; data = buf().str(); } Variant(float f) { buf().str(""); buf() << f; data = buf().str(); }
Variant(double d) { buf().str(""); buf() << d; data = buf().str(); } Variant(double d) { buf().str(""); buf() << d; data = buf().str(); }
Variant(bool b) { buf().str(""); buf() << b; data = buf().str(); } Variant(bool b) { buf().str(""); buf() << b; data = buf().str(); }
Variant(const GUI::Size& s) { buf().str(""); buf() << s; data = buf().str(); } Variant(const Common::Size& s) { buf().str(""); buf() << s; data = buf().str(); }
// Conversion methods // Conversion methods
const string& toString() const { return data; } const string& toString() const { return data; }
@ -72,7 +72,7 @@ class Variant
return parsed; return parsed;
} }
const bool toBool() const { return data == "1" || data == "true"; } const bool toBool() const { return data == "1" || data == "true"; }
const GUI::Size toSize() const { return GUI::Size(data); } const Common::Size toSize() const { return Common::Size(data); }
// Comparison // Comparison
bool operator==(const Variant& v) const { return data == v.data; } bool operator==(const Variant& v) const { return data == v.data; }

View File

@ -91,8 +91,8 @@ Debugger::~Debugger()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::initialize() void Debugger::initialize()
{ {
const GUI::Size& s = myOSystem.settings().getSize("dbg.res"); const Common::Size& s = myOSystem.settings().getSize("dbg.res");
const GUI::Size& d = myOSystem.frameBuffer().desktopSize(); const Common::Size& d = myOSystem.frameBuffer().desktopSize();
myWidth = s.w; myHeight = s.h; myWidth = s.w; myHeight = s.h;
// The debugger dialog is resizable, within certain bounds // The debugger dialog is resizable, within certain bounds
@ -102,7 +102,7 @@ void Debugger::initialize()
myWidth = std::min(myWidth, uInt32(d.w)); myWidth = std::min(myWidth, uInt32(d.w));
myHeight = std::min(myHeight, uInt32(d.h)); myHeight = std::min(myHeight, uInt32(d.h));
myOSystem.settings().setValue("dbg.res", GUI::Size(myWidth, myHeight)); myOSystem.settings().setValue("dbg.res", Common::Size(myWidth, myHeight));
delete myBaseDialog; myBaseDialog = myDialog = nullptr; delete myBaseDialog; myBaseDialog = myDialog = nullptr;
myDialog = new DebuggerDialog(myOSystem, *this, 0, 0, myWidth, myHeight); myDialog = new DebuggerDialog(myOSystem, *this, 0, 0, myWidth, myHeight);

View File

@ -668,9 +668,9 @@ void DataGridWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DataGridWidget::getEditRect() const Common::Rect DataGridWidget::getEditRect() const
{ {
GUI::Rect r(1, 0, _colWidth, _rowHeight); Common::Rect r(1, 0, _colWidth, _rowHeight);
const int rowoffset = _currentRow * _rowHeight; const int rowoffset = _currentRow * _rowHeight;
const int coloffset = _currentCol * _colWidth + 4; const int coloffset = _currentCol * _colWidth + 4;
r.top += rowoffset; r.top += rowoffset;

View File

@ -92,7 +92,7 @@ class DataGridWidget : public EditableWidget
void endEditMode() override; void endEditMode() override;
void abortEditMode() override; void abortEditMode() override;
GUI::Rect getEditRect() const override; Common::Rect getEditRect() const override;
void receivedFocusWidget() override; void receivedFocusWidget() override;
void lostFocusWidget() override; void lostFocusWidget() override;

View File

@ -430,7 +430,7 @@ void DebuggerDialog::showFatalMessage(const string& msg)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::addTiaArea() void DebuggerDialog::addTiaArea()
{ {
const GUI::Rect& r = getTiaBounds(); const Common::Rect& r = getTiaBounds();
myTiaOutput = myTiaOutput =
new TiaOutputWidget(this, *myNFont, r.left, r.top, r.width(), r.height()); new TiaOutputWidget(this, *myNFont, r.left, r.top, r.width(), r.height());
} }
@ -438,7 +438,7 @@ void DebuggerDialog::addTiaArea()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::addTabArea() void DebuggerDialog::addTabArea()
{ {
const GUI::Rect& r = getTabBounds(); const Common::Rect& r = getTabBounds();
const int vBorder = 4; const int vBorder = 4;
// The tab widget // The tab widget
@ -488,7 +488,7 @@ void DebuggerDialog::addTabArea()
void DebuggerDialog::addStatusArea() void DebuggerDialog::addStatusArea()
{ {
const int lineHeight = myLFont->getLineHeight(); const int lineHeight = myLFont->getLineHeight();
const GUI::Rect& r = getStatusBounds(); const Common::Rect& r = getStatusBounds();
int xpos, ypos; int xpos, ypos;
xpos = r.left; ypos = r.top; xpos = r.left; ypos = r.top;
@ -540,7 +540,7 @@ void DebuggerDialog::addRomArea()
0b0100000 0b0100000
}; };
const GUI::Rect& r = getRomBounds(); const Common::Rect& r = getRomBounds();
const int VBORDER = 4; const int VBORDER = 4;
WidgetArray wid1, wid2; WidgetArray wid1, wid2;
ButtonWidget* b; ButtonWidget* b;
@ -681,47 +681,47 @@ void DebuggerDialog::addRomArea()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getTiaBounds() const Common::Rect DebuggerDialog::getTiaBounds() const
{ {
// The area showing the TIA image (NTSC and PAL supported, up to 260 lines) // The area showing the TIA image (NTSC and PAL supported, up to 260 lines)
GUI::Rect r(0, 0, 320, std::max(260, int(_h * 0.35))); Common::Rect r(0, 0, 320, std::max(260, int(_h * 0.35)));
return r; return r;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getRomBounds() const Common::Rect DebuggerDialog::getRomBounds() const
{ {
// The ROM area is the full area to the right of the tabs // The ROM area is the full area to the right of the tabs
const GUI::Rect& status = getStatusBounds(); const Common::Rect& status = getStatusBounds();
GUI::Rect r(status.right + 1, 0, _w, _h); Common::Rect r(status.right + 1, 0, _w, _h);
return r; return r;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getStatusBounds() const Common::Rect DebuggerDialog::getStatusBounds() const
{ {
// The status area is the full area to the right of the TIA image // The status area is the full area to the right of the TIA image
// extending as far as necessary // extending as far as necessary
// 30% of any space above 1030 pixels will be allocated to this area // 30% of any space above 1030 pixels will be allocated to this area
const GUI::Rect& tia = getTiaBounds(); const Common::Rect& tia = getTiaBounds();
int x1 = tia.right + 1; int x1 = tia.right + 1;
int y1 = 0; int y1 = 0;
int x2 = tia.right + 225 + (_w > 1030 ? int(0.35 * (_w - 1030)) : 0); int x2 = tia.right + 225 + (_w > 1030 ? int(0.35 * (_w - 1030)) : 0);
int y2 = tia.bottom; int y2 = tia.bottom;
GUI::Rect r(x1, y1, x2, y2); Common::Rect r(x1, y1, x2, y2);
return r; return r;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect DebuggerDialog::getTabBounds() const Common::Rect DebuggerDialog::getTabBounds() const
{ {
// The tab area is the full area below the TIA image // The tab area is the full area below the TIA image
const GUI::Rect& tia = getTiaBounds(); const Common::Rect& tia = getTiaBounds();
const GUI::Rect& status = getStatusBounds(); const Common::Rect& status = getStatusBounds();
GUI::Rect r(0, tia.bottom + 1, status.right + 1, _h); Common::Rect r(0, tia.bottom + 1, status.right + 1, _h);
return r; return r;
} }

View File

@ -98,10 +98,10 @@ class DebuggerDialog : public Dialog
void addStatusArea(); void addStatusArea();
void addRomArea(); void addRomArea();
GUI::Rect getTiaBounds() const; Common::Rect getTiaBounds() const;
GUI::Rect getRomBounds() const; Common::Rect getRomBounds() const;
GUI::Rect getStatusBounds() const; Common::Rect getStatusBounds() const;
GUI::Rect getTabBounds() const; Common::Rect getTabBounds() const;
private: private:
enum { enum {

View File

@ -102,7 +102,7 @@ void RomListSettings::center()
{ {
// Make sure the menu is exactly where it should be, in case the image // Make sure the menu is exactly where it should be, in case the image
// offset has changed // offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect(); const Common::Rect& image = instance().frameBuffer().imageRect();
uInt32 x = image.x() + _xorig; uInt32 x = image.x() + _xorig;
uInt32 y = image.y() + _yorig; uInt32 y = image.y() + _yorig;
uInt32 tx = image.x() + image.width(); uInt32 tx = image.x() + image.width();

View File

@ -469,8 +469,8 @@ void RomListWidget::drawWidget(bool hilite)
int i, pos, xpos, ypos, len = int(dlist.size()); int i, pos, xpos, ypos, len = int(dlist.size());
ColorId textColor = onTop ? kTextColor : kColor; ColorId textColor = onTop ? kTextColor : kColor;
const GUI::Rect& r = getEditRect(); const Common::Rect& r = getEditRect();
const GUI::Rect& l = getLineRect(); const Common::Rect& l = getLineRect();
// Draw a thin frame around the list and to separate columns // Draw a thin frame around the list and to separate columns
s.frameRect(_x, _y, _w + 1, _h, hilite ? kWidColorHi : kColor); s.frameRect(_x, _y, _w + 1, _h, hilite ? kWidColorHi : kColor);
@ -568,9 +568,9 @@ void RomListWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect RomListWidget::getLineRect() const Common::Rect RomListWidget::getLineRect() const
{ {
GUI::Rect r(2, 1, _w, _fontHeight); Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight, const int yoffset = (_selectedItem - _currentPos) * _fontHeight,
xoffset = CheckboxWidget::boxSize() + 10; xoffset = CheckboxWidget::boxSize() + 10;
r.top += yoffset; r.top += yoffset;
@ -582,9 +582,9 @@ GUI::Rect RomListWidget::getLineRect() const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect RomListWidget::getEditRect() const Common::Rect RomListWidget::getEditRect() const
{ {
GUI::Rect r(2, 1, _w, _fontHeight); Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight; const int yoffset = (_selectedItem - _currentPos) * _fontHeight;
r.top += yoffset; r.top += yoffset;
r.bottom += yoffset; r.bottom += yoffset;

View File

@ -70,8 +70,8 @@ class RomListWidget : public EditableWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
GUI::Rect getLineRect() const; Common::Rect getLineRect() const;
GUI::Rect getEditRect() const override; Common::Rect getEditRect() const override;
int findItem(int x, int y) const; int findItem(int x, int y) const;
void recalc(); void recalc();

View File

@ -81,7 +81,7 @@ void TiaOutputWidget::saveSnapshot(int execDepth, const string& execPrefix)
// to skip borders, add 1 to origin // to skip borders, add 1 to origin
int x = _x + 1, y = _y + 1; int x = _x + 1, y = _y + 1;
GUI::Rect rect(x, y, x + width*2, y + height); Common::Rect rect(x, y, x + width*2, y + height);
string message = "Snapshot saved"; string message = "Snapshot saved";
try try
{ {

View File

@ -27,7 +27,9 @@ class GuiObject;
#include "bspf.hxx" #include "bspf.hxx"
#include "Device.hxx" #include "Device.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "Font.hxx" #ifdef DEBUGGER_SUPPORT
#include "Font.hxx"
#endif
/** /**
A cartridge is a device which contains the machine code for a A cartridge is a device which contains the machine code for a
@ -199,6 +201,7 @@ class Cartridge : public Device
*/ */
virtual uInt32 thumbCallback(uInt8 function, uInt32 value1, uInt32 value2) { return 0; } virtual uInt32 thumbCallback(uInt8 function, uInt32 value1, uInt32 value2) { return 0; }
#ifdef DEBUGGER_SUPPORT
/** /**
Get optional debugger widget responsible for displaying info about the cart. Get optional debugger widget responsible for displaying info about the cart.
This can be used when the debugWidget runs out of space. This can be used when the debugWidget runs out of space.
@ -220,6 +223,7 @@ class Cartridge : public Device
{ {
return nullptr; return nullptr;
} }
#endif
protected: protected:
/** /**

View File

@ -50,8 +50,6 @@
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"
#include "Serializer.hxx" #include "Serializer.hxx"
#include "TimerManager.hxx" #include "TimerManager.hxx"
@ -64,13 +62,12 @@
#include "frame-manager/FrameLayoutDetector.hxx" #include "frame-manager/FrameLayoutDetector.hxx"
#include "frame-manager/YStartDetector.hxx" #include "frame-manager/YStartDetector.hxx"
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#ifdef CHEATCODE_SUPPORT #ifdef CHEATCODE_SUPPORT
#include "CheatManager.hxx" #include "CheatManager.hxx"
#endif #endif
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
#include "Console.hxx" #include "Console.hxx"

View File

@ -22,23 +22,16 @@
#include "Logger.hxx" #include "Logger.hxx"
#include "Base.hxx" #include "Base.hxx"
#include "CommandMenu.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "DialogContainer.hxx"
#include "Event.hxx" #include "Event.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "FSNode.hxx" #include "FSNode.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "Menu.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Joystick.hxx" #include "Joystick.hxx"
#include "Paddles.hxx" #include "Paddles.hxx"
#include "PJoystickHandler.hxx" #include "PJoystickHandler.hxx"
#include "PointingDevice.hxx" #include "PointingDevice.hxx"
#include "PropsSet.hxx" #include "PropsSet.hxx"
#include "ListWidget.hxx"
#include "ScrollBarWidget.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "Sound.hxx" #include "Sound.hxx"
#include "StateManager.hxx" #include "StateManager.hxx"
@ -58,6 +51,15 @@
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx" #include "Debugger.hxx"
#endif #endif
#ifdef GUI_SUPPORT
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "DialogContainer.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "ListWidget.hxx"
#include "ScrollBarWidget.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandler::EventHandler(OSystem& osystem) EventHandler::EventHandler(OSystem& osystem)
@ -100,11 +102,13 @@ void EventHandler::initialize()
Paddles::setMouseSensitivity(myOSystem.settings().getInt("msense")); Paddles::setMouseSensitivity(myOSystem.settings().getInt("msense"));
PointingDevice::setSensitivity(myOSystem.settings().getInt("tsense")); PointingDevice::setSensitivity(myOSystem.settings().getInt("tsense"));
#ifdef GUI_SUPPORT
// Set quick select delay when typing characters in listwidgets // Set quick select delay when typing characters in listwidgets
ListWidget::setQuickSelectDelay(myOSystem.settings().getInt("listdelay")); ListWidget::setQuickSelectDelay(myOSystem.settings().getInt("listdelay"));
// Set number of lines a mousewheel will scroll // Set number of lines a mousewheel will scroll
ScrollBarWidget::setWheelLines(myOSystem.settings().getInt("mwheel")); ScrollBarWidget::setWheelLines(myOSystem.settings().getInt("mwheel"));
#endif
// Integer to string conversions (for HEX) use upper or lower-case // Integer to string conversions (for HEX) use upper or lower-case
Common::Base::setHexUppercase(myOSystem.settings().getBool("dbg.uhex")); Common::Base::setHexUppercase(myOSystem.settings().getBool("dbg.uhex"));
@ -230,9 +234,11 @@ void EventHandler::poll(uInt64 time)
} }
else if(myOverlay) else if(myOverlay)
{ {
#ifdef GUI_SUPPORT
// Update the current dialog container at regular intervals // Update the current dialog container at regular intervals
// Used to implement continuous events // Used to implement continuous events
myOverlay->updateTime(time); myOverlay->updateTime(time);
#endif
} }
// Turn off all mouse-related items; if they haven't been taken care of // Turn off all mouse-related items; if they haven't been taken care of
@ -244,9 +250,11 @@ void EventHandler::poll(uInt64 time)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::handleTextEvent(char text) void EventHandler::handleTextEvent(char text)
{ {
#ifdef GUI_SUPPORT
// Text events are only used in GUI mode // Text events are only used in GUI mode
if(myOverlay) if(myOverlay)
myOverlay->handleTextEvent(text); myOverlay->handleTextEvent(text);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -262,8 +270,10 @@ void EventHandler::handleMouseMotionEvent(int x, int y, int xrel, int yrel)
} }
mySkipMouseMotion = false; mySkipMouseMotion = false;
} }
#ifdef GUI_SUPPORT
else if(myOverlay) else if(myOverlay)
myOverlay->handleMouseMotionEvent(x, y); myOverlay->handleMouseMotionEvent(x, y);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -285,8 +295,10 @@ void EventHandler::handleMouseButtonEvent(MouseButton b, bool pressed,
return; return;
} }
} }
#ifdef GUI_SUPPORT
else if(myOverlay) else if(myOverlay)
myOverlay->handleMouseButtonEvent(b, pressed, x, y); myOverlay->handleMouseButtonEvent(b, pressed, x, y);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1121,16 +1133,20 @@ void EventHandler::setMouseControllerMode(const string& enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::enterMenuMode(EventHandlerState state) void EventHandler::enterMenuMode(EventHandlerState state)
{ {
#ifdef GUI_SUPPORT
setState(state); setState(state);
myOverlay->reStack(); myOverlay->reStack();
myOSystem.sound().mute(true); myOSystem.sound().mute(true);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::leaveMenuMode() void EventHandler::leaveMenuMode()
{ {
#ifdef GUI_SUPPORT
setState(EventHandlerState::EMULATION); setState(EventHandlerState::EMULATION);
myOSystem.sound().mute(false); myOSystem.sound().mute(false);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1187,6 +1203,7 @@ void EventHandler::leaveDebugMode()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind) void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind)
{ {
#ifdef GUI_SUPPORT
// add one extra state if we are in Time Machine mode // add one extra state if we are in Time Machine mode
// TODO: maybe remove this state if we leave the menu at this new state // TODO: maybe remove this state if we leave the menu at this new state
myOSystem.state().addExtraState("enter Time Machine dialog"); // force new state myOSystem.state().addExtraState("enter Time Machine dialog"); // force new state
@ -1196,6 +1213,7 @@ void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind)
myOSystem.timeMachine().setEnterWinds(unwind ? numWinds : -numWinds); myOSystem.timeMachine().setEnterWinds(unwind ? numWinds : -numWinds);
enterMenuMode(EventHandlerState::TIMEMACHINE); enterMenuMode(EventHandlerState::TIMEMACHINE);
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1224,6 +1242,7 @@ void EventHandler::setState(EventHandlerState state)
enableTextEvents(false); enableTextEvents(false);
break; break;
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU: case EventHandlerState::OPTIONSMENU:
myOverlay = &myOSystem.menu(); myOverlay = &myOSystem.menu();
enableTextEvents(true); enableTextEvents(true);
@ -1244,15 +1263,17 @@ void EventHandler::setState(EventHandlerState state)
myOverlay = &myOSystem.launcher(); myOverlay = &myOSystem.launcher();
enableTextEvents(true); enableTextEvents(true);
break; break;
#endif
case EventHandlerState::DEBUGGER:
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER:
myOverlay = &myOSystem.debugger(); myOverlay = &myOSystem.debugger();
enableTextEvents(true); enableTextEvents(true);
#endif
break; break;
#endif
case EventHandlerState::NONE: case EventHandlerState::NONE:
default:
break; break;
} }

View File

@ -17,11 +17,14 @@
#include <cmath> #include <cmath>
#include "Font.hxx"
#include "Rect.hxx" #include "Rect.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "FBSurface.hxx" #include "FBSurface.hxx"
#ifdef GUI_SUPPORT
#include "Font.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FBSurface::FBSurface() FBSurface::FBSurface()
: myPixels(nullptr), : myPixels(nullptr),
@ -37,7 +40,7 @@ FBSurface::FBSurface()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const void FBSurface::readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const
{ {
uInt8* src = reinterpret_cast<uInt8*>(myPixels + rect.y() * myPitch + rect.x()); uInt8* src = reinterpret_cast<uInt8*>(myPixels + rect.y() * myPitch + rect.x());
@ -166,6 +169,7 @@ void FBSurface::fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, ColorId color)
void FBSurface::drawChar(const GUI::Font& font, uInt8 chr, void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
uInt32 tx, uInt32 ty, ColorId color, ColorId shadowColor) uInt32 tx, uInt32 ty, ColorId color, ColorId shadowColor)
{ {
#ifdef GUI_SUPPORT
if(shadowColor != kNone) if(shadowColor != kNone)
{ {
drawChar(font, chr, tx + 1, ty + 0, shadowColor); drawChar(font, chr, tx + 1, ty + 0, shadowColor);
@ -220,6 +224,7 @@ void FBSurface::drawChar(const GUI::Font& font, uInt8 chr,
buffer += myPitch; buffer += myPitch;
} }
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -310,6 +315,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
ColorId color, TextAlign align, ColorId color, TextAlign align,
int deltax, bool useEllipsis, ColorId shadowColor) int deltax, bool useEllipsis, ColorId shadowColor)
{ {
#ifdef GUI_SUPPORT
const string ELLIPSIS = "\x1d"; // "..." const string ELLIPSIS = "\x1d"; // "..."
const int leftX = x, rightX = x + w; const int leftX = x, rightX = x + w;
uInt32 i; uInt32 i;
@ -358,6 +364,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
x += w; x += w;
} }
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -23,6 +23,8 @@ class TIASurface;
namespace GUI { namespace GUI {
class Font; class Font;
}
namespace Common {
struct Rect; struct Rect;
} }
@ -63,7 +65,7 @@ class FBSurface
@param pitch The pitch (in bytes) for the pixel data @param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer @param rect The bounding rectangle for the buffer
*/ */
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const; void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Note: The drawing primitives below will work, but do not take // Note: The drawing primitives below will work, but do not take
@ -238,8 +240,8 @@ class FBSurface
These methods answer the current *rendering* dimensions of the These methods answer the current *rendering* dimensions of the
specified surface. specified surface.
*/ */
virtual const GUI::Rect& srcRect() const = 0; virtual const Common::Rect& srcRect() const = 0;
virtual const GUI::Rect& dstRect() const = 0; virtual const Common::Rect& dstRect() const = 0;
/** /**
These methods set the origin point and width/height for the These methods set the origin point and width/height for the

View File

@ -21,15 +21,6 @@
#include "Console.hxx" #include "Console.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"
#include "Event.hxx" #include "Event.hxx"
#include "Font.hxx"
#include "StellaFont.hxx"
#include "StellaMediumFont.hxx"
#include "StellaLargeFont.hxx"
#include "ConsoleFont.hxx"
#include "Launcher.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "TimeMachine.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "TIA.hxx" #include "TIA.hxx"
@ -42,6 +33,17 @@
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx" #include "Debugger.hxx"
#endif #endif
#ifdef GUI_SUPPORT
#include "Font.hxx"
#include "StellaFont.hxx"
#include "StellaMediumFont.hxx"
#include "StellaLargeFont.hxx"
#include "ConsoleFont.hxx"
#include "Launcher.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "TimeMachine.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBuffer::FrameBuffer(OSystem& osystem) FrameBuffer::FrameBuffer(OSystem& osystem)
@ -64,13 +66,13 @@ FrameBuffer::~FrameBuffer()
bool FrameBuffer::initialize() bool FrameBuffer::initialize()
{ {
// Get desktop resolution and supported renderers // Get desktop resolution and supported renderers
vector<GUI::Size> windowedDisplays; vector<Common::Size> windowedDisplays;
queryHardware(myFullscreenDisplays, windowedDisplays, myRenderers); queryHardware(myFullscreenDisplays, windowedDisplays, myRenderers);
uInt32 query_w = windowedDisplays[0].w, query_h = windowedDisplays[0].h; uInt32 query_w = windowedDisplays[0].w, query_h = windowedDisplays[0].h;
// Check the 'maxres' setting, which is an undocumented developer feature // Check the 'maxres' setting, which is an undocumented developer feature
// that specifies the desktop size (not normally set) // that specifies the desktop size (not normally set)
const GUI::Size& s = myOSystem.settings().getSize("maxres"); const Common::Size& s = myOSystem.settings().getSize("maxres");
if(s.valid()) if(s.valid())
{ {
query_w = s.w; query_w = s.w;
@ -80,6 +82,7 @@ bool FrameBuffer::initialize()
myDesktopSize.w = std::max(query_w, FBMinimum::Width); myDesktopSize.w = std::max(query_w, FBMinimum::Width);
myDesktopSize.h = std::max(query_h, FBMinimum::Height); myDesktopSize.h = std::max(query_h, FBMinimum::Height);
#ifdef GUI_SUPPORT
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Create fonts to draw text // Create fonts to draw text
// NOTE: the logic determining appropriate font sizes is done here, // NOTE: the logic determining appropriate font sizes is done here,
@ -115,6 +118,7 @@ bool FrameBuffer::initialize()
myLauncherFont = make_unique<GUI::Font>(GUI::stellaMediumDesc); myLauncherFont = make_unique<GUI::Font>(GUI::stellaMediumDesc);
else else
myLauncherFont = make_unique<GUI::Font>(GUI::stellaLargeDesc); myLauncherFont = make_unique<GUI::Font>(GUI::stellaLargeDesc);
#endif
// Determine possible TIA windowed zoom levels // Determine possible TIA windowed zoom levels
uInt32 maxZoom = maxWindowSizeForScreen( uInt32 maxZoom = maxWindowSizeForScreen(
@ -236,6 +240,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
else else
return FBInitStatus::FailTooLarge; return FBInitStatus::FailTooLarge;
#ifdef GUI_SUPPORT
// Erase any messages from a previous run // Erase any messages from a previous run
myMsg.counter = 0; myMsg.counter = 0;
@ -254,6 +259,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
if(!myMsg.surface) if(!myMsg.surface)
myMsg.surface = allocateSurface(FBMinimum::Width, font().getFontHeight()+10); myMsg.surface = allocateSurface(FBMinimum::Width, font().getFontHeight()+10);
#endif
// Print initial usage message, but only print it later if the status has changed // Print initial usage message, but only print it later if the status has changed
if(myInitializedCount == 1) if(myInitializedCount == 1)
@ -311,6 +317,7 @@ void FrameBuffer::update(bool force)
break; // EventHandlerState::PAUSE break; // EventHandlerState::PAUSE
} }
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU: case EventHandlerState::OPTIONSMENU:
{ {
force |= myOSystem.menu().needsRedraw(); force |= myOSystem.menu().needsRedraw();
@ -349,14 +356,17 @@ void FrameBuffer::update(bool force)
force |= myOSystem.launcher().draw(force); force |= myOSystem.launcher().draw(force);
break; // EventHandlerState::LAUNCHER break; // EventHandlerState::LAUNCHER
} }
#endif
#ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER: case EventHandlerState::DEBUGGER:
{ {
#ifdef DEBUGGER_SUPPORT
force |= myOSystem.debugger().draw(force); force |= myOSystem.debugger().draw(force);
#endif
break; // EventHandlerState::DEBUGGER break; // EventHandlerState::DEBUGGER
} }
#endif
default:
break;
} }
// Draw any pending messages // Draw any pending messages
@ -403,6 +413,7 @@ void FrameBuffer::updateInEmulationMode(float framesPerSecond)
void FrameBuffer::showMessage(const string& message, MessagePosition position, void FrameBuffer::showMessage(const string& message, MessagePosition position,
bool force) bool force)
{ {
#ifdef GUI_SUPPORT
// Only show messages if they've been enabled // Only show messages if they've been enabled
if(myMsg.surface == nullptr || !(force || myOSystem.settings().getBool("uimessages"))) if(myMsg.surface == nullptr || !(force || myOSystem.settings().getBool("uimessages")))
return; return;
@ -419,11 +430,13 @@ void FrameBuffer::showMessage(const string& message, MessagePosition position,
myMsg.surface->setDstSize(myMsg.w, myMsg.h); myMsg.surface->setDstSize(myMsg.w, myMsg.h);
myMsg.position = position; myMsg.position = position;
myMsg.enabled = true; myMsg.enabled = true;
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::drawFrameStats(float framesPerSecond) void FrameBuffer::drawFrameStats(float framesPerSecond)
{ {
#ifdef GUI_SUPPORT
const ConsoleInfo& info = myOSystem.console().about(); const ConsoleInfo& info = myOSystem.console().about();
int xPos = 2, yPos = 0; int xPos = 2, yPos = 0;
const int dy = font().getFontHeight() + 2; const int dy = font().getFontHeight() + 2;
@ -469,6 +482,7 @@ void FrameBuffer::drawFrameStats(float framesPerSecond)
myStatsMsg.surface->setDstPos(myImageRect.x() + 10, myImageRect.y() + 8); myStatsMsg.surface->setDstPos(myImageRect.x() + 10, myImageRect.y() + 8);
myStatsMsg.surface->render(); myStatsMsg.surface->render();
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -508,6 +522,7 @@ void FrameBuffer::enableMessages(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inline bool FrameBuffer::drawMessage() inline bool FrameBuffer::drawMessage()
{ {
#ifdef GUI_SUPPORT
// Either erase the entire message (when time is reached), // Either erase the entire message (when time is reached),
// or show again this frame // or show again this frame
if(myMsg.counter == 0) if(myMsg.counter == 0)
@ -522,7 +537,7 @@ inline bool FrameBuffer::drawMessage()
} }
// Draw the bounded box and text // Draw the bounded box and text
const GUI::Rect& dst = myMsg.surface->dstRect(); const Common::Rect& dst = myMsg.surface->dstRect();
switch(myMsg.position) switch(myMsg.position)
{ {
@ -579,6 +594,7 @@ inline bool FrameBuffer::drawMessage()
myMsg.w, myMsg.color, TextAlign::Left); myMsg.w, myMsg.color, TextAlign::Left);
myMsg.surface->render(); myMsg.surface->render();
myMsg.counter--; myMsg.counter--;
#endif
return true; return true;
} }
@ -956,8 +972,8 @@ FrameBuffer::VideoMode::VideoMode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh,
ih = std::min(ih, sh); ih = std::min(ih, sh);
int ix = (sw - iw) >> 1; int ix = (sw - iw) >> 1;
int iy = (sh - ih) >> 1; int iy = (sh - ih) >> 1;
image = GUI::Rect(ix, iy, ix+iw, iy+ih); image = Common::Rect(ix, iy, ix+iw, iy+ih);
screen = GUI::Size(sw, sh); screen = Common::Size(sw, sh);
// Now resize based on windowed/fullscreen mode and stretch factor // Now resize based on windowed/fullscreen mode and stretch factor
iw = image.width(); iw = image.width();

View File

@ -59,8 +59,8 @@ class FrameBuffer
{ {
enum class Stretch { Preserve, Fill }; enum class Stretch { Preserve, Fill };
GUI::Rect image; Common::Rect image;
GUI::Size screen; Common::Size screen;
Stretch stretch; Stretch stretch;
string description; string description;
uInt32 zoom; uInt32 zoom;
@ -169,19 +169,19 @@ class FrameBuffer
Note that this will take into account the current scaling (if any) Note that this will take into account the current scaling (if any)
as well as image 'centering'. as well as image 'centering'.
*/ */
const GUI::Rect& imageRect() const { return myImageRect; } const Common::Rect& imageRect() const { return myImageRect; }
/** /**
Returns the current dimensions of the framebuffer window. Returns the current dimensions of the framebuffer window.
This is the entire area containing the framebuffer image as well as any This is the entire area containing the framebuffer image as well as any
'unusable' area. 'unusable' area.
*/ */
const GUI::Size& screenSize() const { return myScreenSize; } const Common::Size& screenSize() const { return myScreenSize; }
/** /**
Returns the current dimensions of the users' desktop. Returns the current dimensions of the users' desktop.
*/ */
const GUI::Size& desktopSize() const { return myDesktopSize; } const Common::Size& desktopSize() const { return myDesktopSize; }
/** /**
Get the supported renderers for the video hardware. Get the supported renderers for the video hardware.
@ -195,14 +195,6 @@ class FrameBuffer
*/ */
const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; } const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; }
/**
Get the font object(s) of the framebuffer
*/
const GUI::Font& font() const { return *myFont; }
const GUI::Font& infoFont() const { return *myInfoFont; }
const GUI::Font& smallFont() const { return *mySmallFont; }
const GUI::Font& launcherFont() const { return *myLauncherFont; }
/** /**
Get the TIA surface associated with the framebuffer. Get the TIA surface associated with the framebuffer.
*/ */
@ -263,6 +255,16 @@ class FrameBuffer
*/ */
void stateChanged(EventHandlerState state); void stateChanged(EventHandlerState state);
#ifdef GUI_SUPPORT
/**
Get the font object(s) of the framebuffer
*/
const GUI::Font& font() const { return *myFont; }
const GUI::Font& infoFont() const { return *myInfoFont; }
const GUI::Font& smallFont() const { return *mySmallFont; }
const GUI::Font& launcherFont() const { return *myLauncherFont; }
#endif
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// The following methods are system-specific and can/must be // The following methods are system-specific and can/must be
// implemented in derived classes. // implemented in derived classes.
@ -314,7 +316,7 @@ class FrameBuffer
@param pitch The pitch (in bytes) for the pixel data @param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer @param rect The bounding rectangle for the buffer
*/ */
virtual void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const = 0; virtual void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const = 0;
/** /**
Clear the framebuffer. Clear the framebuffer.
@ -331,8 +333,8 @@ class FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode @param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name) @param renderers List of renderer names (internal name -> end-user name)
*/ */
virtual void queryHardware(vector<GUI::Size>& fullscreenRes, virtual void queryHardware(vector<Common::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes, vector<Common::Size>& windowedRes,
VariantList& renderers) = 0; VariantList& renderers) = 0;
virtual Int32 getCurrentDisplayIndex() = 0; virtual Int32 getCurrentDisplayIndex() = 0;
@ -490,22 +492,23 @@ class FrameBuffer
// Dimensions of the actual image, after zooming, and taking into account // Dimensions of the actual image, after zooming, and taking into account
// any image 'centering' // any image 'centering'
GUI::Rect myImageRect; Common::Rect myImageRect;
// Dimensions of the main window (not always the same as the image) // Dimensions of the main window (not always the same as the image)
GUI::Size myScreenSize; Common::Size myScreenSize;
// Maximum dimensions of the desktop area // Maximum dimensions of the desktop area
GUI::Size myDesktopSize; Common::Size myDesktopSize;
// The resolution of the attached displays in fullscreen mode // The resolution of the attached displays in fullscreen mode
// The primary display is typically the first in the array // The primary display is typically the first in the array
// Windowed modes use myDesktopSize directly // Windowed modes use myDesktopSize directly
vector<GUI::Size> myFullscreenDisplays; vector<Common::Size> myFullscreenDisplays;
// Supported renderers // Supported renderers
VariantList myRenderers; VariantList myRenderers;
#ifdef GUI_SUPPORT
// The font object to use for the normal in-game GUI // The font object to use for the normal in-game GUI
unique_ptr<GUI::Font> myFont; unique_ptr<GUI::Font> myFont;
@ -517,6 +520,7 @@ class FrameBuffer
// The font object to use for the ROM launcher // The font object to use for the ROM launcher
unique_ptr<GUI::Font> myLauncherFont; unique_ptr<GUI::Font> myLauncherFont;
#endif
// The TIASurface class takes responsibility for TIA rendering // The TIASurface class takes responsibility for TIA rendering
unique_ptr<TIASurface> myTIASurface; unique_ptr<TIASurface> myTIASurface;

View File

@ -46,12 +46,7 @@
#include "Settings.hxx" #include "Settings.hxx"
#include "PropsSet.hxx" #include "PropsSet.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "PNGLibrary.hxx" #include "PNGLibrary.hxx"
#include "Widget.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "Random.hxx" #include "Random.hxx"
#include "StateManager.hxx" #include "StateManager.hxx"
@ -64,6 +59,13 @@
#include "repository/KeyValueRepositoryNoop.hxx" #include "repository/KeyValueRepositoryNoop.hxx"
#include "repository/KeyValueRepositoryConfigfile.hxx" #include "repository/KeyValueRepositoryConfigfile.hxx"
#ifdef GUI_SUPPORT
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Launcher.hxx"
#include "TimeMachine.hxx"
#include "Widget.hxx"
#endif
#include "OSystem.hxx" #include "OSystem.hxx"
@ -156,16 +158,6 @@ bool OSystem::create()
myEventHandler = MediaFactory::createEventHandler(*this); myEventHandler = MediaFactory::createEventHandler(*this);
myEventHandler->initialize(); myEventHandler->initialize();
#ifdef CHEATCODE_SUPPORT
myCheatManager = make_unique<CheatManager>(*this);
myCheatManager->loadCheatDatabase();
#endif
// Create various subsystems (menu and launcher GUI objects, etc)
myMenu = make_unique<Menu>(*this);
myCommandMenu = make_unique<CommandMenu>(*this);
myTimeMachine = make_unique<TimeMachine>(*this);
myLauncher = make_unique<Launcher>(*this);
myStateManager = make_unique<StateManager>(*this); myStateManager = make_unique<StateManager>(*this);
myTimerManager = make_unique<TimerManager>(); myTimerManager = make_unique<TimerManager>();
myAudioSettings = make_unique<AudioSettings>(*mySettings); myAudioSettings = make_unique<AudioSettings>(*mySettings);
@ -178,6 +170,19 @@ bool OSystem::create()
// Create random number generator // Create random number generator
myRandom = make_unique<Random>(uInt32(TimerManager::getTicks())); myRandom = make_unique<Random>(uInt32(TimerManager::getTicks()));
#ifdef CHEATCODE_SUPPORT
myCheatManager = make_unique<CheatManager>(*this);
myCheatManager->loadCheatDatabase();
#endif
#ifdef GUI_SUPPORT
// Create various subsystems (menu and launcher GUI objects, etc)
myMenu = make_unique<Menu>(*this);
myCommandMenu = make_unique<CommandMenu>(*this);
myTimeMachine = make_unique<TimeMachine>(*this);
myLauncher = make_unique<Launcher>(*this);
#endif
#ifdef PNG_SUPPORT #ifdef PNG_SUPPORT
// Create PNG handler // Create PNG handler
myPNGLib = make_unique<PNGLibrary>(*this); myPNGLib = make_unique<PNGLibrary>(*this);
@ -299,26 +304,31 @@ FBInitStatus OSystem::createFrameBuffer()
{ {
case EventHandlerState::EMULATION: case EventHandlerState::EMULATION:
case EventHandlerState::PAUSE: case EventHandlerState::PAUSE:
#ifdef GUI_SUPPORT
case EventHandlerState::OPTIONSMENU: case EventHandlerState::OPTIONSMENU:
case EventHandlerState::CMDMENU: case EventHandlerState::CMDMENU:
case EventHandlerState::TIMEMACHINE: case EventHandlerState::TIMEMACHINE:
#endif
if((fbstatus = myConsole->initializeVideo()) != FBInitStatus::Success) if((fbstatus = myConsole->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
break; break;
#ifdef GUI_SUPPORT
case EventHandlerState::LAUNCHER: case EventHandlerState::LAUNCHER:
if((fbstatus = myLauncher->initializeVideo()) != FBInitStatus::Success) if((fbstatus = myLauncher->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
break; break;
#endif
case EventHandlerState::DEBUGGER:
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
case EventHandlerState::DEBUGGER:
if((fbstatus = myDebugger->initializeVideo()) != FBInitStatus::Success) if((fbstatus = myDebugger->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
#endif
break; break;
#endif
case EventHandlerState::NONE: // Should never happen case EventHandlerState::NONE: // Should never happen
default:
Logger::log("ERROR: Unknown emulation state in createFrameBuffer()", 0); Logger::log("ERROR: Unknown emulation state in createFrameBuffer()", 0);
break; break;
} }
@ -430,6 +440,7 @@ bool OSystem::hasConsole() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool OSystem::createLauncher(const string& startdir) bool OSystem::createLauncher(const string& startdir)
{ {
#ifdef GUI_SUPPORT
closeConsole(); closeConsole();
if(mySound) if(mySound)
@ -451,6 +462,9 @@ bool OSystem::createLauncher(const string& startdir)
myLauncherUsed = myLauncherUsed || status; myLauncherUsed = myLauncherUsed || status;
return status; return status;
#else
return false;
#endif
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,12 +18,6 @@
#ifndef OSYSTEM_HXX #ifndef OSYSTEM_HXX
#define OSYSTEM_HXX #define OSYSTEM_HXX
#ifdef PNG_SUPPORT
class PNGLibrary;
#endif
#ifdef CHEATCODE_SUPPORT
class CheatManager;
#endif
class CommandMenu; class CommandMenu;
class Console; class Console;
class Debugger; class Debugger;
@ -41,6 +35,13 @@ class TimerManager;
class VideoDialog; class VideoDialog;
class EmulationWorker; class EmulationWorker;
class AudioSettings; class AudioSettings;
class SettingsDb;
#ifdef PNG_SUPPORT
class PNGLibrary;
#endif
#ifdef CHEATCODE_SUPPORT
class CheatManager;
#endif
#include <chrono> #include <chrono>
@ -52,10 +53,6 @@ class AudioSettings;
#include "bspf.hxx" #include "bspf.hxx"
#include "repository/KeyValueRepository.hxx" #include "repository/KeyValueRepository.hxx"
#ifdef SQLITE_SUPPORT
#include "SettingsDb.hxx"
#endif
/** /**
This class provides an interface for accessing operating system specific This class provides an interface for accessing operating system specific
functions. It also comprises an overall parent object, to which all the functions. It also comprises an overall parent object, to which all the
@ -138,34 +135,6 @@ class OSystem
*/ */
AudioSettings& audioSettings() { return *myAudioSettings; } AudioSettings& audioSettings() { return *myAudioSettings; }
/**
Get the settings menu of the system.
@return The settings menu object
*/
Menu& menu() const { return *myMenu; }
/**
Get the command menu of the system.
@return The command menu object
*/
CommandMenu& commandMenu() const { return *myCommandMenu; }
/**
Get the ROM launcher of the system.
@return The launcher object
*/
Launcher& launcher() const { return *myLauncher; }
/**
Get the time machine of the system (manages state files).
@return The time machine object
*/
TimeMachine& timeMachine() const { return *myTimeMachine; }
/** /**
Get the state manager of the system. Get the state manager of the system.
@ -194,32 +163,62 @@ class OSystem
*/ */
void saveConfig(); void saveConfig();
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
/** /**
Get the ROM debugger of the system. Get the ROM debugger of the system.
@return The debugger object @return The debugger object
*/ */
Debugger& debugger() const { return *myDebugger; } Debugger& debugger() const { return *myDebugger; }
#endif #endif
#ifdef CHEATCODE_SUPPORT #ifdef CHEATCODE_SUPPORT
/** /**
Get the cheat manager of the system. Get the cheat manager of the system.
@return The cheatmanager object @return The cheatmanager object
*/ */
CheatManager& cheat() const { return *myCheatManager; } CheatManager& cheat() const { return *myCheatManager; }
#endif #endif
#ifdef PNG_SUPPORT #ifdef PNG_SUPPORT
/** /**
Get the PNG handler of the system. Get the PNG handler of the system.
@return The PNGlib object @return The PNGlib object
*/ */
PNGLibrary& png() const { return *myPNGLib; } PNGLibrary& png() const { return *myPNGLib; }
#endif #endif
#ifdef GUI_SUPPORT
/**
Get the settings menu of the system.
@return The settings menu object
*/
Menu& menu() const { return *myMenu; }
/**
Get the command menu of the system.
@return The command menu object
*/
CommandMenu& commandMenu() const { return *myCommandMenu; }
/**
Get the ROM launcher of the system.
@return The launcher object
*/
Launcher& launcher() const { return *myLauncher; }
/**
Get the time machine of the system (manages state files).
@return The time machine object
*/
TimeMachine& timeMachine() const { return *myTimeMachine; }
#endif
/** /**
Set all config file paths for the OSystem. Set all config file paths for the OSystem.
@ -473,6 +472,7 @@ class OSystem
// Pointer to audio settings object // Pointer to audio settings object
unique_ptr<AudioSettings> myAudioSettings; unique_ptr<AudioSettings> myAudioSettings;
#ifdef GUI_SUPPORT
// Pointer to the Menu object // Pointer to the Menu object
unique_ptr<Menu> myMenu; unique_ptr<Menu> myMenu;
@ -481,10 +481,10 @@ class OSystem
// Pointer to the Launcher object // Pointer to the Launcher object
unique_ptr<Launcher> myLauncher; unique_ptr<Launcher> myLauncher;
bool myLauncherUsed;
// Pointer to the TimeMachine object // Pointer to the TimeMachine object
unique_ptr<TimeMachine> myTimeMachine; unique_ptr<TimeMachine> myTimeMachine;
#endif
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
// Pointer to the Debugger object // Pointer to the Debugger object
@ -510,6 +510,9 @@ class OSystem
// The list of log messages // The list of log messages
string myLogMessages; string myLogMessages;
// Indicates whether ROM launcher was ever opened during this run
bool myLauncherUsed;
// Indicates whether to stop the main loop // Indicates whether to stop the main loop
bool myQuitLoop; bool myQuitLoop;

View File

@ -106,7 +106,7 @@ Settings::Settings()
// ROM browser options // ROM browser options
setPermanent("exitlauncher", "false"); setPermanent("exitlauncher", "false");
setPermanent("launcherres", GUI::Size(900, 600)); setPermanent("launcherres", Common::Size(900, 600));
setPermanent("launcherfont", "medium"); setPermanent("launcherfont", "medium");
setPermanent("launcherroms", "true"); setPermanent("launcherroms", "true");
setPermanent("romviewer", "1"); setPermanent("romviewer", "1");
@ -115,8 +115,8 @@ Settings::Settings()
// UI-related options // UI-related options
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
setPermanent("dbg.res", setPermanent("dbg.res",
GUI::Size(DebuggerDialog::kMediumFontMinW, Common::Size(DebuggerDialog::kMediumFontMinW,
DebuggerDialog::kMediumFontMinH)); DebuggerDialog::kMediumFontMinH));
#endif #endif
setPermanent("uipalette", "standard"); setPermanent("uipalette", "standard");
setPermanent("listdelay", "300"); setPermanent("listdelay", "300");

View File

@ -100,7 +100,7 @@ class Settings
float getFloat(const string& key) const { return value(key).toFloat(); } float getFloat(const string& key) const { return value(key).toFloat(); }
bool getBool(const string& key) const { return value(key).toBool(); } bool getBool(const string& key) const { return value(key).toBool(); }
const string& getString(const string& key) const { return value(key).toString(); } const string& getString(const string& key) const { return value(key).toString(); }
const GUI::Size getSize(const string& key) const { return value(key).toSize(); } const Common::Size getSize(const string& key) const { return value(key).toSize(); }
protected: protected:
/** /**

View File

@ -124,7 +124,7 @@ void TIASurface::setPalette(const uInt32* tia_palette, const uInt32* rgb_palette
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const FBSurface& TIASurface::baseSurface(GUI::Rect& rect) const const FBSurface& TIASurface::baseSurface(Common::Rect& rect) const
{ {
uInt32 tiaw = myTIA->width(), width = tiaw * 2, height = myTIA->height(); uInt32 tiaw = myTIA->width(), width = tiaw * 2, height = myTIA->height();
rect.setBounds(0, 0, width, height); rect.setBounds(0, 0, width, height);

View File

@ -69,7 +69,7 @@ class TIASurface
/** /**
Get the TIA base surface for use in saving to a PNG image. Get the TIA base surface for use in saving to a PNG image.
*/ */
const FBSurface& baseSurface(GUI::Rect& rect) const; const FBSurface& baseSurface(Common::Rect& rect) const;
/** /**
Use the palette to map a single indexed pixel color. This is used by the TIA output widget. Use the palette to map a single indexed pixel color. This is used by the TIA output widget.

View File

@ -113,7 +113,7 @@ void CheckListWidget::drawWidget(bool hilite)
const int y = _y + 2 + _fontHeight * i + 2; const int y = _y + 2 + _fontHeight * i + 2;
ColorId textColor = kTextColor; ColorId textColor = kTextColor;
GUI::Rect r(getEditRect()); Common::Rect r(getEditRect());
// Draw the selected item inverted, on a highlighted background. // Draw the selected item inverted, on a highlighted background.
if (_selectedItem == pos) if (_selectedItem == pos)
@ -147,9 +147,9 @@ void CheckListWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect CheckListWidget::getEditRect() const Common::Rect CheckListWidget::getEditRect() const
{ {
GUI::Rect r(2, 1, _w, _fontHeight); Common::Rect r(2, 1, _w, _fontHeight);
const int yoffset = (_selectedItem - _currentPos) * _fontHeight, const int yoffset = (_selectedItem - _currentPos) * _fontHeight,
xoffset = CheckboxWidget::boxSize() + 10; xoffset = CheckboxWidget::boxSize() + 10;
r.top += yoffset; r.top += yoffset;

View File

@ -51,7 +51,7 @@ class CheckListWidget : public ListWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
GUI::Rect getEditRect() const override; Common::Rect getEditRect() const override;
protected: protected:
BoolArray _stateList; BoolArray _stateList;

View File

@ -84,7 +84,7 @@ void ContextMenu::center()
{ {
// Make sure the menu is exactly where it should be, in case the image // Make sure the menu is exactly where it should be, in case the image
// offset has changed // offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect(); const Common::Rect& image = instance().frameBuffer().imageRect();
recalc(image); recalc(image);
uInt32 x = image.x() + _xorig; uInt32 x = image.x() + _xorig;
uInt32 y = image.y() + _yorig; uInt32 y = image.y() + _yorig;
@ -97,7 +97,7 @@ void ContextMenu::center()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ContextMenu::recalc(const GUI::Rect& image) void ContextMenu::recalc(const Common::Rect& image)
{ {
// Now is the time to adjust the height // Now is the time to adjust the height
// If it's higher than the screen, we need to scroll through // If it's higher than the screen, we need to scroll through

View File

@ -94,7 +94,7 @@ class ContextMenu : public Dialog, public CommandSender
void drawDialog() override; void drawDialog() override;
void recalc(const GUI::Rect& image); void recalc(const Common::Rect& image);
int findItem(int x, int y) const; int findItem(int x, int y) const;
void drawCurrentSelection(int item); void drawCurrentSelection(int item);

View File

@ -488,7 +488,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
fontHeight = font.getFontHeight(), fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight(); lineHeight = font.getLineHeight();
int xpos, ypos, pwidth; int xpos, ypos, pwidth;
const GUI::Size& ds = instance().frameBuffer().desktopSize(); const Common::Size& ds = instance().frameBuffer().desktopSize();
xpos = HBORDER; xpos = HBORDER;
ypos = VBORDER; ypos = VBORDER;
@ -809,7 +809,7 @@ void DeveloperDialog::loadConfig()
uInt32 w, h; uInt32 w, h;
// Debugger size // Debugger size
const GUI::Size& ds = instance().settings().getSize("dbg.res"); const Common::Size& ds = instance().settings().getSize("dbg.res");
w = ds.w; h = ds.h; w = ds.w; h = ds.h;
myDebuggerWidthSlider->setValue(w); myDebuggerWidthSlider->setValue(w);
@ -887,7 +887,7 @@ void DeveloperDialog::saveConfig()
myDebuggerFontStyle->getSelectedTag().toString()); myDebuggerFontStyle->getSelectedTag().toString());
// Debugger size // Debugger size
instance().settings().setValue("dbg.res", instance().settings().setValue("dbg.res",
GUI::Size(myDebuggerWidthSlider->getValue(), Common::Size(myDebuggerWidthSlider->getValue(),
myDebuggerHeightSlider->getValue())); myDebuggerHeightSlider->getValue()));
// Debugger font size // Debugger font size
instance().settings().setValue("dbg.fontsize", myDebuggerFontSize->getSelectedTag().toString()); instance().settings().setValue("dbg.fontsize", myDebuggerFontSize->getSelectedTag().toString());

View File

@ -162,8 +162,8 @@ void Dialog::center()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Dialog::positionAt(uInt32 pos) void Dialog::positionAt(uInt32 pos)
{ {
const GUI::Size& screen = instance().frameBuffer().screenSize(); const Common::Size& screen = instance().frameBuffer().screenSize();
const GUI::Rect& dst = _surface->dstRect(); const Common::Rect& dst = _surface->dstRect();
int top = std::min(screen.h - dst.height(), screen.h >> 5); int top = std::min(screen.h - dst.height(), screen.h >> 5);
int btm = std::min(screen.h - dst.height(), screen.h - dst.height() - (screen.h >> 5)); int btm = std::min(screen.h - dst.height(), screen.h - dst.height() - (screen.h >> 5));
@ -869,7 +869,7 @@ Widget* Dialog::TabFocus::getNewFocus()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Dialog::getDynamicBounds(uInt32& w, uInt32& h) const bool Dialog::getDynamicBounds(uInt32& w, uInt32& h) const
{ {
const GUI::Rect& r = instance().frameBuffer().imageRect(); const Common::Rect& r = instance().frameBuffer().imageRect();
if(r.width() <= FBMinimum::Width || r.height() <= FBMinimum::Height) if(r.width() <= FBMinimum::Width || r.height() <= FBMinimum::Height)
{ {

View File

@ -128,7 +128,7 @@ bool DialogContainer::needsRedraw() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DialogContainer::addDialog(Dialog* d) void DialogContainer::addDialog(Dialog* d)
{ {
const GUI::Rect& r = myOSystem.frameBuffer().imageRect(); const Common::Rect& r = myOSystem.frameBuffer().imageRect();
if(uInt32(d->getWidth()) > r.width() || uInt32(d->getHeight()) > r.height()) if(uInt32(d->getWidth()) > r.width() || uInt32(d->getHeight()) > r.height())
myOSystem.frameBuffer().showMessage( myOSystem.frameBuffer().showMessage(
"Unable to show dialog box; FIX THE CODE"); "Unable to show dialog box; FIX THE CODE");

View File

@ -104,9 +104,9 @@ void EditTextWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect EditTextWidget::getEditRect() const Common::Rect EditTextWidget::getEditRect() const
{ {
GUI::Rect r(2, 1, _w - 2, _h); Common::Rect r(2, 1, _w - 2, _h);
return r; return r;
} }

View File

@ -40,7 +40,7 @@ class EditTextWidget : public EditableWidget
void endEditMode() override; void endEditMode() override;
void abortEditMode() override; void abortEditMode() override;
GUI::Rect getEditRect() const override; Common::Rect getEditRect() const override;
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override; void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
void handleMouseEntered() override; void handleMouseEntered() override;

View File

@ -202,7 +202,7 @@ void EditableWidget::drawCaret()
if (!_editable || !isVisible() || !_boss->isVisible() || !_hasFocus) if (!_editable || !isVisible() || !_boss->isVisible() || !_hasFocus)
return; return;
const GUI::Rect& editRect = getEditRect(); const Common::Rect& editRect = getEditRect();
int x = editRect.left; int x = editRect.left;
int y = editRect.top; int y = editRect.top;

View File

@ -68,7 +68,7 @@ class EditableWidget : public Widget, public CommandSender
virtual void endEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); } virtual void endEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); }
virtual void abortEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); } virtual void abortEditMode() { clearFlags(Widget::FLAG_WANTS_RAWDATA); }
virtual GUI::Rect getEditRect() const = 0; virtual Common::Rect getEditRect() const = 0;
virtual int getCaretOffset() const; virtual int getCaretOffset() const;
void drawCaret(); void drawCaret();
bool setCaretPos(int newPos); bool setCaretPos(int newPos);

View File

@ -133,7 +133,7 @@ void InputTextDialog::center()
{ {
// Make sure the menu is exactly where it should be, in case the image // Make sure the menu is exactly where it should be, in case the image
// offset has changed // offset has changed
const GUI::Rect& image = instance().frameBuffer().imageRect(); const Common::Rect& image = instance().frameBuffer().imageRect();
uInt32 x = image.x() + myXOrig; uInt32 x = image.x() + myXOrig;
uInt32 y = image.y() + myYOrig; uInt32 y = image.y() + myYOrig;
uInt32 tx = image.x() + image.width(); uInt32 tx = image.x() + image.width();

View File

@ -29,8 +29,8 @@
Launcher::Launcher(OSystem& osystem) Launcher::Launcher(OSystem& osystem)
: DialogContainer(osystem) : DialogContainer(osystem)
{ {
const GUI::Size& s = myOSystem.settings().getSize("launcherres"); const Common::Size& s = myOSystem.settings().getSize("launcherres");
const GUI::Size& d = myOSystem.frameBuffer().desktopSize(); const Common::Size& d = myOSystem.frameBuffer().desktopSize();
myWidth = s.w; myHeight = s.h; myWidth = s.w; myHeight = s.h;
// The launcher dialog is resizable, within certain bounds // The launcher dialog is resizable, within certain bounds
@ -40,7 +40,7 @@ Launcher::Launcher(OSystem& osystem)
myWidth = std::min(myWidth, uInt32(d.w)); myWidth = std::min(myWidth, uInt32(d.w));
myHeight = std::min(myHeight, uInt32(d.h)); myHeight = std::min(myHeight, uInt32(d.h));
myOSystem.settings().setValue("launcherres", GUI::Size(myWidth, myHeight)); myOSystem.settings().setValue("launcherres", Common::Size(myWidth, myHeight));
myBaseDialog = new LauncherDialog(myOSystem, *this, 0, 0, myWidth, myHeight); myBaseDialog = new LauncherDialog(myOSystem, *this, 0, 0, myWidth, myHeight);
} }

View File

@ -76,7 +76,7 @@ class ListWidget : public EditableWidget
void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
virtual void drawWidget(bool hilite) override = 0; virtual void drawWidget(bool hilite) override = 0;
virtual GUI::Rect getEditRect() const override = 0; virtual Common::Rect getEditRect() const override = 0;
int findItem(int x, int y) const; int findItem(int x, int y) const;
void recalc(); void recalc();

View File

@ -119,8 +119,8 @@ void PopUpWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount)
if(isEnabled() && !myMenu->isVisible()) if(isEnabled() && !myMenu->isVisible())
{ {
// Add menu just underneath parent widget // Add menu just underneath parent widget
const GUI::Rect& image = instance().frameBuffer().imageRect(); const Common::Rect& image = instance().frameBuffer().imageRect();
const GUI::Rect& srect = dialog().surface().dstRect(); const Common::Rect& srect = dialog().surface().dstRect();
uInt32 tx = srect.x(), ty = srect.y(); uInt32 tx = srect.x(), ty = srect.y();
tx += getAbsX() + _labelWidth - image.x(); tx += getAbsX() + _labelWidth - image.x();
ty += getAbsY() + getHeight() - image.y(); ty += getAbsY() + getHeight() - image.y();

View File

@ -36,8 +36,8 @@ RomInfoWidget::RomInfoWidget(GuiObject* boss, const GUI::Font& font,
mySurfaceIsValid(false), mySurfaceIsValid(false),
myHaveProperties(false), myHaveProperties(false),
myAvail(w > 400 ? myAvail(w > 400 ?
GUI::Size(TIAConstants::viewableWidth*2, TIAConstants::viewableHeight*2) : Common::Size(TIAConstants::viewableWidth*2, TIAConstants::viewableHeight*2) :
GUI::Size(TIAConstants::viewableWidth, TIAConstants::viewableHeight)) Common::Size(TIAConstants::viewableWidth, TIAConstants::viewableHeight))
{ {
_flags = Widget::FLAG_ENABLED; _flags = Widget::FLAG_ENABLED;
_bgcolor = kDlgColor; _bgcolor = kDlgColor;
@ -109,7 +109,7 @@ void RomInfoWidget::parseProperties(const FilesystemNode& node)
instance().png().loadImage(filename, *mySurface); instance().png().loadImage(filename, *mySurface);
// Scale surface to available image area // Scale surface to available image area
const GUI::Rect& src = mySurface->srcRect(); const Common::Rect& src = mySurface->srcRect();
float scale = std::min(float(myAvail.w) / src.width(), float(myAvail.h) / src.height()); float scale = std::min(float(myAvail.w) / src.width(), float(myAvail.h) / src.height());
mySurface->setDstSize(uInt32(src.width() * scale), uInt32(src.height() * scale)); mySurface->setDstSize(uInt32(src.width() * scale), uInt32(src.height() * scale));
mySurfaceIsValid = true; mySurfaceIsValid = true;
@ -178,13 +178,13 @@ void RomInfoWidget::drawWidget(bool hilite)
if(mySurfaceIsValid) if(mySurfaceIsValid)
{ {
const GUI::Rect& dst = mySurface->dstRect(); const Common::Rect& dst = mySurface->dstRect();
uInt32 x = _x + ((_w - dst.width()) >> 1); uInt32 x = _x + ((_w - dst.width()) >> 1);
uInt32 y = _y + ((yoff - dst.height()) >> 1); uInt32 y = _y + ((yoff - dst.height()) >> 1);
// Make sure when positioning the snapshot surface that we take // Make sure when positioning the snapshot surface that we take
// the dialog surface position into account // the dialog surface position into account
const GUI::Rect& s_dst = s.dstRect(); const Common::Rect& s_dst = s.dstRect();
mySurface->setDstPos(x + s_dst.x(), y + s_dst.y()); mySurface->setDstPos(x + s_dst.x(), y + s_dst.y());
} }
else if(mySurfaceErrorMsg != "") else if(mySurfaceErrorMsg != "")

View File

@ -64,7 +64,7 @@ class RomInfoWidget : public Widget
string mySurfaceErrorMsg; string mySurfaceErrorMsg;
// How much space available for the PNG image // How much space available for the PNG image
GUI::Size myAvail; Common::Size myAvail;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported

View File

@ -82,7 +82,7 @@ void StringListWidget::drawWidget(bool hilite)
s.frameRect(_x + 1, _y + 1 + _fontHeight * i, _w - 1, _fontHeight, onTop ? kWidColorHi : kBGColorLo); s.frameRect(_x + 1, _y + 1 + _fontHeight * i, _w - 1, _fontHeight, onTop ? kWidColorHi : kBGColorLo);
} }
GUI::Rect r(getEditRect()); Common::Rect r(getEditRect());
if (_selectedItem == pos && _editMode) if (_selectedItem == pos && _editMode)
{ {
adjustOffset(); adjustOffset();
@ -101,9 +101,9 @@ void StringListWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GUI::Rect StringListWidget::getEditRect() const Common::Rect StringListWidget::getEditRect() const
{ {
GUI::Rect r(2, 1, _w - 2, _fontHeight); Common::Rect r(2, 1, _w - 2, _fontHeight);
const int offset = std::max(0, (_selectedItem - _currentPos) * _fontHeight); const int offset = std::max(0, (_selectedItem - _currentPos) * _fontHeight);
r.top += offset; r.top += offset;
r.bottom += offset; r.bottom += offset;

View File

@ -35,7 +35,7 @@ class StringListWidget : public ListWidget
void handleMouseEntered() override; void handleMouseEntered() override;
void handleMouseLeft() override; void handleMouseLeft() override;
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
GUI::Rect getEditRect() const override; Common::Rect getEditRect() const override;
protected: protected:
bool _hilite; bool _hilite;

View File

@ -242,8 +242,8 @@ TimeMachineDialog::TimeMachineDialog(OSystem& osystem, DialogContainer& parent,
void TimeMachineDialog::center() void TimeMachineDialog::center()
{ {
// Place on the bottom of the screen, centered horizontally // Place on the bottom of the screen, centered horizontally
const GUI::Size& screen = instance().frameBuffer().screenSize(); const Common::Size& screen = instance().frameBuffer().screenSize();
const GUI::Rect& dst = surface().dstRect(); const Common::Rect& dst = surface().dstRect();
surface().setDstPos((screen.w - dst.width()) >> 1, screen.h - dst.height() - 10); surface().setDstPos((screen.w - dst.width()) >> 1, screen.h - dst.height() - 10);
} }

View File

@ -57,7 +57,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
int lwidth, pwidth, bwidth; int lwidth, pwidth, bwidth;
WidgetArray wid; WidgetArray wid;
VariantList items; VariantList items;
const GUI::Size& ds = instance().frameBuffer().desktopSize(); const Common::Size& ds = instance().frameBuffer().desktopSize();
// Set real dimensions // Set real dimensions
setSize(64 * fontWidth + HBORDER * 2, 11 * (lineHeight + V_GAP) + V_GAP * 9 + VBORDER + _th, setSize(64 * fontWidth + HBORDER * 2, 11 * (lineHeight + V_GAP) + V_GAP * 9 + VBORDER + _th,
@ -246,7 +246,7 @@ void UIDialog::loadConfig()
myRomPath->setText(settings.getString("romdir")); myRomPath->setText(settings.getString("romdir"));
// Launcher size // Launcher size
const GUI::Size& ls = settings.getSize("launcherres"); const Common::Size& ls = settings.getSize("launcherres");
uInt32 w = ls.w, h = ls.h; uInt32 w = ls.w, h = ls.h;
w = std::max(w, FBMinimum::Width); w = std::max(w, FBMinimum::Width);
@ -302,7 +302,7 @@ void UIDialog::saveConfig()
// Launcher size // Launcher size
settings.setValue("launcherres", settings.setValue("launcherres",
GUI::Size(myLauncherWidthSlider->getValue(), Common::Size(myLauncherWidthSlider->getValue(),
myLauncherHeightSlider->getValue())); myLauncherHeightSlider->getValue()));
// Launcher font // Launcher font

View File

@ -42,8 +42,8 @@ class FBSurfaceLIBRETRO : public FBSurface
uInt32 width() const override { return myWidth; } uInt32 width() const override { return myWidth; }
uInt32 height() const override { return myHeight; } uInt32 height() const override { return myHeight; }
const GUI::Rect& srcRect() const override { return mySrcGUIR; } const Common::Rect& srcRect() const override { return mySrcGUIR; }
const GUI::Rect& dstRect() const override { return myDstGUIR; } const Common::Rect& dstRect() const override { return myDstGUIR; }
void setSrcPos(uInt32 x, uInt32 y) override { } void setSrcPos(uInt32 x, uInt32 y) override { }
void setSrcSize(uInt32 w, uInt32 h) override { } void setSrcSize(uInt32 w, uInt32 h) override { }
void setDstPos(uInt32 x, uInt32 y) override { } void setDstPos(uInt32 x, uInt32 y) override { }
@ -73,7 +73,7 @@ class FBSurfaceLIBRETRO : public FBSurface
private: private:
FrameBufferLIBRETRO& myFB; FrameBufferLIBRETRO& myFB;
GUI::Rect mySrcGUIR, myDstGUIR; Common::Rect mySrcGUIR, myDstGUIR;
private: private:
unique_ptr<uInt32[]> myPixelData; unique_ptr<uInt32[]> myPixelData;

View File

@ -30,8 +30,8 @@ FrameBufferLIBRETRO::FrameBufferLIBRETRO(OSystem& osystem)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferLIBRETRO::queryHardware(vector<GUI::Size>& fullscreenRes, void FrameBufferLIBRETRO::queryHardware(vector<Common::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes, vector<Common::Size>& windowedRes,
VariantList& renderers) VariantList& renderers)
{ {
fullscreenRes.emplace_back(1920, 1080); fullscreenRes.emplace_back(1920, 1080);

View File

@ -91,7 +91,7 @@ class FrameBufferLIBRETRO : public FrameBuffer
@param pitch The pitch (in bytes) for the pixel data @param pitch The pitch (in bytes) for the pixel data
@param rect The bounding rectangle for the buffer @param rect The bounding rectangle for the buffer
*/ */
void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override { } void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const override { }
/** /**
Clear the frame buffer Clear the frame buffer
@ -111,8 +111,8 @@ class FrameBufferLIBRETRO : public FrameBuffer
@param windowedRes Maximum resolution supported in windowed mode @param windowedRes Maximum resolution supported in windowed mode
@param renderers List of renderer names (internal name -> end-user name) @param renderers List of renderer names (internal name -> end-user name)
*/ */
void queryHardware(vector<GUI::Size>& fullscreenRes, void queryHardware(vector<Common::Size>& fullscreenRes,
vector<GUI::Size>& windowedRes, vector<Common::Size>& windowedRes,
VariantList& renderers) override; VariantList& renderers) override;
/** /**

View File

@ -1,5 +1,5 @@
LIBRETRO_COMM_DIR = $(CORE_DIR)/../libretro-common LIBRETRO_COMM_DIR = $(CORE_DIR)/../libretro-common
INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters -I$(CORE_DIR)/gui INCFLAGS := -I. -I$(CORE_DIR) -I$(CORE_DIR)/libretro -I$(CORE_DIR)/emucore -I$(CORE_DIR)/emucore/tia -I$(CORE_DIR)/common -I$(CORE_DIR)/common/audio -I$(CORE_DIR)/common/tv_filters
ifneq (,$(findstring msvc2003,$(platform))) ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
@ -31,7 +31,6 @@ SOURCES_CXX := \
$(CORE_DIR)/common/repository/KeyValueRepositoryConfigfile.cxx \ $(CORE_DIR)/common/repository/KeyValueRepositoryConfigfile.cxx \
$(CORE_DIR)/common/tv_filters/AtariNTSC.cxx \ $(CORE_DIR)/common/tv_filters/AtariNTSC.cxx \
$(CORE_DIR)/common/tv_filters/NTSCFilter.cxx \ $(CORE_DIR)/common/tv_filters/NTSCFilter.cxx \
$(CORE_DIR)/common/ZipHandler.cxx \
$(CORE_DIR)/emucore/Bankswitch.cxx \ $(CORE_DIR)/emucore/Bankswitch.cxx \
$(CORE_DIR)/emucore/Cart3EPlus.cxx \ $(CORE_DIR)/emucore/Cart3EPlus.cxx \
$(CORE_DIR)/emucore/Cart4KSC.cxx \ $(CORE_DIR)/emucore/Cart4KSC.cxx \
@ -76,18 +75,6 @@ SOURCES_CXX := \
$(CORE_DIR)/emucore/tia/Player.cxx \ $(CORE_DIR)/emucore/tia/Player.cxx \
$(CORE_DIR)/emucore/tia/Playfield.cxx \ $(CORE_DIR)/emucore/tia/Playfield.cxx \
$(CORE_DIR)/emucore/tia/TIA.cxx \ $(CORE_DIR)/emucore/tia/TIA.cxx \
$(CORE_DIR)/gui/ColorWidget.cxx \
$(CORE_DIR)/gui/DeveloperDialog.cxx \
$(CORE_DIR)/gui/FileListWidget.cxx \
$(CORE_DIR)/gui/JoystickDialog.cxx \
$(CORE_DIR)/gui/LoggerDialog.cxx \
$(CORE_DIR)/gui/MinUICommandDialog.cxx \
$(CORE_DIR)/gui/RadioButtonWidget.cxx \
$(CORE_DIR)/gui/SnapshotDialog.cxx \
$(CORE_DIR)/gui/TimeLineWidget.cxx \
$(CORE_DIR)/gui/TimeMachine.cxx \
$(CORE_DIR)/gui/TimeMachineDialog.cxx \
$(CORE_DIR)/common/PNGLibrary.cxx \
$(CORE_DIR)/emucore/AtariVox.cxx \ $(CORE_DIR)/emucore/AtariVox.cxx \
$(CORE_DIR)/emucore/Booster.cxx \ $(CORE_DIR)/emucore/Booster.cxx \
$(CORE_DIR)/emucore/Cart.cxx \ $(CORE_DIR)/emucore/Cart.cxx \
@ -140,43 +127,6 @@ SOURCES_CXX := \
$(CORE_DIR)/emucore/Settings.cxx \ $(CORE_DIR)/emucore/Settings.cxx \
$(CORE_DIR)/emucore/Switches.cxx \ $(CORE_DIR)/emucore/Switches.cxx \
$(CORE_DIR)/emucore/System.cxx \ $(CORE_DIR)/emucore/System.cxx \
$(CORE_DIR)/emucore/Thumbulator.cxx \ $(CORE_DIR)/emucore/Thumbulator.cxx
$(CORE_DIR)/gui/AboutDialog.cxx \
$(CORE_DIR)/gui/AudioDialog.cxx \
$(CORE_DIR)/gui/BrowserDialog.cxx \
$(CORE_DIR)/gui/CheckListWidget.cxx \
$(CORE_DIR)/gui/ComboDialog.cxx \
$(CORE_DIR)/gui/CommandDialog.cxx \
$(CORE_DIR)/gui/CommandMenu.cxx \
$(CORE_DIR)/gui/ContextMenu.cxx \
$(CORE_DIR)/gui/Dialog.cxx \
$(CORE_DIR)/gui/DialogContainer.cxx \
$(CORE_DIR)/gui/EditableWidget.cxx \
$(CORE_DIR)/gui/EditTextWidget.cxx \
$(CORE_DIR)/gui/EventMappingWidget.cxx \
$(CORE_DIR)/gui/Font.cxx \
$(CORE_DIR)/gui/GameInfoDialog.cxx \
$(CORE_DIR)/gui/GameList.cxx \
$(CORE_DIR)/gui/GlobalPropsDialog.cxx \
$(CORE_DIR)/gui/HelpDialog.cxx \
$(CORE_DIR)/gui/InputDialog.cxx \
$(CORE_DIR)/gui/InputTextDialog.cxx \
$(CORE_DIR)/gui/Launcher.cxx \
$(CORE_DIR)/gui/LauncherDialog.cxx \
$(CORE_DIR)/gui/ListWidget.cxx \
$(CORE_DIR)/gui/Menu.cxx \
$(CORE_DIR)/gui/MessageBox.cxx \
$(CORE_DIR)/gui/OptionsDialog.cxx \
$(CORE_DIR)/gui/PopUpWidget.cxx \
$(CORE_DIR)/gui/ProgressDialog.cxx \
$(CORE_DIR)/gui/RomAuditDialog.cxx \
$(CORE_DIR)/gui/RomInfoWidget.cxx \
$(CORE_DIR)/gui/ScrollBarWidget.cxx \
$(CORE_DIR)/gui/StellaSettingsDialog.cxx \
$(CORE_DIR)/gui/StringListWidget.cxx \
$(CORE_DIR)/gui/TabWidget.cxx \
$(CORE_DIR)/gui/UIDialog.cxx \
$(CORE_DIR)/gui/VideoDialog.cxx \
$(CORE_DIR)/gui/Widget.cxx
SOURCES_C := SOURCES_C :=

View File

@ -148,7 +148,6 @@
<ClCompile Include="..\common\AudioSettings.cxx" /> <ClCompile Include="..\common\AudioSettings.cxx" />
<ClCompile Include="..\common\Base.cxx" /> <ClCompile Include="..\common\Base.cxx" />
<ClCompile Include="..\common\FpsMeter.cxx" /> <ClCompile Include="..\common\FpsMeter.cxx" />
<ClCompile Include="..\common\FSNodeZIP.cxx" />
<ClCompile Include="..\common\MouseControl.cxx" /> <ClCompile Include="..\common\MouseControl.cxx" />
<ClCompile Include="..\common\PhysicalJoystick.cxx" /> <ClCompile Include="..\common\PhysicalJoystick.cxx" />
<ClCompile Include="..\common\PJoystickHandler.cxx" /> <ClCompile Include="..\common\PJoystickHandler.cxx" />
@ -161,7 +160,6 @@
<ClCompile Include="..\common\repository\KeyValueRepositoryConfigfile.cxx" /> <ClCompile Include="..\common\repository\KeyValueRepositoryConfigfile.cxx" />
<ClCompile Include="..\common\tv_filters\AtariNTSC.cxx" /> <ClCompile Include="..\common\tv_filters\AtariNTSC.cxx" />
<ClCompile Include="..\common\tv_filters\NTSCFilter.cxx" /> <ClCompile Include="..\common\tv_filters\NTSCFilter.cxx" />
<ClCompile Include="..\common\ZipHandler.cxx" />
<ClCompile Include="..\emucore\Bankswitch.cxx" /> <ClCompile Include="..\emucore\Bankswitch.cxx" />
<ClCompile Include="..\emucore\Cart3EPlus.cxx" /> <ClCompile Include="..\emucore\Cart3EPlus.cxx" />
<ClCompile Include="..\emucore\Cart4KSC.cxx" /> <ClCompile Include="..\emucore\Cart4KSC.cxx" />
@ -207,19 +205,6 @@
<ClCompile Include="..\emucore\tia\Player.cxx" /> <ClCompile Include="..\emucore\tia\Player.cxx" />
<ClCompile Include="..\emucore\tia\Playfield.cxx" /> <ClCompile Include="..\emucore\tia\Playfield.cxx" />
<ClCompile Include="..\emucore\tia\TIA.cxx" /> <ClCompile Include="..\emucore\tia\TIA.cxx" />
<ClCompile Include="..\gui\ColorWidget.cxx" />
<ClCompile Include="..\gui\DeveloperDialog.cxx" />
<ClCompile Include="..\gui\FileListWidget.cxx" />
<ClCompile Include="..\gui\JoystickDialog.cxx" />
<ClCompile Include="..\gui\LoggerDialog.cxx" />
<ClCompile Include="..\gui\MinUICommandDialog.cxx" />
<ClCompile Include="..\gui\RadioButtonWidget.cxx" />
<ClCompile Include="..\gui\SnapshotDialog.cxx" />
<ClCompile Include="..\gui\StellaSettingsDialog.cxx" />
<ClCompile Include="..\gui\TimeLineWidget.cxx" />
<ClCompile Include="..\gui\TimeMachine.cxx" />
<ClCompile Include="..\gui\TimeMachineDialog.cxx" />
<ClCompile Include="..\common\PNGLibrary.cxx" />
<ClCompile Include="..\emucore\AtariVox.cxx" /> <ClCompile Include="..\emucore\AtariVox.cxx" />
<ClCompile Include="..\emucore\Booster.cxx" /> <ClCompile Include="..\emucore\Booster.cxx" />
<ClCompile Include="..\emucore\Cart.cxx" /> <ClCompile Include="..\emucore\Cart.cxx" />
@ -273,42 +258,6 @@
<ClCompile Include="..\emucore\Switches.cxx" /> <ClCompile Include="..\emucore\Switches.cxx" />
<ClCompile Include="..\emucore\System.cxx" /> <ClCompile Include="..\emucore\System.cxx" />
<ClCompile Include="..\emucore\Thumbulator.cxx" /> <ClCompile Include="..\emucore\Thumbulator.cxx" />
<ClCompile Include="..\gui\AboutDialog.cxx" />
<ClCompile Include="..\gui\AudioDialog.cxx" />
<ClCompile Include="..\gui\BrowserDialog.cxx" />
<ClCompile Include="..\gui\CheckListWidget.cxx" />
<ClCompile Include="..\gui\ComboDialog.cxx" />
<ClCompile Include="..\gui\CommandDialog.cxx" />
<ClCompile Include="..\gui\CommandMenu.cxx" />
<ClCompile Include="..\gui\ContextMenu.cxx" />
<ClCompile Include="..\gui\Dialog.cxx" />
<ClCompile Include="..\gui\DialogContainer.cxx" />
<ClCompile Include="..\gui\EditableWidget.cxx" />
<ClCompile Include="..\gui\EditTextWidget.cxx" />
<ClCompile Include="..\gui\EventMappingWidget.cxx" />
<ClCompile Include="..\gui\Font.cxx" />
<ClCompile Include="..\gui\GameInfoDialog.cxx" />
<ClCompile Include="..\gui\GameList.cxx" />
<ClCompile Include="..\gui\GlobalPropsDialog.cxx" />
<ClCompile Include="..\gui\HelpDialog.cxx" />
<ClCompile Include="..\gui\InputDialog.cxx" />
<ClCompile Include="..\gui\InputTextDialog.cxx" />
<ClCompile Include="..\gui\Launcher.cxx" />
<ClCompile Include="..\gui\LauncherDialog.cxx" />
<ClCompile Include="..\gui\ListWidget.cxx" />
<ClCompile Include="..\gui\Menu.cxx" />
<ClCompile Include="..\gui\MessageBox.cxx" />
<ClCompile Include="..\gui\OptionsDialog.cxx" />
<ClCompile Include="..\gui\PopUpWidget.cxx" />
<ClCompile Include="..\gui\ProgressDialog.cxx" />
<ClCompile Include="..\gui\RomAuditDialog.cxx" />
<ClCompile Include="..\gui\RomInfoWidget.cxx" />
<ClCompile Include="..\gui\ScrollBarWidget.cxx" />
<ClCompile Include="..\gui\StringListWidget.cxx" />
<ClCompile Include="..\gui\TabWidget.cxx" />
<ClCompile Include="..\gui\UIDialog.cxx" />
<ClCompile Include="..\gui\VideoDialog.cxx" />
<ClCompile Include="..\gui\Widget.cxx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\common\AudioQueue.hxx" /> <ClInclude Include="..\common\AudioQueue.hxx" />
@ -317,7 +266,6 @@
<ClInclude Include="..\common\bspf.hxx" /> <ClInclude Include="..\common\bspf.hxx" />
<ClInclude Include="..\common\FpsMeter.hxx" /> <ClInclude Include="..\common\FpsMeter.hxx" />
<ClInclude Include="..\common\FSNodeFactory.hxx" /> <ClInclude Include="..\common\FSNodeFactory.hxx" />
<ClInclude Include="..\common\FSNodeZIP.hxx" />
<ClInclude Include="..\common\LinkedObjectPool.hxx" /> <ClInclude Include="..\common\LinkedObjectPool.hxx" />
<ClInclude Include="..\common\Logger.hxx" /> <ClInclude Include="..\common\Logger.hxx" />
<ClInclude Include="..\common\MediaFactory.hxx" /> <ClInclude Include="..\common\MediaFactory.hxx" />
@ -325,6 +273,7 @@
<ClInclude Include="..\common\PhysicalJoystick.hxx" /> <ClInclude Include="..\common\PhysicalJoystick.hxx" />
<ClInclude Include="..\common\PJoystickHandler.hxx" /> <ClInclude Include="..\common\PJoystickHandler.hxx" />
<ClInclude Include="..\common\PKeyboardHandler.hxx" /> <ClInclude Include="..\common\PKeyboardHandler.hxx" />
<ClInclude Include="..\common\Rect.hxx" />
<ClInclude Include="..\common\RewindManager.hxx" /> <ClInclude Include="..\common\RewindManager.hxx" />
<ClInclude Include="..\common\StaggeredLogger.hxx" /> <ClInclude Include="..\common\StaggeredLogger.hxx" />
<ClInclude Include="..\common\StateManager.hxx" /> <ClInclude Include="..\common\StateManager.hxx" />
@ -336,7 +285,6 @@
<ClInclude Include="..\common\tv_filters\NTSCFilter.hxx" /> <ClInclude Include="..\common\tv_filters\NTSCFilter.hxx" />
<ClInclude Include="..\common\Variant.hxx" /> <ClInclude Include="..\common\Variant.hxx" />
<ClInclude Include="..\common\Vec.hxx" /> <ClInclude Include="..\common\Vec.hxx" />
<ClInclude Include="..\common\ZipHandler.hxx" />
<ClInclude Include="..\emucore\AmigaMouse.hxx" /> <ClInclude Include="..\emucore\AmigaMouse.hxx" />
<ClInclude Include="..\emucore\AtariMouse.hxx" /> <ClInclude Include="..\emucore\AtariMouse.hxx" />
<ClInclude Include="..\emucore\Bankswitch.hxx" /> <ClInclude Include="..\emucore\Bankswitch.hxx" />
@ -397,22 +345,6 @@
<ClInclude Include="..\emucore\tia\TIA.hxx" /> <ClInclude Include="..\emucore\tia\TIA.hxx" />
<ClInclude Include="..\emucore\tia\TIAConstants.hxx" /> <ClInclude Include="..\emucore\tia\TIAConstants.hxx" />
<ClInclude Include="..\emucore\TrakBall.hxx" /> <ClInclude Include="..\emucore\TrakBall.hxx" />
<ClInclude Include="..\gui\ColorWidget.hxx" />
<ClInclude Include="..\gui\ConsoleBFont.hxx" />
<ClInclude Include="..\gui\ConsoleMediumBFont.hxx" />
<ClInclude Include="..\gui\ConsoleMediumFont.hxx" />
<ClInclude Include="..\gui\DeveloperDialog.hxx" />
<ClInclude Include="..\gui\FileListWidget.hxx" />
<ClInclude Include="..\gui\JoystickDialog.hxx" />
<ClInclude Include="..\gui\LoggerDialog.hxx" />
<ClInclude Include="..\gui\MinUICommandDialog.hxx" />
<ClInclude Include="..\gui\RadioButtonWidget.hxx" />
<ClInclude Include="..\gui\SnapshotDialog.hxx" />
<ClInclude Include="..\gui\StellaSettingsDialog.hxx" />
<ClInclude Include="..\gui\TimeLineWidget.hxx" />
<ClInclude Include="..\gui\TimeMachine.hxx" />
<ClInclude Include="..\gui\TimeMachineDialog.hxx" />
<ClInclude Include="..\common\PNGLibrary.hxx" />
<ClInclude Include="..\common\Stack.hxx" /> <ClInclude Include="..\common\Stack.hxx" />
<ClInclude Include="..\common\Version.hxx" /> <ClInclude Include="..\common\Version.hxx" />
<ClInclude Include="..\emucore\AtariVox.hxx" /> <ClInclude Include="..\emucore\AtariVox.hxx" />
@ -475,47 +407,6 @@
<ClInclude Include="..\emucore\Switches.hxx" /> <ClInclude Include="..\emucore\Switches.hxx" />
<ClInclude Include="..\emucore\System.hxx" /> <ClInclude Include="..\emucore\System.hxx" />
<ClInclude Include="..\emucore\Thumbulator.hxx" /> <ClInclude Include="..\emucore\Thumbulator.hxx" />
<ClInclude Include="..\gui\AboutDialog.hxx" />
<ClInclude Include="..\gui\AudioDialog.hxx" />
<ClInclude Include="..\gui\BrowserDialog.hxx" />
<ClInclude Include="..\gui\CheckListWidget.hxx" />
<ClInclude Include="..\gui\ComboDialog.hxx" />
<ClInclude Include="..\gui\Command.hxx" />
<ClInclude Include="..\gui\CommandDialog.hxx" />
<ClInclude Include="..\gui\CommandMenu.hxx" />
<ClInclude Include="..\gui\ConsoleFont.hxx" />
<ClInclude Include="..\gui\ContextMenu.hxx" />
<ClInclude Include="..\gui\Dialog.hxx" />
<ClInclude Include="..\gui\DialogContainer.hxx" />
<ClInclude Include="..\gui\EditableWidget.hxx" />
<ClInclude Include="..\gui\EditTextWidget.hxx" />
<ClInclude Include="..\gui\EventMappingWidget.hxx" />
<ClInclude Include="..\gui\Font.hxx" />
<ClInclude Include="..\gui\GameInfoDialog.hxx" />
<ClInclude Include="..\gui\GameList.hxx" />
<ClInclude Include="..\gui\GlobalPropsDialog.hxx" />
<ClInclude Include="..\gui\GuiObject.hxx" />
<ClInclude Include="..\gui\HelpDialog.hxx" />
<ClInclude Include="..\gui\InputDialog.hxx" />
<ClInclude Include="..\gui\InputTextDialog.hxx" />
<ClInclude Include="..\gui\Launcher.hxx" />
<ClInclude Include="..\gui\LauncherDialog.hxx" />
<ClInclude Include="..\gui\ListWidget.hxx" />
<ClInclude Include="..\gui\Menu.hxx" />
<ClInclude Include="..\gui\MessageBox.hxx" />
<ClInclude Include="..\gui\OptionsDialog.hxx" />
<ClInclude Include="..\gui\PopUpWidget.hxx" />
<ClInclude Include="..\gui\ProgressDialog.hxx" />
<ClInclude Include="..\gui\Rect.hxx" />
<ClInclude Include="..\gui\RomAuditDialog.hxx" />
<ClInclude Include="..\gui\RomInfoWidget.hxx" />
<ClInclude Include="..\gui\ScrollBarWidget.hxx" />
<ClInclude Include="..\gui\StellaFont.hxx" />
<ClInclude Include="..\gui\StringListWidget.hxx" />
<ClInclude Include="..\gui\TabWidget.hxx" />
<ClInclude Include="..\gui\UIDialog.hxx" />
<ClInclude Include="..\gui\VideoDialog.hxx" />
<ClInclude Include="..\gui\Widget.hxx" />
<ClInclude Include="SoundLIBRETRO.hxx" /> <ClInclude Include="SoundLIBRETRO.hxx" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -3059,6 +3059,7 @@
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
SDL_SUPPORT, SDL_SUPPORT,
GUI_SUPPORT,
CHEATCODE_SUPPORT, CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT, DEBUGGER_SUPPORT,
JOYSTICK_SUPPORT, JOYSTICK_SUPPORT,
@ -3115,6 +3116,7 @@
GCC_OPTIMIZATION_LEVEL = 3; GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
SDL_SUPPORT, SDL_SUPPORT,
GUI_SUPPORT,
CHEATCODE_SUPPORT, CHEATCODE_SUPPORT,
DEBUGGER_SUPPORT, DEBUGGER_SUPPORT,
JOYSTICK_SUPPORT, JOYSTICK_SUPPORT,

View File

@ -157,7 +157,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -193,7 +193,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;DEBUG_BUILD;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -226,7 +226,7 @@
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader> <PrecompiledHeader>
@ -260,7 +260,7 @@
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader> <PrecompiledHeader>
@ -298,7 +298,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader> <PrecompiledHeader>
@ -335,7 +335,7 @@
<InlineFunctionExpansion>Default</InlineFunctionExpansion> <InlineFunctionExpansion>Default</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NOMINMAX;NDEBUG;SDL_SUPPORT;GUI_SUPPORT;PNG_SUPPORT;ZIP_SUPPORT;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<PrecompiledHeader> <PrecompiledHeader>
@ -1405,4 +1405,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>