From 5ad9c0e5ce206faa7b5185ac952bc2529633e110 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Wed, 13 Jul 2022 11:32:27 -0230 Subject: [PATCH] Fix minor compile warnings. --- src/common/main.cxx | 9 +++++++++ src/emucore/ProfilingRunner.cxx | 3 +++ src/emucore/tia/frame-manager/AbstractFrameManager.hxx | 2 +- src/emucore/tia/frame-manager/FrameLayoutDetector.hxx | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/common/main.cxx b/src/common/main.cxx index 1354801f7..b2ebb5e58 100644 --- a/src/common/main.cxx +++ b/src/common/main.cxx @@ -74,6 +74,15 @@ void checkForCustomBaseDir(Settings::Options& options); */ bool isProfilingRun(int ac, char* av[]); +/** + In Windows, attach console to allow command line output (e.g. for -help). + This is needed since by default Windows doesn't set up stdout/stderr + correctly. +*/ +void attachConsole(); +void freeConsole(); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void parseCommandLine(int ac, char* av[], Settings::Options& globalOpts, Settings::Options& localOpts) diff --git a/src/emucore/ProfilingRunner.cxx b/src/emucore/ProfilingRunner.cxx index 95c43ba99..b64b80845 100644 --- a/src/emucore/ProfilingRunner.cxx +++ b/src/emucore/ProfilingRunner.cxx @@ -157,6 +157,9 @@ bool ProfilingRunner::runOne(const ProfilingRun& run) cout << "PAL"; consoleTiming = ConsoleTiming::pal; break; + + default: // TODO: add other layouts here + break; } (cout << endl).flush(); diff --git a/src/emucore/tia/frame-manager/AbstractFrameManager.hxx b/src/emucore/tia/frame-manager/AbstractFrameManager.hxx index 2422e57ea..bcaef4589 100644 --- a/src/emucore/tia/frame-manager/AbstractFrameManager.hxx +++ b/src/emucore/tia/frame-manager/AbstractFrameManager.hxx @@ -72,7 +72,7 @@ class AbstractFrameManager : public Serializable /** * Called when a pixel is rendered. */ - virtual void pixelColor(uInt8 color) {}; + virtual void pixelColor(uInt8 color) {} /** * Should the TIA render its frame? This is buffered in a flag for diff --git a/src/emucore/tia/frame-manager/FrameLayoutDetector.hxx b/src/emucore/tia/frame-manager/FrameLayoutDetector.hxx index a9b40752f..bdb8ad391 100644 --- a/src/emucore/tia/frame-manager/FrameLayoutDetector.hxx +++ b/src/emucore/tia/frame-manager/FrameLayoutDetector.hxx @@ -46,7 +46,7 @@ class FrameLayoutDetector: public AbstractFrameManager /** * Simulate some input to pass a potential title screen. */ - void FrameLayoutDetector::simulateInput(M6532& riot, EventHandler& eventHandler, bool pressed) const; + void simulateInput(M6532& riot, EventHandler& eventHandler, bool pressed) const; protected: