summaryrefslogtreecommitdiff
path: root/pcr/reicast-git
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-06-20 03:05:03 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-06-20 03:05:03 -0300
commitefb2a3f8e3f012b9f92e4229e62ddf2f71373e9c (patch)
treef0a3698a1ef3b968d7d44c47f9a36a744e9bf450 /pcr/reicast-git
parentef58c7cbe12f66e239ad4795db471834682f6820 (diff)
reicast-git-r1200.a9fc0f5-3: wait if two frames already in flight
* this also disables involuntary frameskipping, even if the framerate is too low to sustain fullspeed -> https://github.com/reicast/reicast-emulator/issues/611
Diffstat (limited to 'pcr/reicast-git')
-rw-r--r--pcr/reicast-git/PKGBUILD9
-rw-r--r--pcr/reicast-git/wait_if_two_frames_already_in_flight.patch70
2 files changed, 76 insertions, 3 deletions
diff --git a/pcr/reicast-git/PKGBUILD b/pcr/reicast-git/PKGBUILD
index ab671fc2f..cfb00ed13 100644
--- a/pcr/reicast-git/PKGBUILD
+++ b/pcr/reicast-git/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=reicast-git
pkgver=r1200.a9fc0f5
-pkgrel=2
+pkgrel=3
pkgdesc="A multiplatform Sega Dreamcast emulator"
arch=('i686' 'x86_64')
url="http://reicast.com/"
@@ -18,9 +18,11 @@ depends_i686=('libgl' 'alsa-plugins')
optdepends=('xboxdrv: Userspace gamepad driver for Xbox and Xbox360 gamepads'
'antimicro: Graphical program used to map keyboard keys and mouse controls to gamepad buttons')
source=(reicast::"git+https://github.com/reicast/reicast-emulator.git"
- 'enable_joystick_support.patch')
+ 'enable_joystick_support.patch'
+ 'wait_if_two_frames_already_in_flight.patch')
sha256sums=('SKIP'
- 'e0f53e5834acb5978c2b9f55cbfb8586f9482ea0bab1eec4398d87608a9b264e')
+ 'e0f53e5834acb5978c2b9f55cbfb8586f9482ea0bab1eec4398d87608a9b264e'
+ 'f4d3b4ad7703da09dc59cae839ca225e1a21b89d905ede3519bf3174b40903da')
pkgver() {
cd reicast
@@ -30,6 +32,7 @@ pkgver() {
prepare () {
cd reicast
patch -Np1 -i "$srcdir"/enable_joystick_support.patch
+ patch -Np1 -i "$srcdir"/wait_if_two_frames_already_in_flight.patch
}
build () {
diff --git a/pcr/reicast-git/wait_if_two_frames_already_in_flight.patch b/pcr/reicast-git/wait_if_two_frames_already_in_flight.patch
new file mode 100644
index 000000000..ff297365c
--- /dev/null
+++ b/pcr/reicast-git/wait_if_two_frames_already_in_flight.patch
@@ -0,0 +1,70 @@
+diff -Nur reicast-emulator.orig/core/hw/pvr/Renderer_if.cpp reicast-emulator/core/hw/pvr/Renderer_if.cpp
+--- reicast-emulator.orig/core/hw/pvr/Renderer_if.cpp 2015-06-20 02:04:02.180069939 -0300
++++ reicast-emulator/core/hw/pvr/Renderer_if.cpp 2015-06-20 02:10:17.831402600 -0300
+@@ -184,6 +184,7 @@
+
+ bool rend_frame(TA_context* ctx, bool draw_osd) {
+ bool proc = renderer->Process(ctx);
++ FinishRender(_pvrrc);
+ re.Set();
+
+ bool do_swp = proc && renderer->Render();
+@@ -207,7 +208,7 @@
+ bool do_swp = rend_frame(_pvrrc, true);
+
+ //clear up & free data ..
+- FinishRender(_pvrrc);
++ tactx_Recycle(_pvrrc);
+ _pvrrc=0;
+
+ return do_swp;
+@@ -260,6 +261,7 @@
+
+
+ bool pend_rend = false;
++extern TA_context* rqueue;
+
+ void rend_resize(int width, int height) {
+ renderer->Resize(width, height);
+@@ -268,6 +270,10 @@
+
+ void rend_start_render()
+ {
++ if (rqueue) {
++ rend_end_render();
++ }
++
+ pend_rend = false;
+ bool is_rtt=(FB_W_SOF1& 0x1000000)!=0;
+ TA_context* ctx = tactx_Pop(CORE_CURRENT_CTX);
+@@ -314,7 +320,6 @@
+ }
+ }
+
+-
+ void rend_end_render()
+ {
+ #if 1 //also disabled the printf, it takes quite some time ...
+@@ -325,8 +330,9 @@
+ #endif
+ #endif
+
+- if (pend_rend)
++ if (pend_rend) {
+ re.Wait();
++ }
+ }
+
+ /*
+diff -Nur reicast-emulator.orig/core/hw/pvr/ta_ctx.cpp reicast-emulator/core/hw/pvr/ta_ctx.cpp
+--- reicast-emulator.orig/core/hw/pvr/ta_ctx.cpp 2015-06-20 02:04:02.186736275 -0300
++++ reicast-emulator/core/hw/pvr/ta_ctx.cpp 2015-06-20 02:07:44.202370584 -0300
+@@ -119,8 +119,6 @@
+ mtx_rqueue.Lock();
+ rqueue = 0;
+ mtx_rqueue.Unlock();
+-
+- tactx_Recycle(ctx);
+ }
+
+ cMutex mtx_pool;