67 lines
1.3 KiB
Text
67 lines
1.3 KiB
Text
$NetBSD: patch-as,v 1.2 2004/08/22 11:37:28 kristerw Exp $
|
|
|
|
--- src/gens/util/save.c.orig Tue May 18 22:33:59 2004
|
|
+++ src/gens/util/save.c Sun Aug 22 13:24:38 2004
|
|
@@ -101,8 +101,8 @@
|
|
|
|
if (filename)
|
|
{
|
|
- g_free (filename);
|
|
strcpy (Dest, filename);
|
|
+ g_free (filename);
|
|
return 1;
|
|
}
|
|
return 0;
|
|
@@ -130,8 +130,37 @@
|
|
|
|
if (filename)
|
|
{
|
|
+ strcpy (Dest, filename);
|
|
g_free (filename);
|
|
+ return 1;
|
|
+ }
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+int
|
|
+Change_File_L_MV (char *Dest, char *Dir)
|
|
+{
|
|
+
|
|
+ gchar *filename = NULL;
|
|
+ GtkWidget *widget;
|
|
+ gint res;
|
|
+ widget =
|
|
+ create_file_chooser_dialog ("Load gens movie file",
|
|
+ GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
+ addGmvFilter (widget);
|
|
+// fileselection_set_dir (fd.filesel, Rom_Dir);
|
|
+ /* addStateFilter (widget); */
|
|
+ res = gtk_dialog_run (GTK_DIALOG (widget));
|
|
+ if (res == GTK_RESPONSE_OK)
|
|
+ {
|
|
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
|
|
+ }
|
|
+ gtk_widget_destroy (widget);
|
|
+
|
|
+ if (filename)
|
|
+ {
|
|
strcpy (Dest, filename);
|
|
+ g_free (filename);
|
|
return 1;
|
|
}
|
|
return 0;
|
|
@@ -268,11 +297,12 @@
|
|
int
|
|
Save_State (char *Name)
|
|
{
|
|
- if (Name == NULL)
|
|
- return 0;
|
|
FILE *f;
|
|
unsigned char *buf;
|
|
int len;
|
|
+
|
|
+ if (Name == NULL)
|
|
+ return 0;
|
|
|
|
buf = State_Buffer;
|
|
if ((f = fopen (Name, "wb")) == NULL)
|