Skip to content

Commit 6214136

Browse files
committed
Fix Backward Compatibility with Shader
1 parent 6502b80 commit 6214136

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

source/funkin/backend/shaders/FunkinShader.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class FunkinShaderSourceAssembler extends FlxRuntimeShader.FlxShaderSourceAssemb
217217
return '/*include $key*/\n' + __appendIncludes(include, isVertex, includedKeys);
218218
});
219219

220-
return __getImportFinder().map(source, (regex:EReg) ->
220+
return __getImportCompatibilityFinder().map(source, (regex:EReg) ->
221221
{
222222
var key = regex.matched(1);
223223
if (includedKeys.get(key)) return '/*Recursive import $key*/\n';
@@ -261,8 +261,8 @@ class FunkinShaderSourceAssembler extends FlxRuntimeShader.FlxShaderSourceAssemb
261261
return result;
262262
}
263263

264-
private static inline function __getImportFinder():EReg {
265-
return ~/(?:^|\s)#import\s+(?|"([^"]+)"|'([^']+)'|([^\s]+))/g;
264+
private static inline function __getImportCompatibilityFinder():EReg {
265+
return ~/#import\s+(?|"([^"]+)"|'([^']+)'|<(.*)>|([^\s]+))/g;
266266
}
267267
}
268268

0 commit comments

Comments
 (0)