From 39a0165261d3421d672226c3a0cf22829e93c260 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 1 Nov 2004 15:15:30 +0000 Subject: [PATCH] use /proc/cpuinfo instead of the retarded Sharpism /proc/devinfo/. Patch courtesy Grendel. It now can be enhanced to feature more model specifics. BKrev: 41865312MFaCbgNosgvgSp4LVS-4Lg --- .../libsdl-qpe-1.2.7/agawa-piro-mickey.patch | 31 ++++++++----------- libsdl/libsdl-qpe_1.2.7.oe | 1 + 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch b/libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch index cad168614d..7d2c0d922f 100644 --- a/libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch +++ b/libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch @@ -1072,7 +1072,7 @@ static int QT_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) -@@ -276,47 +398,433 @@ +@@ -276,47 +398,428 @@ return -1; } @@ -1080,32 +1080,27 @@ + { + 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 { diff --git a/libsdl/libsdl-qpe_1.2.7.oe b/libsdl/libsdl-qpe_1.2.7.oe index 28b42d0af8..b53abfddaf 100644 --- a/libsdl/libsdl-qpe_1.2.7.oe +++ b/libsdl/libsdl-qpe_1.2.7.oe @@ -4,6 +4,7 @@ PRIORITY = "optional" MAINTAINER = "Michael 'Mickey' Lauer " 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 \ -- 2.39.5