mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 15:30:29 +02:00
Reorder vfpu data in saved kernel contexts when loading in a new version.
This commit is contained in:
1 parent
55500d4bb6
commit
f9f6e9492d
3 files changed
+37
-9
No files matched your search
@@ -520,7 +520,7 @@ public:
|
||||
|
||||
virtual void DoState(PointerWrap &p)
|
||||
{
|
||||
auto s = p.Section("Thread", 1, 3);
|
||||
auto s = p.Section("Thread", 1, 4);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
@@ -533,6 +533,18 @@ public:
|
||||
|
||||
// TODO: How do I "version" adding a DoState method to ThreadContext?
|
||||
p.Do(context);
|
||||
|
||||
if (s <= 3)
|
||||
{
|
||||
// We must have been loading an old state if we're here.
|
||||
// Reorder VFPU data to new order.
|
||||
float temp[128];
|
||||
memcpy(temp, context.v, 128 * sizeof(float));
|
||||
for (int i = 0; i < 128; i++) {
|
||||
context.v[voffset[i]] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (s <= 2)
|
||||
{
|
||||
context.other[4] = context.other[5];
|
||||
|
||||
Reference in new issue
Block a user