0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

this is hell

This commit is contained in:
2025-03-14 22:30:37 +01:00
parent c2d5ec99b4
commit 45b01d6c19

View File

@@ -404,10 +404,13 @@ void init_rds_encoder(RDSEncoder* enc) {
init_rtplus(enc, GROUP_11A);
if(fileExists(getenv("HOME")+"/.rdsEncoder")) {
loadFromFile(getenv("HOME")+"/.rdsEncoder", enc);
char encoderPath[256];
snprintf(encoderPath, sizeof(encoderPath), "%s/.rdsEncoder", getenv("HOME"));
if (fileExists(encoderPath)) {
loadFromFile(encoderPath, enc);
} else {
saveToFile(getenv("HOME")+"/.rdsEncoder", enc);
saveToFile(encoderPath, enc);
}
}