diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-11-18 09:38:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-11-18 09:38:27 +0000 |
commit | 536c3711867ec947c1738f2c4b96f22e4863322d (patch) | |
tree | 697733f5cb713908dcf378e13fd15a798a906a91 /games-emulation/vbam/files | |
parent | f65628136faa35d0c4d3b5e7332275c7b35fcd96 (diff) |
gentoo resync : 18.11.2018
Diffstat (limited to 'games-emulation/vbam/files')
-rw-r--r-- | games-emulation/vbam/files/vbam-2.1.0-performance_fixup.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/games-emulation/vbam/files/vbam-2.1.0-performance_fixup.patch b/games-emulation/vbam/files/vbam-2.1.0-performance_fixup.patch new file mode 100644 index 000000000000..c99f829bdc08 --- /dev/null +++ b/games-emulation/vbam/files/vbam-2.1.0-performance_fixup.patch @@ -0,0 +1,43 @@ +From a8d0508cf299a58b2a659d6017b049db121de8ba Mon Sep 17 00:00:00 2001 +From: Rafael Kitover <rkitover@gmail.com> +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 |