use /proc/cpuinfo instead of the retarded Sharpism /proc/devinfo/. Patch courtesy...
authorMichael Lauer <mickey@vanille-media.de>
Mon, 1 Nov 2004 15:15:30 +0000 (15:15 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Mon, 1 Nov 2004 15:15:30 +0000 (15:15 +0000)
BKrev: 41865312MFaCbgNosgvgSp4LVS-4Lg

libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch
libsdl/libsdl-qpe_1.2.7.oe

index cad1686..7d2c0d9 100644 (file)
  
  
    static int QT_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen)
-@@ -276,47 +398,433 @@
+@@ -276,47 +398,428 @@
      return -1;
    }
  
 +  {
 +    FILE *fp;
 +    machine_t machine = MACHINE_SHARP_SL5000D;
-+    char buf[512];
++    char buf[1024];
 +
-+    fp = fopen("/proc/deviceinfo/product", "rb");
++
++    fp = fopen("/proc/cpuinfo", "rb");
 +    if (fp) {
 +      if (fread(buf, 1, sizeof(buf), fp) > 0) {
-+//        LOG("QT_GetMachine: /proc/deviceinfo/product is %s\n", buf);
-+        if (strncmp(buf, "SL-A300", 7) == 0)
-+          machine = MACHINE_SHARP_SLA300;
-+        else if (strncmp(buf, "SL-5500", 7) == 0)
-+          machine = MACHINE_SHARP_SL5500;
-+        else if (strncmp(buf, "SL-6000", 7) == 0) // ¾Ü¤·¤¤¤³¤È¤ï¤«¤é¤ó¤±¤É¤È¤ê¤¢¤¨¤º
++        LOG("QT_GetMachine: /proc/cpuinfo is %s\n", buf);
++        if (strstr(buf, "SHARP Tosa") != NULL)  
 +          machine = MACHINE_SHARP_SL6000;
-+        else if (strncmp(buf, "SL-B500", 7) == 0)
++        else if (strstr(buf, "Collie") != NULL)
++          machine = MACHINE_SHARP_SL5500;
++        else if (strstr(buf, "SHARP Poodle") != NULL)
 +          machine = MACHINE_SHARP_SLB500;
-+        else if (strncmp(buf, "SL-C700", 7) == 0)
++        else if (strstr(buf, "SHARP Corgi") !=NULL)
 +          machine = MACHINE_SHARP_SLC700;
-+        else if (strncmp(buf, "SL-C750", 7) == 0)
++        else if (strstr(buf, "SHARP Shepherd") !=NULL)
 +          machine = MACHINE_SHARP_SLC750;
-+        else if (strncmp(buf, "SL-C760", 7) == 0)
++        else if (strstr(buf, "SHARP Husky") !=NULL)
 +          machine = MACHINE_SHARP_SLC760;
-+        else if (strncmp(buf, "SL-C860", 7) == 0) // ¾Ü¤·¤¤¤³¤È¤ï¤«¤é¤ó¤±¤É¤È¤ê¤¢¤¨¤º
++        else if (strstr(buf, "SHARP Boxer") != NULL)
 +          machine = MACHINE_SHARP_SLC860;
-+        else if (strncmp(buf, "SL-C860", 7) == 0)
-+          machine = MACHINE_SHARP_SLC860;
-+        else if (strncmp(buf, "SL-6000", 7) == 0)
-+          machine = MACHINE_SHARP_SL6000;
 +      }
 +      fclose(fp);
 +    } else {
index 28b42d0..b53abfd 100644 (file)
@@ -4,6 +4,7 @@ PRIORITY = "optional"
 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
 DEPENDS = "virtual/libqpe"
 PROVIDES = "virtual/libsdl"
+PR = "r1"
 
 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
            file://agawa-piro-mickey.patch;patch=1 \