Thin Windows entry, preview shell, and platform legacy state
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "platform_legacy/legacy_platform_services.h"
|
||||
#include "platform_legacy/legacy_platform_state.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "legacy_ui_gl_dispatch.h"
|
||||
@@ -131,25 +132,6 @@ struct RetainedLegacyGlfwWindowState final {
|
||||
}
|
||||
#endif
|
||||
|
||||
struct RetainedLegacyStoragePaths final {
|
||||
pp::platform::PlatformStoragePaths storage_paths;
|
||||
};
|
||||
|
||||
[[nodiscard]] RetainedLegacyStoragePaths& active_legacy_storage_paths()
|
||||
{
|
||||
static RetainedLegacyStoragePaths state = [] {
|
||||
RetainedLegacyStoragePaths retained;
|
||||
retained.storage_paths = {
|
||||
App::I->data_path,
|
||||
App::I->work_path,
|
||||
App::I->rec_path,
|
||||
App::I->tmp_path,
|
||||
};
|
||||
return retained;
|
||||
}();
|
||||
return state;
|
||||
}
|
||||
|
||||
#if defined(__IOS__) || defined(__OSX__)
|
||||
[[nodiscard]] NSMutableArray<NSString*>* apple_file_types_array(const std::vector<std::string>& file_types)
|
||||
{
|
||||
@@ -169,7 +151,6 @@ struct RetainedLegacyAppleState final {
|
||||
decltype(App::I->osx_view) osx_view = nullptr;
|
||||
decltype(App::I->osx_app) osx_app = nullptr;
|
||||
#endif
|
||||
pp::platform::PlatformStoragePaths storage_paths;
|
||||
};
|
||||
|
||||
[[nodiscard]] RetainedLegacyAppleState& active_legacy_apple_state()
|
||||
@@ -179,21 +160,9 @@ struct RetainedLegacyAppleState final {
|
||||
#ifdef __IOS__
|
||||
retained.ios_view = App::I->ios_view;
|
||||
retained.ios_app = App::I->ios_app;
|
||||
retained.storage_paths = {
|
||||
App::I->data_path,
|
||||
App::I->work_path,
|
||||
App::I->rec_path,
|
||||
App::I->tmp_path,
|
||||
};
|
||||
#elif defined(__OSX__)
|
||||
retained.osx_view = App::I->osx_view;
|
||||
retained.osx_app = App::I->osx_app;
|
||||
retained.storage_paths = {
|
||||
App::I->data_path,
|
||||
App::I->work_path,
|
||||
App::I->rec_path,
|
||||
App::I->tmp_path,
|
||||
};
|
||||
#endif
|
||||
return retained;
|
||||
}();
|
||||
@@ -208,7 +177,7 @@ struct RetainedLegacyAppleState final {
|
||||
#elif defined(__OSX__)
|
||||
[apple_state.osx_app init_dirs];
|
||||
#endif
|
||||
return apple_state.storage_paths;
|
||||
return active_legacy_storage_paths();
|
||||
}
|
||||
|
||||
[[nodiscard]] pp::platform::apple::AppleDocumentPlatformServices& active_apple_document_platform_services()
|
||||
@@ -406,7 +375,7 @@ public:
|
||||
{},
|
||||
};
|
||||
#else
|
||||
return active_legacy_storage_paths().storage_paths;
|
||||
return pp::platform::legacy::active_legacy_storage_paths();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user