1
0
mirror of synced 2024-11-27 17:00:50 +01:00

BugFix/654 Fix dan-i dojo sub folder exit crash (#655)

* At least it'll stop crashing

* reset currently select song index to 0 upon exiting dan-i dojo
This commit is contained in:
Ashiro12138 2024-07-28 18:15:11 +10:00 committed by GitHub
parent f6904b1d30
commit 27f896ba01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using System.Drawing; using System;
using System.Drawing;
using FDK; using FDK;
using Silk.NET.Maths; using Silk.NET.Maths;
using static TJAPlayer3.CActSelect曲リスト; using static TJAPlayer3.CActSelect曲リスト;
@ -381,8 +382,8 @@ namespace TJAPlayer3 {
private void tDrawDanSelectedLevel(float Anime, int modifier = 0) { private void tDrawDanSelectedLevel(float Anime, int modifier = 0) {
int scroll = TJAPlayer3.Skin.Resolution[0] * modifier; int scroll = TJAPlayer3.Skin.Resolution[0] * modifier;
int currentSong = n現在の選択行 + modifier; int currentSong = Math.Clamp(n現在の選択行 + modifier, 0, stバー情報.Length - 1);
bool over4 = false; bool over4 = false;
switch (stバー情報[currentSong].eード種別) { switch (stバー情報[currentSong].eード種別) {
case CSongListNode.ENodeType.SCORE: { case CSongListNode.ENodeType.SCORE: {

View File

@ -204,6 +204,7 @@ namespace TJAPlayer3 {
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape) || if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.Escape) ||
TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.Cancel)) { TJAPlayer3.Pad.bPressed(EInstrumentPad.DRUMS, EPad.Cancel)) {
this..n現在の選択行 = 0;
return returnTitle(); return returnTitle();
} }
} }