[Rpcemu] Close icon

Alex Waugh alex at alexwaugh.com
Sun Sep 23 17:22:35 BST 2007


Hi,

Attached is a patch to make the close icon do something on Linux.


Alex

-- 
Alex Waugh                                           alex at alexwaugh.com

PHP, Roots, Subversion, WebJames and more from http://www.alexwaugh.com/
-------------- next part --------------
=== rpc-linux.c
==================================================================
--- rpc-linux.c	(revision 55)
+++ rpc-linux.c	(revision 56)
@@ -131,6 +131,12 @@
 	atexit(endblitthread);
 }
 
+void close_button_handler(void)
+{
+  quited = TRUE;
+}
+END_OF_FUNCTION(close_button_handler)
+
 int main (void) 
 {
         char s[128];
@@ -139,6 +145,9 @@
 //printf("Started!\n");
 mousehackon=1;
         allegro_init();
+
+	LOCK_FUNCTION(close_button_handler);
+	set_close_button_callback(close_button_handler);
 //printf("1\n");
 //set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,480,0,0);
 //printf("2a\n");


More information about the Rpcemu mailing list