summaryrefslogtreecommitdiff
path: root/pcr/mednaffe/remove-check_version.patch
blob: 1603ce524abdf7798cc7fbbb2ea4bcf90e6d3ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
diff -Nur a/src/mednaffe.c b/src/mednaffe.c
--- a/src/mednaffe.c	2015-07-24 11:31:59.000000000 -0300
+++ b/src/mednaffe.c	2015-08-06 18:06:20.813682795 -0300
@@ -550,16 +550,6 @@
     return 1;
   }
 
-  /* Check mednafen version */
-  if (!check_version(stout, &gui))
-   {
-    show_error(
-    "Error: Mednafen version is not compatible.\nYou need 0.9.36.2 \
-version or above.\n");
-    return 1; /* Items are not freed here */
-  }
-  g_free(stout);
-
   /* Read configuration from mednafen-09x.cfg */
   if (!read_cfg(&gui))
   {
diff -Nur a/src/toggles.c b/src/toggles.c
--- a/src/toggles.c	2015-07-24 11:31:59.000000000 -0300
+++ b/src/toggles.c	2015-08-06 18:05:09.429070095 -0300
@@ -376,56 +376,6 @@
   return cfg_path;
 }
 
-gboolean check_version(gchar *stout, guidata *gui)
-{
-  if (stout)
-  {
-    if (strlen(stout)<1) return FALSE;
-
-    gchar **achar = g_strsplit(stout, "\n", 0);
-    gchar **aline = g_strsplit(achar[0], " ", 2);
-
-    if (g_strv_length(aline)<2) return FALSE;
-    if (strlen(aline[1])<15) return FALSE;
-
-    if (aline[1][11]!='9')
-      return FALSE;
-    if (aline[1][13]-'0'<3)
-      return FALSE;
-    if ((aline[1][13]=='3') && ((aline[1][14]-'0')<6))
-      return FALSE;
-
-    if (strlen(aline[1])>16)
-    {
-      if ((aline[1][13]=='3') && (aline[1][14]=='6') && ((aline[1][16]-'0')<2))
-        return FALSE;
-    }
-    else
-    {
-    if ((aline[1][13]=='3') && ((aline[1][14]-'0')<7))
-      return FALSE;
-    }
-
-    print_log("Version detected: ", FE, gui);
-    print_log(aline[1], FE, gui);
-    #ifdef G_OS_UNIX
-      print_log("\n", FE, gui);
-    #endif
-    print_log("----\n", FE, gui);
-
-    GtkStatusbar *sbversion = GTK_STATUSBAR(gtk_builder_get_object(gui->builder, "sbversion"));
-    gtk_statusbar_push(GTK_STATUSBAR(sbversion), 1, aline[1]);
-
-    gtk_widget_set_tooltip_text(GTK_WIDGET(sbversion), gui->binpath);
-
-    g_strfreev(achar);
-    g_strfreev(aline);
-
-    return TRUE;
-  }
-  else return FALSE;
-}
-
 gboolean read_cfg(guidata *gui)
 {
   gchar *string;
diff -Nur a/src/toggles.h b/src/toggles.h
--- a/src/toggles.h	2015-07-24 11:31:59.000000000 -0300
+++ b/src/toggles.h	2015-08-06 18:04:52.252922723 -0300
@@ -29,7 +29,6 @@
   void set_spin(gpointer widget, guidata *gui);
   void set_values(GtkBuilder *builder, guidata *gui);
   gchar* get_cfg(const gchar *home, guidata *gui);
-  gboolean check_version(gchar *stout, guidata *gui);
   gboolean read_cfg(guidata *gui);
 
 #endif /* TOGGLES_H */