Skip to content

Commit 5671b87

Browse files
committed
fix compiler flags, shader, music playing, etc
1 parent d922e61 commit 5671b87

3 files changed

Lines changed: 10 additions & 16 deletions

File tree

project.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,17 +219,17 @@
219219

220220
<haxedef name="HXCPP_M32" if="32bit"/>
221221
<haxedef name="HXCPP_DEBUG_LINK" if="debug"/>
222-
<haxedef name="HXCPP_CPP20"/>
222+
<!--<haxedef name="HXCPP_CPP20"/>-->
223223
<!--<haxedef name="HXCPP_CLANG"/>-->
224224
<haxedef name="HXCPP_MSVC"/>
225225
<haxedef name="HXCPP_GC_BIG_BLOCKS"/>
226-
<haxedef name="HXCPP_GC_GENERATIONAL"/>
226+
<!--<haxedef name="HXCPP_GC_GENERATIONAL"/>-->
227227
<haxedef name="HXCPP_GC_DYNAMIC_SIZE"/>
228228
<haxedef name="HXCPP_CHECK_POINTER"/>
229229
<haxedef name="HXCPP_STACK_LINE"/>
230230
<haxedef name="HXCPP_STACK_TRACE"/>
231231
<haxedef name="HXCPP_CATCH_SEGV"/>
232-
<haxedef name="HXCPP_FAST_LINK"/>
232+
<!--<haxedef name="HXCPP_FAST_LINK"/>-->
233233
<!--<haxedef name="HXCPP_ALIGN_ALLOC"/>--> <!--hxcpp.h(71): warning C4005: 'HXCPP_ALIGN_ALLOC': macro redefinition-->
234234

235235
<haxedef name="analyzer-optimize" unless="debug"/>

source/funkin/backend/shaders/FunkinShader.hx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,18 @@ class FunkinShader extends FlxShader implements IHScriptCustomBehaviour {
6262

6363
private static function _processGLSLText(source:String, glVersion:String, isFragment:Bool, ?pragmas:Map<String, String>):String {
6464
var injectedFragColor = StringTools.contains(source, "out vec4"), canInjectFragColorFix = switch (glVersion) {
65-
case "300 es", "330", "400", "410", "420", "430", "440", "450", "460": isFragment;
65+
case "300 es", "310 es", "320 es", "330", "400", "410", "420", "430", "440", "450", "460": isFragment;
6666
default: false;
6767
};
6868
if (pragmas != null) {
6969
final pragmaKeyword = ~/#pragma (\w+)/g;
7070
source = pragmaKeyword.map(source, (_) -> {
71-
var name = pragmaKeyword.matched(1);
72-
if (!pragmas.exists(name)) return '#pragma $name';
71+
var name = pragmaKeyword.matched(1), pragma:String;
72+
if (pragmas.exists(name)) pragma = pragmas.get(name);
73+
else {
74+
if (name != "header" && name != "body") return '#pragma $name';
75+
pragma = "";
76+
}
7377

7478
var pragma = pragmas.get(name);
7579
if (name == "header" && canInjectFragColorFix && !injectedFragColor) {

source/funkin/game/PlayState.hx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,11 +1231,6 @@ class PlayState extends MusicBeatState
12311231
@:dox(hide)
12321232
override public function onFocus():Void
12331233
{
1234-
if (!paused && FlxG.autoPause) {
1235-
for (strumLine in strumLines.members) strumLine.vocals.resume();
1236-
inst.resume();
1237-
vocals.resume();
1238-
}
12391234
gameAndCharsCall("onFocus");
12401235
updateDiscordPresence();
12411236
super.onFocus();
@@ -1244,11 +1239,6 @@ class PlayState extends MusicBeatState
12441239
@:dox(hide)
12451240
override public function onFocusLost():Void
12461241
{
1247-
if (!paused && FlxG.autoPause) {
1248-
for (strumLine in strumLines.members) strumLine.vocals.pause();
1249-
inst.pause();
1250-
vocals.pause();
1251-
}
12521242
gameAndCharsCall("onFocusLost");
12531243
updateDiscordPresence();
12541244
super.onFocusLost();

0 commit comments

Comments
 (0)