append pref item cpuclock

This commit is contained in:
kanjitalk755 2019-01-16 19:44:09 +09:00
parent d736cc58de
commit 03a92c7815
3 changed files with 7 additions and 0 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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
};