savestate and other bugfixes
[fceu.git] / drivers / gp2x / main.c
index 21cdea5..ac48a2d 100644 (file)
@@ -452,7 +452,7 @@ static int DriverInitialize(void)
 static void DriverKill(void)
 {
  // SaveConfig(NULL); // done explicitly in menu now
- SetSignals(SIG_IGN);
+ SetSignals(SIG_DFL);
 
  if(cpalette) free(cpalette);
  cpalette=0;
@@ -466,11 +466,13 @@ static void DriverKill(void)
 
 void FCEUD_Update(uint8 *xbuf, int16 *Buffer, int Count)
 {
- if(!Count && !(eoptions&EO_NOTHROTTLE))
+ if(!(eoptions&EO_NOTHROTTLE))
+ {
+  if(Count)
+   WriteSound(Buffer,Count);
   SpeedThrottle();
+ }
+ FCEUD_UpdateInput();  // must update input before blitting because of save confirmation stuff
  BlitScreen(xbuf);
- if(Count && !(eoptions&EO_NOTHROTTLE))
-  WriteSound(Buffer,Count);
- FCEUD_UpdateInput();
 }