Skip to content

Commit

Permalink
append pref item cpuclock
Browse files Browse the repository at this point in the history
  • Loading branch information
kanjitalk755 committed Jan 16, 2019
1 parent d736cc5 commit 03a92c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SheepShaver/src/Unix/main_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ static void get_system_info(void)

#if EMULATED_PPC
PVR = 0x000c0000; // Default: 7400 (with AltiVec)
int pref_cpu_clock = PrefsFindInt32("cpuclock");
if (pref_cpu_clock) CPUClockSpeed = 1000000 * pref_cpu_clock;
#elif defined(__APPLE__) && defined(__MACH__)
proc_file = popen("ioreg -c IOPlatformDevice", "r");
if (proc_file) {
Expand Down
4 changes: 4 additions & 0 deletions SheepShaver/src/Windows/main_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ int main(int argc, char **argv)
TimebaseSpeed = 25000000; // Default: 25MHz
PVR = 0x000c0000; // Default: 7400 (with AltiVec)
D(bug("PVR: %08x (assumed)\n", PVR));
{
int pref_cpu_clock = PrefsFindInt32("cpuclock");
if (pref_cpu_clock) CPUClockSpeed = 1000000 * pref_cpu_clock;
}

// Init system routines
SysInit();
Expand Down
1 change: 1 addition & 0 deletions SheepShaver/src/prefs_items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ prefs_desc common_prefs_items[] = {
{"hotkey", TYPE_INT32, false, "hotkey modifier"},
{"scale_nearest",TYPE_BOOLEAN,false,"nearest neighbor scaling"},
{"scale_integer",TYPE_BOOLEAN,false,"integer scaling"},
{"cpuclock", TYPE_INT32, 0, "CPU clock [MHz] of system info"},
{NULL, TYPE_END, false, NULL} // End of list
};

Expand Down

0 comments on commit 03a92c7

Please sign in to comment.