summaryrefslogtreecommitdiff
path: root/games/yae/patches
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-12 00:28:03 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:43 +0700
commit8d93bcfabe35a584ae25540ef992a1be84ce0bd9 (patch)
tree4cfec592dff59ab517f15bb0f046f0bc6cb5b303 /games/yae/patches
parente1ae146a04df065d6f7746bc524e7bd0970266d9 (diff)
downloadslackbuilds-8d93bcfabe35a584ae25540ef992a1be84ce0bd9.tar.gz
games/yae: Fix audio, X close button.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/yae/patches')
-rw-r--r--games/yae/patches/allow_x_window_close.diff33
1 files changed, 33 insertions, 0 deletions
diff --git a/games/yae/patches/allow_x_window_close.diff b/games/yae/patches/allow_x_window_close.diff
new file mode 100644
index 0000000000..d596ce7b39
--- /dev/null
+++ b/games/yae/patches/allow_x_window_close.diff
@@ -0,0 +1,33 @@
+diff -Naur -Naur yae-0.7/x_window.c yae-0.7.patched/x_window.c
+--- yae-0.7/x_window.c 2007-04-03 17:47:59.000000000 -0400
++++ yae-0.7.patched/x_window.c 2021-10-12 00:23:48.765550342 -0400
+@@ -57,6 +57,8 @@
+
+ static Cursor InvisibleCursor;
+
++static Atom delete_atom;
++
+ Visual *getVisual( Display *dpy, int screen, int depth, int class )
+ {
+ XVisualInfo vinfo, *vinfoList;
+@@ -219,6 +221,9 @@
+ XFlush( dc->display );
+ #endif
+
++ delete_atom = XInternAtom(dc->display, "WM_DELETE_WINDOW", False);
++ XSetWMProtocols(dc->display, dc->window, &delete_atom, 1);
++
+ /*
+ * startup micro job for X window
+ */
+@@ -313,6 +318,10 @@
+ #endif
+ refreshScreen();
+ break;
++ case ClientMessage:
++ if(event.xclient.data.l[0] == delete_atom)
++ shutdown_6502();
++ break;
+ case DestroyNotify:
+ Signal6502( SIG_6502_SHUTDOWN );
+ break;