diff --git a/0001-use-GetWindow-Refresh-in-Wayland-only.patch b/0001-use-GetWindow-Refresh-in-Wayland-only.patch new file mode 100644 index 0000000..dcb7ddd --- /dev/null +++ b/0001-use-GetWindow-Refresh-in-Wayland-only.patch @@ -0,0 +1,46 @@ +From a8d0508cf299a58b2a659d6017b049db121de8ba Mon Sep 17 00:00:00 2001 +From: Rafael Kitover +Date: Mon, 2 Jul 2018 18:32:18 -0700 +Subject: [PATCH] use GetWindow()->Refresh() in Wayland only + +Some people are reporting stuttering, and @retro-wertz tested both +DrawArea() and Refresh() on wxgtk3 under xorg and found that the +Refresh() method produces more stuttering. + +Change the compile check for wxgtk2 to a runtime check for wayland, and +use Refresh() under Wayland only. +--- + src/wx/panel.cpp | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp +index e4b86301..faaf6e4d 100644 +--- a/src/wx/panel.cpp ++++ b/src/wx/panel.cpp +@@ -1817,19 +1817,16 @@ void DrawingPanelBase::DrawArea(uint8_t** data) + } + + // next, draw the frame (queue a PaintEv) Refresh must be used under +- // Wayland or nothing is drawn, however it causes high CPU usage with GTK2, +- // so use the old method in that case +-#if !defined(__WXGTK__) || defined(__WXGTK3__) +- GetWindow()->Refresh(); +-#else +- { ++ // Wayland or nothing is drawn. ++ if (wxGetApp().UsingWayland()) ++ GetWindow()->Refresh(); ++ else { + DrawingPanelBase* panel = wxGetApp().frame->GetPanel()->panel; + if (panel) { + wxClientDC dc(panel->GetWindow()); + panel->DrawArea(dc); + } + } +-#endif + + // finally, draw on-screen text using wx method, if possible + // this method flickers too much right now +-- +2.14.4 + diff --git a/sources b/sources index 99a6f45..baa01d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (visualboyadvance-m-2.1.0.tar.gz) = 9aafb8ef307fbbfbc5ae6dc35bc3042934e25a30069a71949e4c8e777fd862d94ec60c189823f4acdea4cb1338098fa85a55e090fa6023c07368cbb7638dd910 +SHA512 (visualboyadvance-m-2.1.0.tar.gz) = e4489c84880a7a70e7e94104ffbbdd805e9f15d5c962c0c13a7470496d2fdad8e21c1ddb161b776eb0b1a0c7583182df5838da5a523ce31dac620aa2a7842321 diff --git a/visualboyadvance-m.spec b/visualboyadvance-m.spec index 50c9d59..98f5bd3 100644 --- a/visualboyadvance-m.spec +++ b/visualboyadvance-m.spec @@ -2,20 +2,21 @@ %global shortname vbam #Upstream git tag/commit: -%global upstreamtag 2.0.2 +%global upstreamtag 2.1.0 #Sanitized RC name (for fedora) #global rctagfedora git78cd223 #RC Version that appears in app #global rcversion Beta3-07032017 Name: visualboyadvance-m -Version: 2.1.0 -Release: 1%{?rctagfedora:.%{rctagfedora}}%{?dist}.1 +Version: %{upstreamtag} +Release: 2%{?rctagfedora:.%{rctagfedora}}%{?dist} Summary: High compatibility Gameboy Advance Emulator combining VBA builds License: GPLv2 Url: http://www.vba-m.com Source0: https://github.com/%{name}/%{name}/archive/v%{upstreamtag}.tar.gz#/%{name}-%{version}%{?rctagfedora:-%{rctagfedora}}.tar.gz +Patch1: 0001-use-GetWindow-Refresh-in-Wayland-only.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cairo-devel @@ -103,6 +104,10 @@ appstream-util validate-relax --nonet \ %{_bindir}/%{shortname} %changelog + * Sat Sep 15 2018 Jeremy Newton - 2.1.0-2 +- Actually use 2.1.0 sources +- Add performance patch for xserver + * Sat Jul 14 2018 Fedora Release Engineering - 2.1.0-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild