Update formatting.
This commit is contained in:
@@ -73,14 +73,18 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
|
|
||||||
/* Get system version */
|
/* Get system version */
|
||||||
err = Gestalt(gestaltSystemVersion, &code);
|
err = Gestalt(gestaltSystemVersion, &code);
|
||||||
if (err == noErr) {
|
if (err == noErr)
|
||||||
|
{
|
||||||
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 += "10.2.";
|
systemVersion += "10.2.";
|
||||||
asprintf(&temp, "%d", code - kMacOSX_10_2);
|
asprintf(&temp, "%d", code - kMacOSX_10_2);
|
||||||
systemVersion += temp;
|
systemVersion += temp;
|
||||||
free(temp);
|
free(temp);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
systemVersion += "10.3";
|
systemVersion += "10.3";
|
||||||
int ssv = code - kMacOSX_10_3;
|
int ssv = code - kMacOSX_10_3;
|
||||||
if (ssv > 9)
|
if (ssv > 9)
|
||||||
@@ -91,7 +95,8 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
systemVersion = "Unknown system version";
|
systemVersion = "Unknown system version";
|
||||||
|
|
||||||
/* Get memory */
|
/* Get memory */
|
||||||
@@ -99,13 +104,16 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
if (err != noErr)
|
if (err != noErr)
|
||||||
vRam = 0;
|
vRam = 0;
|
||||||
err = Gestalt(gestaltPhysicalRAMSize, &ram);
|
err = Gestalt(gestaltPhysicalRAMSize, &ram);
|
||||||
if (err == noErr) {
|
if (err == noErr)
|
||||||
|
{
|
||||||
vRam -= ram;
|
vRam -= ram;
|
||||||
if (vRam < 0)
|
if (vRam < 0)
|
||||||
vRam = 0;
|
vRam = 0;
|
||||||
ram /= 1048576; /* 1048576 = 1024*1024 */
|
ram /= 1048576; /* 1048576 = 1024*1024 */
|
||||||
vRam /= 1048576;
|
vRam /= 1048576;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
ram = 0;
|
ram = 0;
|
||||||
vRam = 0;
|
vRam = 0;
|
||||||
}
|
}
|
||||||
@@ -113,8 +121,10 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
/* Get processor */
|
/* Get processor */
|
||||||
numProcessors = MPProcessorsScheduled();
|
numProcessors = MPProcessorsScheduled();
|
||||||
err = Gestalt(gestaltNativeCPUtype, &code);
|
err = Gestalt(gestaltNativeCPUtype, &code);
|
||||||
if (err == noErr) {
|
if (err == noErr)
|
||||||
switch (code) {
|
{
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
CASE_GESTALT_M(processor, CPU601, "601");
|
CASE_GESTALT_M(processor, CPU601, "601");
|
||||||
CASE_GESTALT_M(processor, CPU603, "603");
|
CASE_GESTALT_M(processor, CPU603, "603");
|
||||||
CASE_GESTALT_M(processor, CPU603e, "603e");
|
CASE_GESTALT_M(processor, CPU603e, "603e");
|
||||||
@@ -132,15 +142,18 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
processor = temp;
|
processor = temp;
|
||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
processor = "unknown";
|
processor = "unknown";
|
||||||
err = Gestalt(gestaltProcClkSpeed, &processorSpeed);
|
err = Gestalt(gestaltProcClkSpeed, &processorSpeed);
|
||||||
if (err != noErr)
|
if (err != noErr)
|
||||||
processorSpeed = 0;
|
processorSpeed = 0;
|
||||||
/* Get machine */
|
/* Get machine */
|
||||||
err = Gestalt(gestaltMachineType, &code);
|
err = Gestalt(gestaltMachineType, &code);
|
||||||
if (err == noErr) {
|
if (err == noErr)
|
||||||
switch (code) {
|
{
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
/* PowerMacs */
|
/* PowerMacs */
|
||||||
CASE_GESTALT(machine, PowerMac4400);
|
CASE_GESTALT(machine, PowerMac4400);
|
||||||
CASE_GESTALT(machine, PowerMac4400_160);
|
CASE_GESTALT(machine, PowerMac4400_160);
|
||||||
@@ -190,10 +203,12 @@ void ArchHooks_darwin::DumpDebugInfo()
|
|||||||
machine = temp;
|
machine = temp;
|
||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
} else if (err == gestaltUndefSelectorErr ) {
|
}
|
||||||
|
else if (err == gestaltUndefSelectorErr ) {
|
||||||
machine = "PowerMac";
|
machine = "PowerMac";
|
||||||
machine += processor;
|
machine += processor;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
machine = "unknown machine";
|
machine = "unknown machine";
|
||||||
|
|
||||||
/* Get primary display driver */
|
/* Get primary display driver */
|
||||||
@@ -232,7 +247,8 @@ void ArchHooks_darwin::MessageBoxOK(CString sMessage, CString ID)
|
|||||||
ControlRef box;
|
ControlRef box;
|
||||||
SInt16 unused;
|
SInt16 unused;
|
||||||
|
|
||||||
if (allowHush) {
|
if (allowHush)
|
||||||
|
{
|
||||||
Rect boxBounds = {20, 40, 300, 25}; /* again, whatever */
|
Rect boxBounds = {20, 40, 300, 25}; /* again, whatever */
|
||||||
CreateCheckBoxControl(GetDialogWindow(dialog), &boxBounds, boxName, 0, true, &box);
|
CreateCheckBoxControl(GetDialogWindow(dialog), &boxBounds, boxName, 0, true, &box);
|
||||||
GetBestControlRect(box, &boxBounds, &unused);
|
GetBestControlRect(box, &boxBounds, &unused);
|
||||||
@@ -270,7 +286,8 @@ ArchHooks::MessageBoxResult ArchHooks_darwin::MessageBoxAbortRetryIgnore(CString
|
|||||||
ASSERT(err == noErr);
|
ASSERT(err == noErr);
|
||||||
RunStandardAlert(dialog, NULL, &button);
|
RunStandardAlert(dialog, NULL, &button);
|
||||||
|
|
||||||
switch (button) {
|
switch (button)
|
||||||
|
{
|
||||||
case kAlertStdAlertOKButton:
|
case kAlertStdAlertOKButton:
|
||||||
result = retry;
|
result = retry;
|
||||||
break;
|
break;
|
||||||
@@ -286,7 +303,8 @@ ArchHooks::MessageBoxResult ArchHooks_darwin::MessageBoxAbortRetryIgnore(CString
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void ArchHooks_darwin::Update(float delta) {
|
inline void ArchHooks_darwin::Update(float delta)
|
||||||
|
{
|
||||||
#pragma unused(delta)
|
#pragma unused(delta)
|
||||||
MoviesTask(NULL, 0);
|
MoviesTask(NULL, 0);
|
||||||
OSErr err = GetMoviesError();
|
OSErr err = GetMoviesError();
|
||||||
|
|||||||
Reference in New Issue
Block a user