Author: duncan
Date: Mon Dec 18 08:19:34 2006
New Revision: 8738

Added:
   branches/rel-1/freevo/contrib/patches/zsnes-1.42-sdl-exit.patch
   branches/rel-1/freevo/contrib/patches/zsnes-1.50-sdl-exit.patch

Log:
[ 1591698 ] Zsnes doesn't save state by exit process.
Patches added for zsnes, thanks to Gorka Olaizola.


Added: branches/rel-1/freevo/contrib/patches/zsnes-1.42-sdl-exit.patch
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/contrib/patches/zsnes-1.42-sdl-exit.patch     Mon Dec 
18 08:19:34 2006
@@ -0,0 +1,28 @@
+diff -urNad zsnes-1.420~/src/linux/sdllink.c zsnes-1.420/src/linux/sdllink.c
+--- zsnes-1.420~/src/linux/sdllink.c   2006-12-14 21:34:42.000000000 +0100
++++ zsnes-1.420/src/linux/sdllink.c    2006-12-14 21:35:57.000000000 +0100
+@@ -177,7 +177,7 @@
+ 
+ int Main_Proc(void)
+ {
+-      SDL_Event event;
++      SDL_Event event, evtmp;
+ 
+       while (SDL_PollEvent(&event))
+       {
+@@ -384,7 +384,14 @@
+                               pressed[offset] = 0;
+                               break;
+                       case SDL_QUIT:
+-                              LinuxExit();
++
++                                evtmp.type = SDL_KEYDOWN;
++                                evtmp.key.state = SDL_PRESSED;
++                                evtmp.key.keysym.scancode = 9;
++                                evtmp.key.keysym.sym = SDLK_ESCAPE;
++                                evtmp.key.keysym.mod = 0;
++                                SDL_PushEvent(&evtmp);
++
+                               break;
+ #ifdef __OPENGL__
+                       case SDL_VIDEORESIZE:

Added: branches/rel-1/freevo/contrib/patches/zsnes-1.50-sdl-exit.patch
==============================================================================
--- (empty file)
+++ branches/rel-1/freevo/contrib/patches/zsnes-1.50-sdl-exit.patch     Mon Dec 
18 08:19:34 2006
@@ -0,0 +1,25 @@
+Index: src/linux/sdllink.c
+===================================================================
+--- src/linux/sdllink.c        (revision 4077)
++++ src/linux/sdllink.c        (working copy)
+@@ -428,9 +428,18 @@
+         if (offset >= (256 + 128 + 64)) break;
+         pressed[offset] = 0;
+         break;
+-      case SDL_QUIT:
+-        exit(0);
++
++      case SDL_QUIT: {
++          SDL_Event evtmp;
++          evtmp.type = SDL_KEYDOWN;
++          evtmp.key.state = SDL_PRESSED;
++          evtmp.key.keysym.scancode = 9;
++          evtmp.key.keysym.sym = SDLK_ESCAPE;
++          evtmp.key.keysym.mod = 0;
++          SDL_PushEvent(&evtmp);
++        }
+         break;
++
+ #ifdef __OPENGL__
+       case SDL_VIDEORESIZE:
+         if(!GUIRESIZE[cvidmode])

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to