summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-08-15 18:38:59 -0400
committerTim Foley <tfoleyNV@users.noreply.github.com>2019-08-15 15:38:59 -0700
commit77fe3dd74446fb07dd0de31114f7033f111ef868 (patch)
tree835044f955d4f2afc02894448864321fca3344df /source/slang/slang.cpp
parent44506607215247be4bf33c1a629bf39971bc966f (diff)
A more convoluted #pragma once file identity test, using relative paths. (#1021)
* A more convoluted #pragma once file identity test, using relative paths. * Fix bug with passing - to slang as a command line option causes a crash. Ability to set file-system to use on command line. #pragma once tests try with 'normal' and 'read-file' only versions * OSFileSystem -> OSFileSystemExt LoadFileOSFileSystem -> OSFileSystem Implemented OSFileSystem like OSFileSystemExt as as singleton. Fixes to comments.
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index f0570132f..eef0dff6f 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -2365,17 +2365,17 @@ void Linkage::setFileSystem(ISlangFileSystem* inFileSystem)
// Set the fileSystem
fileSystem = inFileSystem;
- // Set up fileSystemExt appropriately
+ // If nullptr passed in set up default
if (inFileSystem == nullptr)
{
- fileSystemExt = new Slang::CacheFileSystem(Slang::OSFileSystem::getSingleton());
+ fileSystemExt = new Slang::CacheFileSystem(Slang::OSFileSystemExt::getSingleton());
}
else
{
- // See if we have the interface
+ // See if we have the full ISlangFileSystemExt interface, if we do just use it
inFileSystem->queryInterface(IID_ISlangFileSystemExt, (void**)fileSystemExt.writeRef());
- // If not wrap with WrapFileSytem that keeps the old behavior
+ // If not wrap with CacheFileSystem that emulates ISlangFileSystemExt from the ISlangFileSystem interface
if (!fileSystemExt)
{
// Construct a wrapper to emulate the extended interface behavior