File tree Expand file tree Collapse file tree
osu.Game/Beatmaps/Formats Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "sdk" : {
33 "version" : " 8.0.100" ,
4- "rollForward" : " latestMajor " ,
4+ "rollForward" : " latestFeature " ,
55 "allowPrerelease" : false
66 }
77}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public VulkanRenderer()
1616 nativePtr = nVulkanCreate ( ) ;
1717 }
1818
19- public void Initialize ( Surface surface ) => nVulkanInit ( nativePtr , surface ) ;
19+ public void Initialize ( IntPtr surface ) => nVulkanInit ( nativePtr , surface ) ;
2020
2121 public void Render ( ) => nVulkanRender ( nativePtr ) ;
2222
@@ -47,7 +47,7 @@ protected virtual void Dispose(bool disposing)
4747 private static extern void nVulkanDestroy ( long ptr ) ;
4848
4949 [ DllImport ( "osu.Android.Native" ) ]
50- private static extern void nVulkanInit ( long ptr , Surface surface ) ;
50+ private static extern void nVulkanInit ( long ptr , IntPtr surface ) ;
5151
5252 [ DllImport ( "osu.Android.Native" ) ]
5353 private static extern void nVulkanRender ( long ptr ) ;
Original file line number Diff line number Diff line change @@ -384,29 +384,49 @@ private void decodeVariables(ref string line)
384384
385385 var sb = new StringBuilder ( ) ;
386386
387- for ( int i = 0 ; i < line . Length ; )
387+ for ( int i = 0 ; i < line . Length ; )
388388 {
389389 if ( line [ i ] == '$' )
390390 {
391391 i ++ ;
392- var variableName = new StringBuilder ( ) ;
392+ var variableNameBuilder = new StringBuilder ( ) ;
393+
393394 while ( i < line . Length && ! char . IsWhiteSpace ( line [ i ] ) && line [ i ] != ',' )
394395 {
395- variableName . Append ( line [ i ] ) ;
396+ variableNameBuilder . Append ( line [ i ] ) ;
396397 i ++ ;
397398 }
398399
399- if ( variables . TryGetValue ( '$' + variableName . ToString ( ) , out string value ) )
400- sb . Append ( value ) ;
401- else
402- sb . Append ( '$' + variableName . ToString ( ) ) ;
400+ string variableName = variableNameBuilder . ToString ( ) ;
401+ bool found = false ;
402+
403+ // Try to find the longest matching variable
404+ for ( int len = variableName . Length ; len > 0 ; len -- )
405+ {
406+ string potentialKey = string . Concat ( "$" , variableName . AsSpan ( 0 , len ) ) ;
407+
408+ if ( variables . TryGetValue ( potentialKey , out string ? value ) )
409+ {
410+ sb . Append ( value ) ;
411+ sb . Append ( variableName . AsSpan ( len ) ) ;
412+ found = true ;
413+ break ;
414+ }
415+ }
416+
417+ if ( ! found )
418+ {
419+ sb . Append ( '$' ) ;
420+ sb . Append ( variableName ) ;
421+ }
403422 }
404423 else
405424 {
406425 sb . Append ( line [ i ] ) ;
407426 i ++ ;
408427 }
409428 }
429+
410430 line = sb . ToString ( ) ;
411431 }
412432 }
You can’t perform that action at this time.
0 commit comments