Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0d84a3f
A console mode change at run time signals the style update events of …
seedds Nov 10, 2026
f1701b9
Guest files: S2Arm's GPU hang from F_PUNCHHOLE while rendering is rec…
seedds Nov 11, 2026
380ff71
The committed shader translator starts on macOS 26 again: its arm64 s…
seedds Nov 11, 2026
c823c3c
test_dmsh_pool_arrays passes reflect() the translator's cbufs list: e…
seedds Nov 11, 2026
f20f650
Mac: a raw HID pad is a player from its first button press, so a keyb…
seedds Nov 11, 2026
1d090a6
A uniform slot is bounded at its bound size rounded up to 256 bytes, …
seedds Nov 11, 2026
6a6a018
The prediction makes no pulling stand-in for a proposed pipeline key …
seedds Nov 11, 2026
81b21cb
The CPU conversion of vertex attributes takes ranges up to 64 MiB and…
seedds Nov 11, 2026
430ace1
Metroid Prime 4: Beyond (Switch, 1.1.0) plays on the Mac: its profile…
seedds Nov 11, 2026
707cac9
Textures that dynamic resolution resizes take their memory from the r…
seedds Nov 11, 2026
511a0a2
Unused border corrections are compiled out of pipelines that bind no …
seedds Nov 11, 2026
01ec314
Touch screen states are numbered from one count in docked and handhel…
seedds Nov 11, 2026
7ef8339
Switch 2 controllers with Press a button to join: a controller that c…
seedds Nov 11, 2026
3553400
An Ampere BRX finds its c1 jump table when the block that loads it wa…
seedds Nov 11, 2026
5714e32
The NSP script takes a fallback app icon: --fallback-icon / FALLBACK_…
seedds Nov 11, 2026
477b4f8
A DualSense keeps its left and right handle haptics when its server o…
seedds Nov 11, 2026
1e69c18
A write to a host page two pools share is no longer missed while a po…
seedds Nov 11, 2026
2d3fb83
A log line from a hook is written on the thread's host stack, and the…
seedds Nov 11, 2026
3e94079
The graphics layer's log lines are written on the host stack as the h…
seedds Nov 11, 2026
084f5aa
The graphics scale is tier 0 in both modes, so Switch 2 games draw th…
seedds Nov 11, 2026
8fb5ffe
Port The Binding of Isaac: Rebirth
seedds Nov 11, 2026
352e4a6
A storage takeover finds its candidates by pool cell instead of walki…
seedds Nov 11, 2026
f75ac06
A game's Mac shaders are compiled for the Mac host's minimum macOS, s…
seedds Nov 11, 2026
8b55ebb
The shader build finishes its shaders in worker processes, so a cold …
seedds Nov 11, 2026
47343a4
The controller applet leaves out the players past the game's maximum,…
seedds Nov 11, 2026
d2556cf
A re-upload of a texture taken from guest memory reads only the image…
seedds Nov 11, 2026
e2df31c
A serial entry that holds a view holds the textures it is a view of, …
seedds Nov 11, 2026
68dde14
A HID entry counts as a pad only while it sends reports, so one Pro C…
seedds Nov 11, 2026
07d6ea4
Cloud saves: the launchers ask which save to keep when both changed, …
seedds Nov 11, 2026
47607fe
A packaged texture's layout keeps its width alignment, so a texture w…
seedds Nov 11, 2026
9d60776
WriteTexels writes a linear texture by rows of its stride, so a nativ…
seedds Nov 11, 2026
4ce1449
oe::RequestToRelaunchApplication ends the application and starts it a…
seedds Nov 11, 2026
06c2ea4
A cloud-save pull swaps each of the cloud's folders in from this devi…
seedds Nov 11, 2026
4b616bb
Automated host runs keep cloud saves off, so a regression, benchmark …
seedds Nov 11, 2026
35a5aa2
A JIT plugin loads again from its data as rewritten and a zero bss, s…
seedds Nov 11, 2026
7c384e7
An OpenGL shader deleted while attached is only flagged and goes with…
seedds Nov 11, 2026
b149a1e
A Vulkan descriptor copied into a binding with immutable samplers tak…
seedds Nov 11, 2026
dc3b6cf
Merge upstream main (seedds/nxnative b149a1e4) into the fork
khalilgharbaoui Nov 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cloud saves: the launchers ask which save to keep when both changed, …
…and wait for a cloud save iCloud has only listed: with both saves changed since the last sync, the host kept the one with the newest file date, so a new game's first save written 45 s after a 54-minute save replaced it in the cloud (Cadence of Hyrule, 01000B900D8B0000 1.5.0, an iPhone and a Mac mini M2 Pro; the real save survived only in the phone's save-backups/<date> cloud). The host could ask instead (ss_decide's SS_ASK, DM_SAVE_SYNC_CHOICE in docs/frontends.md), but neither launcher set it. Now save_sync_report(save, title, folder, wait_ms, out, n) answers, before the start, one line about the two saves as the game's first mount will see them: hashes, dates, file counts, sizes (ss_meta.bytes), the cloud's device and whether both changed. It finds the cloud's file with the mount's own rules (cloud_path: DM_SAVE_SYNC, icloud, a folder named after the game) and fetches it through the same front-end call, into a file of its own under <save>.sync-tmp. Both launchers call it at Play through SaveSyncReport.swift (shared; pack_app.py builds it into the Mac launcher): on a conflict they show both saves with their date and size, since the newer is not always the one with progress (no default button on the Mac), and pass local:<hash> or cloud:<hash>; with nothing to choose, ask; a cloud save that did not come in a minute is said so, with this device's save (offline: the mount does not wait again), another try or Cancel; while it downloads, Play Without It goes on at once. The Mac launcher sets DM_SAVE before its window (launcher.c set it after, so the check could not read the save) and checks with the window off too; the iPhone launcher names the cloud file with dm_save_title() (hle_fs.c) and DM_SAVE_SYNC from dm_cloud_saves_env(). On the iPhone, front_save_sync_fetch asks iCloud for a save it has only listed and waits for the file until it is there or NSURLUbiquitousItemDownloadingErrorKey reports a failure, so an offline fetch ends at once; a refused request falls through to the coordinated read as before. The mount's own wait stays 10 s. With no launcher (DM_LAUNCHER=0, an iPhone app without launcher.json) the newer save still wins. The diagnosis, the report and the launcher prompts are PR seedds#2180's; changed here: the report finds the cloud file itself (the PR's launchers built the path, which missed the game's own folder and icloud: such a start passed ask with nothing compared and synced neither side from then on), the Mac's DM_SAVE order (its prompt never showed), sizes in the dialog, offline instead of ask when the cloud was not read (the PR's start waited 20 s in the report and 20 s more at the mount), the download wait stopping on iCloud's error, the shared Swift file; the PR's iOS folder picker rewrite is left out (issue seedds#1148, its own change). Reference entries: Both saves changed is the player's choice, not the newest file's; The cloud's save is listed but not downloaded. Checked: t_save_sync 101 checks (section 15: nothing anywhere, a save only here, in step, the game's own folder, only in the cloud, both changed with the new save the newer and the smaller, the cloud unreadable, sync off, DM_SAVE_SYNC when no folder is given, nothing left behind), t_save_sync_metadata 41, t_fs 146, test_docs, test_nsp_mac_app, test_launcher_storage; the Mac launcher compiles and links as pack_app.py builds it, the iPhone's Swift sources and SaveSync.m compile against the iOS SDK; lint_c.py tidy on the changed C files: nothing above the baseline. Not run: either dialog by hand, an iPhone (a listed save, an offline start, a reconnect), regress.py (no route turns cloud saves on). lint_python.py's one new finding is dmsh_entry.py's, on main before this

Front-ends: new: save_sync_report(save, title, folder, wait_ms, out, n) and dm_save_title() in dm/host/save_sync.h, the comparison a launcher asks the player with before the start
Front-ends: interface: pass DM_SAVE_SYNC_CHOICE=ask only after a comparison; with the cloud not read, offline

Co-authored-by: kendrasloane90 <257330740+kendrasloane90@users.noreply.github.com>
  • Loading branch information
seedds and kendrasloane90 committed Nov 11, 2026
commit 07d6ea46fb70ca55cbeaa2fa96e0e11baf93dbdd
1 change: 1 addition & 0 deletions dm/host/hle_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ HLE_FORCE("_ZN2nn2fs18IsSaveDataExistingENS_13ApplicationIdERKNS_7account3UidE",
HLE_FORCE("_ZN2nn2fs21MountSaveDataReadOnlyEPKcNS_13ApplicationIdERKNS_7account3UidE", "fsp-srv; another program's save data: none", Result, h_fs_MountSaveRO, const char *name, uint64_t app, const void *uid) {
(void)uid; LOG("[RED] fs read-only mount of another program's save data %s: program %016llx, the host has none", name, (unsigned long long)app); return 0x7d402u; // fs ResultTargetNotFound
}
const char *dm_save_title(void) { return DM_GAME_ID; } // save_sync.h: the iPhone launcher names the cloud file with it before the game runs
HLE_FORCE("_ZN2nn2fs13MountSaveDataEPKcRKNS_7account3UidE", "fsp-srv; save data → host directory (single user)", Result, h_fs_MountSave, const char *name, const void *uid) { dm_thread_service_request();
(void)uid;
// No default directory: silently landing on a directory with no characters distorts the "character select" measurement (this once caused a misjudgment). Runs always use a fresh copy of save_ref
Expand Down
44 changes: 38 additions & 6 deletions dm/host/save_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static int pack_entry(void *c, const char *abs, const char *rel, const struct st
}
close(fd);
if (left) return -1; // a failed read, or a file shorter than its size (the save is a clone no Commit touches, so not one being written)
k->m->files++;
k->m->files++; k->m->bytes += (int64_t)size;
if (mt > k->m->saved) k->m->saved = mt;
return 0;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ int ss_read(const char *bundle, const char *into, ss_meta *m) {
struct timespec t[2] = {{(time_t)mt, 0}, {(time_t)mt, 0}}; futimens(fd, t);
int bad = close(fd); fd = -1; if (bad) goto done;
}
if (h[0] == 2) m->files++;
if (h[0] == 2) m->files++, m->bytes += (int64_t)size;
}
if (fread(end, 1, sizeof end, f) != sizeof end || memcmp(end, END, sizeof end) || fgetc(f) != EOF) goto done;
CC_SHA256_Final(d, &sha); hex(d, m->hash);
Expand All @@ -252,7 +252,7 @@ int ss_read(const char *bundle, const char *into, ss_meta *m) {
done:
if (fd >= 0) close(fd);
free(buf); fclose(f);
if (r) m->files = 0, m->hash[0] = 0;
if (r) m->files = 0, m->bytes = 0, m->hash[0] = 0;
return r;
}

Expand Down Expand Up @@ -347,9 +347,9 @@ static int backup_dir(const char *save, const char *side, char *out, size_t n) {
return 0;
}

// DM_SAVE_SYNC → <folder>/<title ID>/save.dmsync; 0 when sync is off
static int cloud_file(const char *title, char *out, size_t n) {
const char *v = getenv("DM_SAVE_SYNC"); char dir[PATH_MAX], id[24];
// A DM_SAVE_SYNC value → <folder>/<title ID>/save.dmsync; 0 when sync is off
static int cloud_path(const char *v, const char *title, char *out, size_t n) {
char dir[PATH_MAX], id[24];
if (!v || !*v || !strcmp(v, "0")) return 0;
if (!strcmp(v, "icloud")) {
#if TARGET_OS_OSX
Expand All @@ -374,6 +374,7 @@ static int cloud_file(const char *title, char *out, size_t n) {
if (!strcasecmp(last ? last + 1 : dir, id)) return snprintf(out, n, "%s/save.dmsync", dir) < (int)n;
return snprintf(out, n, "%s/%s/save.dmsync", dir, id) < (int)n;
}
static int cloud_file(const char *title, char *out, size_t n) { return cloud_path(getenv("DM_SAVE_SYNC"), title, out, n); }

// The platform's fetch, given at most `ms`: a download iCloud never finishes must not hold the game at its first save mount. One that comes too late is dropped
typedef struct { pthread_mutex_t mu; pthread_cond_t cv; int done, abandoned, result; char cloud[PATH_MAX], local[PATH_MAX]; } fetch_job;
Expand Down Expand Up @@ -560,6 +561,37 @@ static void mount_once(const char *save, const char *title) {
atomic_store(&g_on, 1);
}

// ---------- what a front end asks the player with ----------
// The two saves and the one last synced, as the mount will see them (dm/host/save_sync.h). The cloud's file is found as the mount finds it (cloud_path) and fetched
// through the same front-end call, so on the iPhone the report is what downloads a file iCloud has only listed. It goes to a file of its own under <save>.sync-tmp:
// a report the front end stopped waiting for may still be fetching when the next one starts, or when the game's mount clears the folder.
int save_sync_report(const char *save, const char *title, const char *folder, int wait_ms, char *out, size_t n) {
char dd[PATH_MAX], cloud[PATH_MAX], tmp[PATH_MAX], theirs[PATH_MAX], base[SS_HASH + 1], dev[64];
static _Atomic int seq;
ss_meta mine, other; int got = -1, both = 0, same = 1, on;
memset(&other, 0, sizeof other); base[0] = 0;
if (!save || !*save || !title || !*title || !out || !n) return -1;
snprintf(dd, sizeof dd, "%s", save); size_t L = strlen(dd); while (L > 1 && dd[L - 1] == '/') dd[--L] = 0;
if (ss_scan(dd, &mine)) return -1;
read_base(dd, base);
if ((on = cloud_path(folder ? folder : getenv("DM_SAVE_SYNC"), title, cloud, sizeof cloud))) {
snprintf(tmp, sizeof tmp, "%s.sync-tmp", dd);
snprintf(theirs, sizeof theirs, "%s/report-%d-%d.dmsync", tmp, (int)getpid(), atomic_fetch_add(&seq, 1));
if (!mkdirs(tmp)) {
got = fetch_timed(cloud, theirs, wait_ms > 0 ? wait_ms : FETCH_MS);
if (got > 0 && ss_read(theirs, NULL, &other)) { SRED("the cloud's save %s is damaged", cloud); got = 0; memset(&other, 0, sizeof other); } // the mount replaces it
unlink(theirs); rmdir(tmp);
}
if (got > 0 && strcasecmp(other.title, title)) same = 0;
}
if (got >= 0 && same) ss_decide(mine.hash, base, got > 0 ? other.hash : "", mine.saved, other.saved, 1, &both);
snprintf(dev, sizeof dev, "%s", other.device); for (char *s = dev; *s; s++) if (*s == ' ' || *s == '=') *s = '_';
int w = snprintf(out, n, "sync=%d cloud=%d local=%s saved=%lld files=%d size=%lld chash=%s csaved=%lld cfiles=%d csize=%lld cdevice=%s sametitle=%d conflict=%d",
on, on ? got : 0, *mine.hash ? mine.hash : "-", (long long)mine.saved, mine.files, (long long)mine.bytes,
got > 0 && *other.hash ? other.hash : "-", (long long)other.saved, other.files, (long long)other.bytes, *dev ? dev : "-", same, both);
return w < 0 || w >= (int)n ? -1 : 0;
}

void save_sync_mount(const char *save, const char *title) { // the first mount does it; a second one (the device save) waits for it
pthread_mutex_lock(&g_mount_mu);
if (!g_mounted) { g_mounted = 1; mount_once(save, title); }
Expand Down
16 changes: 15 additions & 1 deletion dm/host/save_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
// seconds after a Commit, on a thread of its own (the game never waits), when the iPhone app goes to the background, and from the Mac launcher once the host has exited.
// Which way: <DM_SAVE>.sync keeps the hash of the save last known to be the same here and in the cloud. Only the cloud's changed: it comes in; only this one changed: it goes out;
// both changed (played on both without syncing in between, or the first sync of a device that has a save of its own): the start decides. A front end that asks the
// player sets DM_SAVE_SYNC_CHOICE (save_sync.c, read_choice): with no choice, neither replaces the other, the game plays on with this device's and nothing is sent;
// player (the Mac and iPhone launchers, from save_sync_report below) sets DM_SAVE_SYNC_CHOICE (save_sync.c, read_choice): with no choice, neither replaces the other, the game plays on with this device's and nothing is sent;
// with one, the chosen save wins. Without DM_SAVE_SYNC_CHOICE the newer one wins. Only the start decides: a send replaces a cloud save only when it is no save, the
// one last synced, damaged, or the one the start chose against. A cloud that changed since (or that the start could not read) waits for the next start.
// Every save this replaces, here or in the cloud, is kept first in <DM_SAVE>-backups/<date> <side>; the newest 10 of each side stay.
#pragma once
#include <stddef.h>
#include <stdint.h>

#define SS_HASH 32 // hex digits of a save's hash: the first 16 bytes of a SHA-256
Expand All @@ -20,6 +21,7 @@ typedef struct {
int64_t saved; // the newest file's modification time (seconds since 1970): which of two changed saves is newer
char title[24], device[64];
int files; // regular files; 0 = no save
int64_t bytes; // their contents' size: tells the player a new game's save from one with progress (save_sync_report)
} ss_meta;

// ---- the parts (dm/host/tests/t_save_sync.c calls them) ----
Expand All @@ -35,7 +37,19 @@ typedef enum { SS_KEEP, SS_PULL, SS_PUSH, SS_ASK } ss_way;
// player (`ask`), else the newer one by the times (the same time: this device's)
ss_way ss_decide(const char *local, const char *base, const char *remote, int64_t local_saved, int64_t remote_saved, int ask, int *both);

// ---- what a front end asks the player with (docs/frontends.md, The cloud saves folder) ----
// Before the start, the two saves as the game's first mount will compare them, in one line of key=value pairs (no newline):
// sync=<0 off | 1 on> cloud=<1 read | 0 no save there (or a damaged file, which the mount replaces) | -1 not read within wait_ms>
// local=<hash|-> saved=<secs> files=<n> size=<bytes> chash=<hash|-> csaved=<secs> cfiles=<n> csize=<bytes> cdevice=<model, e.g. iPhone17,1|-> sametitle=<0|1> conflict=<0|1>
// conflict = both changed since the last sync (or this device has never synced and both have a save): the case the front end shows both saves for and answers with
// DM_SAVE_SYNC_CHOICE=local:<local> or cloud:<chash>; with no conflict it passes `ask`, and with cloud=-1 `offline` (the mount does not wait again).
// `save` is the committed save folder (DM_SAVE), `title` the title ID, `folder` the cloud folder as DM_SAVE_SYNC would name it (NULL: DM_SAVE_SYNC itself), and
// `wait_ms` how long the cloud's file may take to come (<= 0: as long as the mount waits). Blocks that long at most: call it off the main thread.
// 0 on success, -1 when the arguments do not fit or this device's save cannot be read
int save_sync_report(const char *save, const char *title, const char *folder, int wait_ms, char *out, size_t n);

// ---- the host ----
const char *dm_save_title(void); // the title ID the cloud file is named after (hle_fs.c, from the game's profile): for a front end in the host's process (the iPhone launcher)
void save_sync_mount(const char *save, const char *title); // the game's first save mount (hle_fs.c): brings the cloud's save in when it is the one to keep, starts the sender
void save_sync_committed(void); // a Commit went through (hle_fs.c, under its locks: it only wakes the sender)
int save_sync_flush(int timeout_ms); // sends now what was committed and not sent (the iPhone app going to the background): 1 = in step with the cloud, 0 = not (yet)
Expand Down
46 changes: 46 additions & 0 deletions dm/host/tests/t_save_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,52 @@ int main(void) {
backup_of(X, "cloud", back, sizeof back); snprintf(q, sizeof q, "%s/save/game.dat", back);
CHECK(*back && same(q, "y3"), "and the iPhone's save it replaced is kept on the Mac (%s)", back);

printf("(15) the report a front end reads before it plays\n");
char R1[1200], R2[1200], cloud4[1200], cf4[1400], own4[1400], line[2048];
snprintf(R1, sizeof R1, "%s/mac6/save", root); snprintf(R2, sizeof R2, "%s/iphone4/save", root);
snprintf(cloud4, sizeof cloud4, "%s/iCloud Drive/Fourth Saves", root); snprintf(own4, sizeof own4, "%s/%s", cloud4, id);
mkd(R1); mkd(R2); mkd(cloud4); snprintf(cf4, sizeof cf4, "%s/%s/save.dmsync", cloud4, id);
#define REPORT(save, folder) (!save_sync_report(save, DM_GAME_ID, folder, 0, line, sizeof line) && !strchr(line, '\n'))
CHECK(!strcmp(dm_save_title(), DM_GAME_ID), "the title the iPhone launcher names the cloud file with is the profile's");
CHECK(REPORT(R1, cloud4) && strstr(line, "sync=1 cloud=0 ") && strstr(line, "local=- ") && strstr(line, "conflict=0"),
"no save here, none in the cloud: no conflict, nothing to replace (%s)", line);
snprintf(p, sizeof p, "%s/game.dat", R1); put(p, "r1-with-progress");
CHECK(REPORT(R1, cloud4) && strstr(line, "files=1 size=16 ") && strstr(line, "chash=- ") && strstr(line, "conflict=0"),
"a save here, the cloud's empty: no conflict, the mount sends it (%s)", line);
CHECK(session(R1, cloud4, NULL, NULL) == 0 && cloud_has(cf4, root, "game.dat", "r1-with-progress"), "the session sends it");
CHECK(REPORT(R1, cloud4) && strstr(line, "cloud=1 ") && strstr(line, "csize=16 ") && strstr(line, "sametitle=1 ") && strstr(line, "conflict=0") && !strstr(line, "cdevice=- "),
"the same save here and in the cloud: no conflict, the cloud's device named (%s)", line);
CHECK(REPORT(R1, own4) && strstr(line, "cloud=1 ") && strstr(line, "csize=16 "),
"the game's own folder chosen as the folder: the same file as the mount's (%s)", line);
snprintf(p, sizeof p, "%s/game.dat", R2);
CHECK(REPORT(R2, cloud4) && strstr(line, "local=- ") && strstr(line, "cfiles=1 ") && strstr(line, "conflict=0"),
"the cloud has one and this device none: it comes in, no conflict (%s)", line);
CHECK(session(R2, cloud4, NULL, NULL) == 0 && same(p, "r1-with-progress"), "and the session brings it in");
CHECK(session(R2, NULL, "game.dat", "r2") == 0 && same(p, "r2"), "the iPhone plays with sync off and saves r2");
set_mtime(p, time(NULL) - 100);
CHECK(session(R1, cloud4, "game.dat", "r3-more-progress") == 0 && cloud_has(cf4, root, "game.dat", "r3-more-progress"), "then the Mac saves more and sends it");
snprintf(p, sizeof p, "%s/game.dat", R2); put(p, "new"); set_mtime(p, time(NULL) + 45);
CHECK(REPORT(R2, cloud4) && strstr(line, "conflict=1") && strstr(line, "cfiles=1 ") && strstr(line, "cdevice=Mac"),
"both changed: the report says conflict, with the cloud's device (%s)", line);
{ // the incident of the PR: the new game's save is the newer by date, so the player needs the sizes to tell them apart
char *cs = strstr(line, "csaved="), *sv = strstr(line, " saved=");
CHECK(cs && sv && atoll(sv + 7) > atoll(cs + 7) && strstr(line, " size=3 ") && strstr(line, "csize=16 "),
"this device's date is the newer, its save the smaller (%s)", line);
}
chmod(cf4, 0);
CHECK(REPORT(R2, cloud4) && strstr(line, "cloud=-1 ") && strstr(line, "chash=- ") && strstr(line, "conflict=0"),
"the cloud cannot be read: said so, and no conflict to offer (%s)", line);
chmod(cf4, 0644);
CHECK(REPORT(R2, "0") && strstr(line, "sync=0 cloud=0 ") && !strstr(line, "local=- ") && strstr(line, "conflict=0"),
"sync off: the local save alone is reported (%s)", line);
setenv("DM_SAVE_SYNC", cloud4, 1);
CHECK(REPORT(R2, NULL) && strstr(line, "conflict=1"), "no folder given: DM_SAVE_SYNC's, as the mount reads it (%s)", line);
unsetenv("DM_SAVE_SYNC");
CHECK(REPORT(R2, NULL) && strstr(line, "sync=0 "), "and with no DM_SAVE_SYNC, sync is off (%s)", line);
snprintf(q, sizeof q, "%s.sync-tmp", R2);
CHECK(access(q, F_OK), "the reports leave no files behind");
#undef REPORT

printf("== save sync: %d checks, %d failed ==\n", checks, fails);
if (!fails) { char c[1200]; snprintf(c, sizeof c, "rm -rf '%s'", root); system(c); }
return fails != 0;
Expand Down
3 changes: 2 additions & 1 deletion dm/ios/Sources/DmIOS-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// The Objective-C functions Launcher.swift and GameMenu.swift call (CloudSaves.h, DmGameMenu.h). project.yml points SWIFT_OBJC_BRIDGING_HEADER here.
// The C and Objective-C functions Launcher.swift and GameMenu.swift call (CloudSaves.h, DmGameMenu.h, save_sync.h's report before Play). project.yml points SWIFT_OBJC_BRIDGING_HEADER here.
#import "CloudSaves.h"
#import "DmGameMenu.h"
#include "save_sync.h"
Loading