Parcourir la source

Fix shadow RAM affecting MME methods (#1168)

gdkchan il y a 6 ans
Parent
commit
10a2b9dca3
1 fichiers modifiés avec 12 ajouts et 8 suppressions
  1. 12 8
      Ryujinx.Graphics.Gpu/State/GpuState.cs

+ 12 - 8
Ryujinx.Graphics.Gpu/State/GpuState.cs

@@ -77,15 +77,19 @@ namespace Ryujinx.Graphics.Gpu.State
         {
             int value = meth.Argument;
 
-            // TODO: Figure out what TrackWithFilter does, compared to Track.
-            if (shadowCtrl == ShadowRamControl.Track ||
-                shadowCtrl == ShadowRamControl.TrackWithFilter)
+            // Methods < 0x80 shouldn't be affected by shadow RAM at all.
+            if (meth.Method >= 0x80)
             {
-                _shadow[meth.Method] = value;
-            }
-            else if (shadowCtrl == ShadowRamControl.Replay)
-            {
-                value = _shadow[meth.Method];
+                // TODO: Figure out what TrackWithFilter does, compared to Track.
+                if (shadowCtrl == ShadowRamControl.Track ||
+                    shadowCtrl == ShadowRamControl.TrackWithFilter)
+                {
+                    _shadow[meth.Method] = value;
+                }
+                else if (shadowCtrl == ShadowRamControl.Replay)
+                {
+                    value = _shadow[meth.Method];
+                }
             }
 
             Register register = _registers[meth.Method];