CVS: winex/misc cpu.c,1.7,1.8
[email protected] 31 Jul 2007 20:00:45 -0000
| Newsgroups | gmane.comp.emulators.winex.cvs |
|---|---|
| Message-ID | <[email protected]> |
Subject: winex/misc cpu.c,1.7,1.8Update of /var/lib/cvsd/cvsroot/winex/misc
In directory agravaine:/tmp/cvs-serv2372/misc
Modified Files:
cpu.c
Log Message:
Add support for ~MHz registry key on Linux
Index: cpu.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/misc/cpu.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cpu.c 30 Mar 2007 15:56:56 -0000 1.7
+++ cpu.c 31 Jul 2007 20:00:43 -0000 1.8
@@ -112,6 +112,19 @@
if ((s=strchr(value,'\n')))
*s='\0';
+ if (!strncasecmp (line, "cpu MHz", strlen ("cpu MHz")))
+ {
+ float f;
+
+ if (sscanf (value, "%f", &f))
+ {
+ DWORD iVal = (DWORD)f;
+ RegSetValueExA (xhkey, "~MHz", 0, REG_DWORD,
+ (BYTE *)&iVal, 4);
+ }
+ continue;
+ }
+
/* 2.1 method */
if (!strncasecmp(line, "cpu family",strlen("cpu family"))) {
if (isdigit (value[0])) {