Hack in support for G5s. This needs to be totally redone in another way...at some point in the future. Right now, it is not really an issue.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageThreads.h"
|
#include "RageThreads.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
#include "archutils/Darwin/Crash.h"
|
#include "archutils/Darwin/Crash.h"
|
||||||
#include "archutils/Unix/CrashHandler.h"
|
#include "archutils/Unix/CrashHandler.h"
|
||||||
#include "archutils/Unix/SignalHandler.h"
|
#include "archutils/Unix/SignalHandler.h"
|
||||||
@@ -87,7 +88,6 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
CString processor;
|
CString processor;
|
||||||
long numProcessors;
|
long numProcessors;
|
||||||
CString machine;
|
CString machine;
|
||||||
char *temp;
|
|
||||||
|
|
||||||
OSErr err = noErr;
|
OSErr err = noErr;
|
||||||
long code;
|
long code;
|
||||||
@@ -98,23 +98,15 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
{
|
{
|
||||||
systemVersion = "Mac OS X ";
|
systemVersion = "Mac OS X ";
|
||||||
if (code >= kMacOSX_10_2 && code < kMacOSX_10_3)
|
if (code >= kMacOSX_10_2 && code < kMacOSX_10_3)
|
||||||
{
|
systemVersion += ssprintf("10.2.%ld", code - kMacOSX_10_2);
|
||||||
systemVersion += "10.2.";
|
|
||||||
asprintf(&temp, "%d", code - kMacOSX_10_2);
|
|
||||||
systemVersion += temp;
|
|
||||||
free(temp);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
systemVersion += "10.3";
|
|
||||||
int ssv = code - kMacOSX_10_3;
|
int ssv = code - kMacOSX_10_3;
|
||||||
|
|
||||||
if (ssv > 9)
|
if (ssv > 9)
|
||||||
systemVersion += "+";
|
systemVersion += "10.3+";
|
||||||
else {
|
else
|
||||||
asprintf(&temp, ".%d", ssv);
|
systemVersion += ssprintf("10.3.%d", ssv);
|
||||||
systemVersion += temp;
|
|
||||||
free(temp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -139,7 +131,7 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
vRam = 0;
|
vRam = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX update this information for G5s */
|
/* XXX Do this in some manner other than using Gestalt */
|
||||||
/* Get processor */
|
/* Get processor */
|
||||||
numProcessors = MPProcessorsScheduled();
|
numProcessors = MPProcessorsScheduled();
|
||||||
err = Gestalt(gestaltNativeCPUtype, &code);
|
err = Gestalt(gestaltNativeCPUtype, &code);
|
||||||
@@ -159,10 +151,9 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
CASE_GESTALT_M(processor, CPUG47450, "G4");
|
CASE_GESTALT_M(processor, CPUG47450, "G4");
|
||||||
CASE_GESTALT_M(processor, CPUApollo, "G4 (Apollo)");
|
CASE_GESTALT_M(processor, CPUApollo, "G4 (Apollo)");
|
||||||
CASE_GESTALT_M(processor, CPU750FX, "G3 (Sahara)");
|
CASE_GESTALT_M(processor, CPU750FX, "G3 (Sahara)");
|
||||||
|
case 313: processor = "G5"; break;
|
||||||
default:
|
default:
|
||||||
asprintf(&temp, "%d", code);
|
processor = ssprintf("%ld", code);
|
||||||
processor = temp;
|
|
||||||
free(temp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -221,13 +212,12 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
CASE_GESTALT(machine, PowerMacNewWorld);
|
CASE_GESTALT(machine, PowerMacNewWorld);
|
||||||
CASE_GESTALT(machine, PowerMacG3);
|
CASE_GESTALT(machine, PowerMacG3);
|
||||||
default:
|
default:
|
||||||
asprintf(&temp, "%d", code);
|
machine = ssprintf("%ld", code);
|
||||||
machine = temp;
|
|
||||||
free(temp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (err == gestaltUndefSelectorErr ) {
|
else if (err == gestaltUndefSelectorErr )
|
||||||
machine = "PowerMac";
|
{
|
||||||
|
machine = "PowerMac ";
|
||||||
machine += processor;
|
machine += processor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user