mirror of https://github.com/stella-emu/stella.git
When saving logfile, show a message indicating location.
Since the logfile is now saved to the default OSystem location, we no longer need PATH_SEPARATOR, so remove all instances of it.
This commit is contained in:
parent
cae32b0b3f
commit
5d6a0f9dbb
|
@ -93,20 +93,6 @@ static const string EmptyString("");
|
|||
|
||||
namespace BSPF
|
||||
{
|
||||
// Defines to help with path handling
|
||||
#if defined(BSPF_UNIX) || defined(BSPF_MACOS)
|
||||
static const string PATH_SEPARATOR = "/";
|
||||
#define ATTRIBUTE_FMT_PRINTF __attribute__((__format__ (__printf__, 2, 0)))
|
||||
#elif defined(BSPF_WINDOWS)
|
||||
static const string PATH_SEPARATOR = "\\";
|
||||
#define ATTRIBUTE_FMT_PRINTF
|
||||
#elif defined(__LIB_RETRO__)
|
||||
static const string PATH_SEPARATOR = "/";
|
||||
#define ATTRIBUTE_FMT_PRINTF
|
||||
#else
|
||||
#error Update src/common/bspf.hxx for path separator
|
||||
#endif
|
||||
|
||||
// CPU architecture type
|
||||
// This isn't complete yet, but takes care of all the major platforms
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
|
|
|
@ -27,6 +27,13 @@ class FilesystemNode;
|
|||
#include "Command.hxx"
|
||||
#include "bspf.hxx"
|
||||
|
||||
// TODO - remove this once we clean up the printf stuff
|
||||
#if defined(BSPF_UNIX) || defined(BSPF_MACOS)
|
||||
#define ATTRIBUTE_FMT_PRINTF __attribute__((__format__ (__printf__, 2, 0)))
|
||||
#else
|
||||
#define ATTRIBUTE_FMT_PRINTF
|
||||
#endif
|
||||
|
||||
class PromptWidget : public Widget, public CommandSender
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -106,12 +106,15 @@ void LoggerDialog::saveConfig()
|
|||
void LoggerDialog::saveLogFile()
|
||||
{
|
||||
ostringstream path;
|
||||
path << "~" << BSPF::PATH_SEPARATOR << "stella.log";
|
||||
path << instance().defaultSaveDir() << "stella.log";
|
||||
FilesystemNode node(path.str());
|
||||
|
||||
ofstream out(node.getPath());
|
||||
if(out.is_open())
|
||||
{
|
||||
out << instance().logMessages();
|
||||
instance().frameBuffer().showMessage("Saving log file to " + path.str());
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue