From 228dba00c012e2d86c31bc97aee1640dd66ae804 Mon Sep 17 00:00:00 2001 From: c08oprkiua <85906487+c08oprkiua@users.noreply.github.com> Date: Wed, 24 Apr 2024 01:09:01 -0600 Subject: [PATCH] Fixed Windows dependency in core Now it should behave the same as before, but can now be compiled on platforms that aren't Windows --- core/io/dir_access_hybrid.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/io/dir_access_hybrid.cpp b/core/io/dir_access_hybrid.cpp index 04e84bf9d941..cea399039021 100644 --- a/core/io/dir_access_hybrid.cpp +++ b/core/io/dir_access_hybrid.cpp @@ -1,6 +1,5 @@ #include "core/io/dir_access_hybrid.h" #include "core/io/file_access_pack.h" -#include "drivers/windows/dir_access_windows.h" Error DirAccessHybrid::list_dir_begin() { @@ -167,12 +166,12 @@ String DirAccessHybrid::get_filesystem_type() const { return dir_access_os->get_filesystem_type(); } -DirAccessHybrid::DirAccessHybrid() : - dir_access_os(memnew(DirAccessWindows)), - dir_access_pack(memnew(DirAccessPack)), - err_os(OK), - err_pack(OK), - cdir(false) { +DirAccessHybrid::DirAccessHybrid(){ + dir_access_os = DirAccess::create(AccessType::ACCESS_FILESYSTEM); + dir_access_pack = memnew(DirAccessPack); + err_os = OK; + err_pack = OK; + cdir = false; } DirAccessHybrid::~DirAccessHybrid() {