Correct display of cpu-to-chipset speed

This commit is contained in:
simon.kagstrom 2009-05-27 19:08:53 +00:00
parent 43f4f4e06e
commit 7e4849d096

View File

@ -293,25 +293,17 @@ static void memory_options(void)
prefs_has_changed = 1; prefs_has_changed = 1;
} }
static int cpu_to_chipset_table[] = {-1,512,2560,5120,7168,8704,10240};
static int get_cpu_to_chipset_speed(void) static int get_cpu_to_chipset_speed(void)
{ {
switch(currprefs.m68k_speed) return find_index_by_val(changed_prefs.m68k_speed, cpu_to_chipset_table,
{ sizeof(cpu_to_chipset_table) / sizeof(cpu_to_chipset_table[0]), 0);
case 1: return 1;
case 2: return 2;
case 3: return 3;
case 5: return 4;
case 10: return 5;
case 15: return 6;
default: break; /* max */
}
return 0;
} }
static void set_cpu_to_chipset_speed(int which) static void set_cpu_to_chipset_speed(int which)
{ {
int table[] = {-1,512,2560,5120,7168,8704,10240}; changed_prefs.m68k_speed = cpu_to_chipset_table[which];
changed_prefs.m68k_speed = table[which];
} }
static int get_floppy_speed(void) static int get_floppy_speed(void)