Skip to content

Commit

Permalink
Fixed Windows dependency in core
Browse files Browse the repository at this point in the history
Now it should behave the same as before, but can now be compiled on platforms that aren't Windows
  • Loading branch information
c08oprkiua authored and Sajidur78 committed Apr 24, 2024
1 parent 3a3a7c0 commit 228dba0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/io/dir_access_hybrid.cpp
Original file line number Diff line number Diff line change
@@ -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() {

Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 228dba0

Please sign in to comment.