Update macOS and Metal backends for the new changes
This commit is contained in:
parent
33636d78e1
commit
b20235a731
3 changed files with 6 additions and 6 deletions
|
@ -454,7 +454,7 @@ GFXPipeline* GFXMetal::create_graphics_pipeline(const GFXGraphicsPipelineCreateI
|
|||
} else {
|
||||
const auto vertex_path = info.shaders.vertex_src.as_path().string();
|
||||
|
||||
auto file = file::open(file::internal_domain / vertex_path);
|
||||
auto file = prism::open_file(prism::internal_domain / vertex_path);
|
||||
if(file != std::nullopt) {
|
||||
vertex_src = file->read_as_string();
|
||||
} else {
|
||||
|
@ -486,7 +486,7 @@ GFXPipeline* GFXMetal::create_graphics_pipeline(const GFXGraphicsPipelineCreateI
|
|||
} else {
|
||||
const auto fragment_path = info.shaders.fragment_src.as_path().string();
|
||||
|
||||
auto file = file::open(file::internal_domain / fragment_path);
|
||||
auto file = prism::open_file(prism::internal_domain / fragment_path);
|
||||
if(file != std::nullopt) {
|
||||
fragment_src = file->read_as_string();
|
||||
} else {
|
||||
|
@ -659,7 +659,7 @@ GFXPipeline* GFXMetal::create_compute_pipeline(const GFXComputePipelineCreateInf
|
|||
} else {
|
||||
const auto compute_path = info.compute_src.as_path().string();
|
||||
|
||||
auto file = file::open(file::internal_domain / compute_path);
|
||||
auto file = prism::open_file(prism::internal_domain / compute_path);
|
||||
if(file != std::nullopt) {
|
||||
compute_src = file->read_as_string();
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@ inline std::string clean_path(const std::string_view path) {
|
|||
return p;
|
||||
}
|
||||
|
||||
void file::set_domain_path(const Domain domain, const Path path) {
|
||||
void prism::set_domain_path(const prism::domain domain, const prism::path path) {
|
||||
NSBundle* bundle = [NSBundle mainBundle];
|
||||
NSString* resourceFolderPath = [bundle resourcePath];
|
||||
|
||||
|
@ -34,7 +34,7 @@ void file::set_domain_path(const Domain domain, const Path path) {
|
|||
domain_data[static_cast<int>(domain)] = clean_path([[[url absoluteURL] absoluteString] cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
}
|
||||
|
||||
file::Path file::get_writeable_directory() {
|
||||
prism::path prism::get_writeable_directory() {
|
||||
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString* resourceFolderPath = paths[0];
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ const std::map<ImGuiKey, InputButton> imToPl = {
|
|||
|
||||
CommonEditor::CommonEditor(std::string id) : id(id) {
|
||||
#ifdef PLATFORM_MACOS
|
||||
file::set_domain_path(file::domain::App, "../../../data");
|
||||
prism::set_domain_path(prism::domain::app, "../../../data");
|
||||
#else
|
||||
prism::set_domain_path(prism::domain::app, "data");
|
||||
#endif
|
||||
|
|
Reference in a new issue