Catalog native UI state platform policy
This commit is contained in:
@@ -43,6 +43,11 @@ bool platform_enables_live_asset_reloading(PlatformFamily family) noexcept
|
||||
return family == PlatformFamily::windows || family == PlatformFamily::macos;
|
||||
}
|
||||
|
||||
bool platform_saves_native_ui_state(PlatformFamily family) noexcept
|
||||
{
|
||||
return family == PlatformFamily::windows || family == PlatformFamily::macos;
|
||||
}
|
||||
|
||||
bool platform_supports_working_directory_picker(PlatformFamily family) noexcept
|
||||
{
|
||||
return family == PlatformFamily::windows || family == PlatformFamily::macos;
|
||||
|
||||
@@ -23,6 +23,7 @@ enum class PlatformFamily {
|
||||
[[nodiscard]] bool platform_publishes_exported_images(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_flushes_persistent_storage(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_enables_live_asset_reloading(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_saves_native_ui_state(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_supports_working_directory_picker(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_uses_prepared_file_writes(PlatformFamily family) noexcept;
|
||||
[[nodiscard]] bool platform_uses_work_directory_document_export_collections(PlatformFamily family) noexcept;
|
||||
|
||||
@@ -337,6 +337,8 @@ public:
|
||||
|
||||
void save_ui_state() override
|
||||
{
|
||||
if (!pp::platform::platform_saves_native_ui_state(pp::platform::current_platform_family()))
|
||||
return;
|
||||
#ifdef __OSX__
|
||||
[App::I->osx_app save_ui_state];
|
||||
#endif
|
||||
|
||||
@@ -405,6 +405,8 @@ public:
|
||||
|
||||
void save_ui_state() override
|
||||
{
|
||||
if (!pp::platform::platform_saves_native_ui_state(pp::platform::PlatformFamily::windows))
|
||||
return;
|
||||
win32_save_window_state();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user