Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

DataBookmark.m compiles as Objective-C: no declaration inside an if

v0lumehi761892c5fda1
diff --git a/dm/ios/Sources/DataBookmark.m b/dm/ios/Sources/DataBookmark.m
index d8cf0563..3dcc3834 100644
--- a/dm/ios/Sources/DataBookmark.m
+++ b/dm/ios/Sources/DataBookmark.m
@@ -48,7 +48,8 @@ NSString *dm_picked_data_path(BOOL *stale) {
if (isStale) {
// The system still resolves it but asks for a rewrite (its own wording: stale). Same
// signature, so a fresh bookmark sticks: self-heal instead of making the player pick again.
- if (NSData *again = fresh_bookmark(url)) [NSUserDefaults.standardUserDefaults setObject:again forKey:kPickedData];
+ NSData *again = fresh_bookmark(url);
+ if (again) [NSUserDefaults.standardUserDefaults setObject:again forKey:kPickedData];
if (stale) *stale = YES;
}
// The picker can hand back a file that was moved or deleted since. The caller checks what it