From 39a0165261d3421d672226c3a0cf22829e93c260 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 1 Nov 2004 15:15:30 +0000 Subject: 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/libsdl-qpe-1.2.7/agawa-piro-mickey.patch | 31 +++++++++++-------------- 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'libsdl/libsdl-qpe-1.2.7/agawa-piro-mickey.patch') 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 { -- cgit v1.2.3