[mupen64plus] 149/262: Set video width and status during savestate load
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:59:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus.
commit c9f1d0faf249b8df5ea7e45015cdf73077dd88c0
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date: Sat Oct 3 19:11:28 2009 +0200
Set video width and status during savestate load
Not setting status and width for video plugins could result in corrupted
output in some programs.
---
debian/changelog | 1 +
debian/patches/load_vistatus.patch | 135 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 137 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 98fbe0f..bf29879 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ mupen64plus (1.5+dfsg1-6) UNRELEASED; urgency=low
correct_fpr32_mapping.patch
- Add load_aidacrate.patch, Set aiDacrate during savestate load to fix
slowdowns after savestate load
+ - Add load_vistatus.patch, Set video width and status during savestate load
-- Sven Eckelmann <sven.eckelmann at gmx.de> Sat, 03 Oct 2009 00:36:41 +0200
diff --git a/debian/patches/load_vistatus.patch b/debian/patches/load_vistatus.patch
new file mode 100644
index 0000000..6cc587c
--- /dev/null
+++ b/debian/patches/load_vistatus.patch
@@ -0,0 +1,135 @@
+Description: Set video width and status during savestate load
+ Not setting status and width for video plugins could result in corrupted output
+ in some programs.
+Bug: http://code.google.com/p/mupen64plus/issues/detail?id=169
+Author: Sven Eckelmann <sven.eckelmann at gmx.de>
+
+---
+diff --git a/main/savestates.c b/main/savestates.c
+index 016b6ca62493e774931cca6f57e1e5b29e1c2a77..7601288d70b42c3346bef6d1150e20d0acb698d3 100644
+--- a/main/savestates.c
++++ b/main/savestates.c
+@@ -280,6 +280,8 @@ void savestates_load()
+ gzread(f, &rsp_register, sizeof(RSP_register));
+ gzread(f, &si_register, sizeof(SI_register));
+ gzread(f, &vi_register, sizeof(VI_register));
++ update_vi_status(vi_register.vi_status);
++ update_vi_width(vi_register.vi_width);
+ gzread(f, &ri_register, sizeof(RI_register));
+ gzread(f, &ai_register, sizeof(AI_register));
+ update_ai_dacrate(ai_register.ai_dacrate);
+diff --git a/memory/memory.c b/memory/memory.c
+index 7d090cabebd687e39db5fedc167f8992bbbcdbdf..a843a49d370d12107e5624f247180a808666f69a 100644
+--- a/memory/memory.c
++++ b/memory/memory.c
+@@ -2495,16 +2495,14 @@ void write_vi()
+ case 0x0:
+ if (vi_register.vi_status != word)
+ {
+- vi_register.vi_status = word;
+- viStatusChanged();
++ update_vi_status(word);
+ }
+ return;
+ break;
+ case 0x8:
+ if (vi_register.vi_width != word)
+ {
+- vi_register.vi_width = word;
+- viWidthChanged();
++ update_vi_width(word);
+ }
+ return;
+ break;
+@@ -2517,6 +2515,18 @@ void write_vi()
+ *readvi[*address_low] = word;
+ }
+
++void update_vi_status(unsigned int word)
++{
++ vi_register.vi_status = word;
++ viStatusChanged();
++}
++
++void update_vi_width(unsigned int word)
++{
++ vi_register.vi_width = word;
++ viWidthChanged();
++}
++
+ void write_vib()
+ {
+ int temp;
+@@ -2531,8 +2541,7 @@ void write_vib()
+ + ((*address_low&3)^S8) ) = byte;
+ if (vi_register.vi_status != temp)
+ {
+- vi_register.vi_status = temp;
+- viStatusChanged();
++ update_vi_status(temp);
+ }
+ return;
+ break;
+@@ -2545,8 +2554,7 @@ void write_vib()
+ + ((*address_low&3)^S8) ) = byte;
+ if (vi_register.vi_width != temp)
+ {
+- vi_register.vi_width = temp;
+- viWidthChanged();
++ update_vi_width(temp);
+ }
+ return;
+ break;
+@@ -2575,8 +2583,7 @@ void write_vih()
+ + ((*address_low&3)^S16) )) = hword;
+ if (vi_register.vi_status != temp)
+ {
+- vi_register.vi_status = temp;
+- viStatusChanged();
++ update_vi_status(temp);
+ }
+ return;
+ break;
+@@ -2587,8 +2594,7 @@ void write_vih()
+ + ((*address_low&3)^S16) )) = hword;
+ if (vi_register.vi_width != temp)
+ {
+- vi_register.vi_width = temp;
+- viWidthChanged();
++ update_vi_width(temp);
+ }
+ return;
+ break;
+@@ -2610,8 +2616,7 @@ void write_vid()
+ case 0x0:
+ if (vi_register.vi_status != dword >> 32)
+ {
+- vi_register.vi_status = dword >> 32;
+- viStatusChanged();
++ update_vi_status(dword >> 32);
+ }
+ vi_register.vi_origin = dword & 0xFFFFFFFF;
+ return;
+@@ -2619,8 +2624,7 @@ void write_vid()
+ case 0x8:
+ if (vi_register.vi_width != dword >> 32)
+ {
+- vi_register.vi_width = dword >> 32;
+- viWidthChanged();
++ update_vi_width(dword >> 32);
+ }
+ vi_register.vi_v_intr = dword & 0xFFFFFFFF;
+ return;
+diff --git a/memory/memory.h b/memory/memory.h
+index e3f5d3359466f90b375d7d662d0d0bb46e2a6d3c..ab0eeb2ba05e5cde953d4e5419cfa688e1815211 100644
+--- a/memory/memory.h
++++ b/memory/memory.h
+@@ -423,6 +423,8 @@ void write_pifd();
+ void update_SP();
+ void update_DPC();
+ void update_ai_dacrate(unsigned int word);
++void update_vi_status(unsigned int word);
++void update_vi_width(unsigned int word);
+
+ #endif
+
diff --git a/debian/patches/series b/debian/patches/series
index e787cb8..ecb467e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,4 @@ rice_nodebug.patch
interpreter_x86_fldcw.patch
correct_fpr32_mapping.patch
load_aidacrate.patch
+load_vistatus.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus.git
More information about the Pkg-games-commits
mailing list