Improved Lindy color settings.
- Celeron speed is correctly reported in model name. - Added Silver, Blue and RedEX. - Color setting is now case insensitive.
This commit is contained in:
parent
a08e113dc3
commit
84dcb34a06
@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "gpuvendor.h"
|
||||
@ -799,8 +800,25 @@ int readConfig(FILE *configFile, EmulatorConfig *config)
|
||||
{
|
||||
char colour[256];
|
||||
strcpy(colour, getNextToken(NULL, " ", &saveptr));
|
||||
|
||||
// Convert colour to uppercase just to avoid case-sensitivity issues
|
||||
for (char *p = colour; *p; ++p) *p = toupper(*p);
|
||||
|
||||
if (strcmp(colour, "RED") == 0)
|
||||
config->lindberghColour = RED;
|
||||
else if (strcmp(colour, "YELLOW") == 0)
|
||||
config->lindberghColour = YELLOW;
|
||||
else if (strcmp(colour, "BLUE") == 0)
|
||||
config->lindberghColour = BLUE;
|
||||
else if (strcmp(colour, "SILVER") == 0)
|
||||
config->lindberghColour = SILVER;
|
||||
else if (strcmp(colour, "REDEX") == 0)
|
||||
config->lindberghColour = REDEX;
|
||||
else
|
||||
{
|
||||
// Print a warning and keep the default colour
|
||||
printf("Warning: Unknown Lindbergh colour '%s'. Keeping default value.\n", colour);
|
||||
}
|
||||
}
|
||||
|
||||
else if (strcmp(command, "REGION") == 0)
|
||||
|
@ -87,7 +87,10 @@
|
||||
typedef enum
|
||||
{
|
||||
YELLOW,
|
||||
RED
|
||||
RED,
|
||||
BLUE,
|
||||
SILVER,
|
||||
REDEX
|
||||
} Colour;
|
||||
|
||||
typedef enum
|
||||
|
@ -609,13 +609,16 @@ char *fgets(char *str, int n, FILE *stream)
|
||||
{
|
||||
char contents[4][256];
|
||||
|
||||
// Pentium 4 HT 3.0E : Prescott 3.0GHz L2 1Mo (SL8JZ, SL7L4, SL7E4, SL88J, SL79L, SL7KB, SL7PM)
|
||||
strcpy(contents[0], "processor : 0");
|
||||
strcpy(contents[1], "vendor_id : GenuineIntel");
|
||||
strcpy(contents[2], "model : 142");
|
||||
strcpy(contents[3], "model name : Intel(R) Pentium(R) CPU 3.00GHz");
|
||||
|
||||
if (getConfig()->lindberghColour == RED)
|
||||
strcpy(contents[3], "model name : Intel(R) Celeron(R) CPU 3.00GHz");
|
||||
// Celeron D 335 : 2.8GHz NetBurst Prescott-256 (SL8HM, SL7NW, SL7VZ, SL7TJ, SL7DM, SL7L2, SL7C7) si 478 ?
|
||||
if (getConfig()->lindberghColour == RED || getConfig()->lindberghColour == REDEX)
|
||||
strcpy(contents[3], "model name : Intel(R) Celeron(R) CPU 2.80GHz");
|
||||
|
||||
|
||||
if (fileRead[CPUINFO] == 4)
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user