fix compiler flags, shader, music playing, etc

This commit is contained in:
Ralty
2026-03-01 20:21:21 +07:00
parent d922e6112f
commit 5671b87e05
3 changed files with 10 additions and 16 deletions
@@ -62,14 +62,18 @@ class FunkinShader extends FlxShader implements IHScriptCustomBehaviour {
private static function _processGLSLText(source:String, glVersion:String, isFragment:Bool, ?pragmas:Map<String, String>):String {
var injectedFragColor = StringTools.contains(source, "out vec4"), canInjectFragColorFix = switch (glVersion) {
case "300 es", "330", "400", "410", "420", "430", "440", "450", "460": isFragment;
case "300 es", "310 es", "320 es", "330", "400", "410", "420", "430", "440", "450", "460": isFragment;
default: false;
};
if (pragmas != null) {
final pragmaKeyword = ~/#pragma (\w+)/g;
source = pragmaKeyword.map(source, (_) -> {
var name = pragmaKeyword.matched(1);
if (!pragmas.exists(name)) return '#pragma $name';
var name = pragmaKeyword.matched(1), pragma:String;
if (pragmas.exists(name)) pragma = pragmas.get(name);
else {
if (name != "header" && name != "body") return '#pragma $name';
pragma = "";
}
var pragma = pragmas.get(name);
if (name == "header" && canInjectFragColorFix && !injectedFragColor) {
-10
View File
@@ -1231,11 +1231,6 @@ class PlayState extends MusicBeatState
@:dox(hide)
override public function onFocus():Void
{
if (!paused && FlxG.autoPause) {
for (strumLine in strumLines.members) strumLine.vocals.resume();
inst.resume();
vocals.resume();
}
gameAndCharsCall("onFocus");
updateDiscordPresence();
super.onFocus();
@@ -1244,11 +1239,6 @@ class PlayState extends MusicBeatState
@:dox(hide)
override public function onFocusLost():Void
{
if (!paused && FlxG.autoPause) {
for (strumLine in strumLines.members) strumLine.vocals.pause();
inst.pause();
vocals.pause();
}
gameAndCharsCall("onFocusLost");
updateDiscordPresence();
super.onFocusLost();