Own Apple storage paths in Apple platform state
This commit is contained in:
@@ -614,7 +614,7 @@ NSString* keyCodeToString(NSUInteger keyCode, NSUInteger mods)
|
|||||||
LOG("error creating settings path: %s", [[err localizedDescription] cStringUsingEncoding:NSASCIIStringEncoding]);
|
LOG("error creating settings path: %s", [[err localizedDescription] cStringUsingEncoding:NSASCIIStringEncoding]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pp::platform::legacy::set_legacy_storage_paths({
|
pp::platform::apple::set_legacy_apple_storage_paths({
|
||||||
data_path,
|
data_path,
|
||||||
data_path,
|
data_path,
|
||||||
recording_path,
|
recording_path,
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ std::recursive_mutex lock_mutex;
|
|||||||
LOG("error creating settings path: %s", [[err localizedDescription] cStringUsingEncoding:NSASCIIStringEncoding]);
|
LOG("error creating settings path: %s", [[err localizedDescription] cStringUsingEncoding:NSASCIIStringEncoding]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pp::platform::legacy::set_legacy_storage_paths({
|
pp::platform::apple::set_legacy_apple_storage_paths({
|
||||||
data_path,
|
data_path,
|
||||||
data_path,
|
data_path,
|
||||||
recording_path,
|
recording_path,
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ What is already real:
|
|||||||
- `pp_app_core`
|
- `pp_app_core`
|
||||||
|
|
||||||
Latest slice:
|
Latest slice:
|
||||||
|
- `src/platform_apple/apple_platform_state.cpp` no longer reads Apple storage
|
||||||
|
paths from `pp::platform::legacy::active_legacy_storage_paths()`;
|
||||||
|
Apple-owned retained state now carries that path bundle.
|
||||||
|
- `PanoPainter-OSX/main.cpp` and `PanoPainter/GameViewController.m` now seed
|
||||||
|
Apple-owned storage paths directly instead of writing them through the shared
|
||||||
|
legacy storage-path singleton.
|
||||||
- `src/platform_legacy/legacy_platform_state.*` now exposes an ownable Web
|
- `src/platform_legacy/legacy_platform_state.*` now exposes an ownable Web
|
||||||
platform-services entrypoint plus an explicit binding hook instead of only a
|
platform-services entrypoint plus an explicit binding hook instead of only a
|
||||||
retained fallback object.
|
retained fallback object.
|
||||||
|
|||||||
@@ -78,6 +78,11 @@ Completed, blocked, and superseded task history moved to
|
|||||||
the queue is now ordered by code movement instead.
|
the queue is now ordered by code movement instead.
|
||||||
|
|
||||||
Current slice:
|
Current slice:
|
||||||
|
- `src/platform_apple/apple_platform_state.cpp` now reads Apple storage paths
|
||||||
|
from Apple-owned retained state rather than the shared legacy storage-path
|
||||||
|
singleton.
|
||||||
|
- `PanoPainter-OSX/main.cpp` and `PanoPainter/GameViewController.m` now seed
|
||||||
|
Apple-owned storage paths directly.
|
||||||
- `src/platform_legacy/legacy_platform_state.*` now exposes
|
- `src/platform_legacy/legacy_platform_state.*` now exposes
|
||||||
`create_legacy_web_platform_services()` plus an explicit binding hook for the
|
`create_legacy_web_platform_services()` plus an explicit binding hook for the
|
||||||
retained Web service surface.
|
retained Web service surface.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ struct RetainedLegacyAppleState final {
|
|||||||
View* osx_view = nullptr;
|
View* osx_view = nullptr;
|
||||||
AppOSX* osx_app = nullptr;
|
AppOSX* osx_app = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
pp::platform::PlatformStoragePaths storage_paths;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AppleDocumentPickerBridge {
|
struct AppleDocumentPickerBridge {
|
||||||
@@ -98,6 +99,7 @@ private:
|
|||||||
[[nodiscard]] AppleDocumentPlatformServices&
|
[[nodiscard]] AppleDocumentPlatformServices&
|
||||||
active_legacy_apple_document_platform_services();
|
active_legacy_apple_document_platform_services();
|
||||||
[[nodiscard]] pp::platform::PlatformStoragePaths prepare_legacy_apple_storage_paths();
|
[[nodiscard]] pp::platform::PlatformStoragePaths prepare_legacy_apple_storage_paths();
|
||||||
|
void set_legacy_apple_storage_paths(pp::platform::PlatformStoragePaths paths);
|
||||||
void set_legacy_apple_state(
|
void set_legacy_apple_state(
|
||||||
#if defined(__OBJC__) && defined(__IOS__)
|
#if defined(__OBJC__) && defined(__IOS__)
|
||||||
GameViewController* ios_view,
|
GameViewController* ios_view,
|
||||||
|
|||||||
@@ -221,7 +221,12 @@ struct RetainedLegacyAppleDocumentPlatformState final {
|
|||||||
#elif defined(__OSX__)
|
#elif defined(__OSX__)
|
||||||
[apple_state.osx_app init_dirs];
|
[apple_state.osx_app init_dirs];
|
||||||
#endif
|
#endif
|
||||||
return pp::platform::legacy::active_legacy_storage_paths();
|
return apple_state.storage_paths;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_legacy_apple_storage_paths(pp::platform::PlatformStoragePaths paths)
|
||||||
|
{
|
||||||
|
active_legacy_apple_state().storage_paths = std::move(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_legacy_apple_state(
|
void set_legacy_apple_state(
|
||||||
|
|||||||
Reference in New Issue
Block a user