Auto create main_script if it doesn't exist
This commit is contained in:
parent
aa546e9ca0
commit
6ace6b9b69
|
@ -69,6 +69,11 @@ void setup() {
|
|||
if (!msc::exists(PREFERENCES_PATH)) {
|
||||
preferences::save();
|
||||
}
|
||||
|
||||
// Create main_script.txt if it doesn't exist yet
|
||||
if (!msc::exists(preferences::getMainScript().c_str())) {
|
||||
msc::write(preferences::getMainScript().c_str(), "# Hello World\n", 14);
|
||||
}
|
||||
|
||||
// Setup background tasks
|
||||
tasks::setCallback(update);
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace preferences {
|
|||
std::string default_layout { "US" };
|
||||
int default_delay { 5 };
|
||||
|
||||
std::string main_script { "main.script" };
|
||||
std::string main_script { "main_script.txt" };
|
||||
|
||||
int attack_color[4] { 128, 0, 0, 0 };
|
||||
int setup_color[4] { 0, 0, 20, 0 };
|
||||
|
@ -215,7 +215,7 @@ namespace preferences {
|
|||
default_layout = "US";
|
||||
default_delay = 5;
|
||||
|
||||
main_script = "main.script";
|
||||
main_script = "main_script.txt";
|
||||
|
||||
attack_color[0] = 128;
|
||||
attack_color[1] = 0;
|
||||
|
|
Loading…
Reference in New Issue