From 5cab1880b5537ea42aadfa5c3a08808cbd0c2b3d Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 21 Sep 2021 02:54:41 -0300 Subject: [PATCH] Uses GetLogicalDrives() in Windows (file dialogs). Closes #183 --- internal/c/qbx.cpp | 8 ++++++++ source/ide/ide_methods.bas | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index 742c07e50..f92589362 100755 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -961,6 +961,14 @@ void call_setbits(uint32 bsize,ptrszint *array,ptrszint i,int64 val) { setbits(bsize,(uint8*)(*array),i,val); } +int32 logical_drives() { + #ifdef QB64_WINDOWS + return GetLogicalDrives(); + #else + return 0; + #endif +} + inline ptrszint array_check(uptrszint index,uptrszint limit){ //nb. forces signed index into an unsigned variable for quicker comparison if (index sep AND LEN(pathlist$) > 0 THEN pathlist$ = pathlist$ + sep - IF _DIREXISTS(CHR$(65 + i) + ":\") THEN + IF _READBIT(d, i) THEN pathlist$ = pathlist$ + CHR$(65 + i) + ":" END IF NEXT + idezpathlist$ = pathlist$ EXIT FUNCTION END IF