summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-10 14:54:25 -0500
committerGitHub <noreply@github.com>2025-12-10 21:54:25 +0200
commit50f08761946ace305dfe00645cfd9b624753b26c (patch)
tree2879a56b1ba4c1c8670d8b2b7b7eda3a01c4078b /src
parent63d902bc89f237bb80529ffa78e5f3a6d612a977 (diff)
Fakematch JASTrack::TList::seqMain (#2940)
* Fakematch JASTrack::TList::seqMain * Add debug ifdef
Diffstat (limited to 'src')
-rw-r--r--src/JSystem/JAudio2/JASTrack.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/JSystem/JAudio2/JASTrack.cpp b/src/JSystem/JAudio2/JASTrack.cpp
index 2d2e422c82..6f557f38e3 100644
--- a/src/JSystem/JAudio2/JASTrack.cpp
+++ b/src/JSystem/JAudio2/JASTrack.cpp
@@ -728,8 +728,8 @@ void JASTrack::TList::append(JASTrack* i_track) {
Push_back(i_track);
}
-// NONMATCHING - missing load instruction (matches debug, equivalent)
void JASTrack::TList::seqMain() {
+#if DEBUG
iterator it, it2;
for (it = begin(); it != end(); it = it2) {
it2 = it;
@@ -742,6 +742,25 @@ void JASTrack::TList::seqMain() {
}
}
}
+#else
+ iterator it;
+ for (it = begin(); it != end();) {
+ // Fakematch: Debug shows that it2 should be declared outside the loop and then this line
+ // should use operator=, but that results in a missing load instruction for retail, so we
+ // use the copy constructor instead of the assignment operator, which fixes it for some
+ // reason. Might be related to the fakematch in the assignment operator?
+ iterator it2 = it;
+ ++it2;
+ int seqMainRes = it->seqMain();
+ if (seqMainRes < 0) {
+ Remove(&*it);
+ if (it->mFlags.autoDelete) {
+ delete &*it;
+ }
+ }
+ it = it2;
+ }
+#endif
}
JASTrack::TChannelMgr::TChannelMgr(JASTrack* i_track) : mSoundParams(NULL), mTrack(i_track) {