mirror of https://github.com/stella-emu/stella.git
83 lines
4.1 KiB
C++
83 lines
4.1 KiB
C++
//============================================================================
|
|
//
|
|
// SSSS tt lll lll
|
|
// SS SS tt ll ll
|
|
// SS tttttt eeee ll ll aaaa
|
|
// SSSS tt ee ee ll ll aa
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
// SS SS tt ee ll ll aa aa
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
//
|
|
// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
|
|
// and the Stella Team
|
|
//
|
|
// See the file "License.txt" for information on usage and redistribution of
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
//============================================================================
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "SettingsR77.hxx"
|
|
|
|
/**
|
|
The Retron77 system is a locked-down, set piece of hardware.
|
|
No configuration of Stella is possible, since the UI isn't exposed.
|
|
So we hardcode the specific settings here.
|
|
*/
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
SettingsR77::SettingsR77()
|
|
: Settings()
|
|
{
|
|
setPermanent("video", "opengles2");
|
|
setPermanent("vsync", "true");
|
|
|
|
setPermanent("tia.zoom", "3");
|
|
|
|
// TODO - use new argument that differentiates between fullscreen and
|
|
// fullscreen without aspect correction
|
|
// Re-add ability to use a specific fullscreen resolution
|
|
setPermanent("fullscreen", "false"); // start in 16:9 mode by default
|
|
setPermanent("fullres", "1280x720");
|
|
|
|
setPermanent("romdir", "/mnt/games");
|
|
setPermanent("snapsavedir", "/mnt/stella/snapshots");
|
|
setPermanent("snaploaddir", "/mnt/stella/snapshots");
|
|
|
|
setPermanent("launcherres", "1280x720");
|
|
setPermanent("launcherfont", "large");
|
|
setPermanent("romviewer", "2");
|
|
setPermanent("exitlauncher", "true");
|
|
|
|
setPermanent("dev.settings", "false");
|
|
setPermanent("plr.timemachine", false);
|
|
|
|
// FIXME - these are out of date, since the # of events has changed since 3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0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:102:103:109:108:0:106:107:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0");
|
|
setPermanent("joymap", "116^i2c_controller|2 27 27 31 31 0 0 0 0|8 28 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0|0^i2c_controller 2|2 35 35 39 39 0 0 0 0|8 36 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0|0");
|
|
}
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
bool SettingsR77::saveConfigFile(const string& cfgfile) const
|
|
{
|
|
// Almost no settings can be changed, so we completely disable saving
|
|
// most of them. This may also fix reported issues of the config file
|
|
// becoming corrupt.
|
|
//
|
|
// There are currently only a few settings that can be changed
|
|
// These will be expanded as more support is added
|
|
|
|
ofstream out(cfgfile);
|
|
if(!out || !out.is_open())
|
|
return false;
|
|
|
|
out << "fullscreen = " << getString("fullscreen") << endl;
|
|
out << "lastrom = " << getString("lastrom") << endl;
|
|
|
|
out.flush();
|
|
out.close();
|
|
// FIXME system("/bin/fsync /mnt/stella/stellarc&");
|
|
|
|
return true;
|
|
}
|