Skip to content

Commit

Permalink
update the crash handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolka9144 committed Oct 31, 2024
1 parent 6e7cf2f commit 35cbd8f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions source/mikolka/vslice/CrashState.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package mikolka.vslice;

import mikolka.compatibility.VsliceOptions;
import mikolka.compatibility.ModsHelper;
import flixel.FlxState;
#if !LEGACY_PSYCH
import states.TitleState;
#end
import openfl.events.ErrorEvent;
import openfl.display.BitmapData;
// crash handler stuff
Expand Down Expand Up @@ -36,7 +39,8 @@ class CrashState extends FlxState
super.create();
var previousScreen = new FlxSprite(0, 0, screenBelow);
previousScreen.setGraphicSize(FlxG.width,FlxG.height);

previousScreen.updateHitbox();

textBg = new FlxSprite();
FunkinTools.makeSolidColor(textBg, Math.floor(FlxG.width * 0.73), FlxG.height, 0x86000000);
textBg.screenCenter();
Expand Down Expand Up @@ -101,11 +105,15 @@ class CrashState extends FlxState
{
TitleState.initialized = false;
TitleState.closedState = false;
if (Main.fpsVar != null)
Main.fpsVar.visible = ClientPrefs.data.showFPS;
if (Main.memoryCounter != null)
Main.memoryCounter.visible = ClientPrefs.data.showFPS;
FlxG.sound.music = null;
#if LEGACY_PSYCH
if (Main.fpsVar != null) Main.fpsVar.visible = ClientPrefs.showFPS;
if (Main.memoryCounter != null) Main.memoryCounter.visible = ClientPrefs.showFPS;
#else
if (Main.fpsVar != null) Main.fpsVar.visible = ClientPrefs.data.showFPS;
if (Main.memoryCounter != null) Main.memoryCounter.visible = ClientPrefs.data.showFPS;
#end
FlxG.sound.pause();
FlxTween.globalManager.clear();
FlxG.resetGame();
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/states/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import options.OptionsState;
class MainMenuState extends MusicBeatState
{
public static var psychEngineVersion:String = '1.0'; // This is also used for Discord RPC
public static var pSliceVersion:String = '2.0';
public static var pSliceVersion:String = '2.0.1';
public static var funkinVersion:String = '0.5.1'; // Version of funkin' we are emulationg
public static var curSelected:Int = 0;

Expand Down

0 comments on commit 35cbd8f

Please sign in to comment.