mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-22 02:29:17 +01:00
Refactoring: Move out framerate table
This commit is contained in:
parent
814544b8c7
commit
d5fc88a9ff
@ -319,22 +319,20 @@ static void set_floppy_speed(int which)
|
||||
changed_prefs.floppy_speed = floppy_table[which];
|
||||
}
|
||||
|
||||
static int framerate_table[] = {1, 2, 3, 4, 8};
|
||||
|
||||
static void set_gfx_framerate(int which)
|
||||
{
|
||||
int table[] = {1, 2, 3, 4, 8};
|
||||
|
||||
/* Custom setting - don't touch! */
|
||||
if (which > sizeof(table) / sizeof(table[0]))
|
||||
if (which > sizeof(framerate_table) / sizeof(framerate_table[0]))
|
||||
return;
|
||||
changed_prefs.gfx_framerate = table[which];
|
||||
changed_prefs.gfx_framerate = framerate_table[which];
|
||||
}
|
||||
|
||||
static int get_gfx_framerate(void)
|
||||
{
|
||||
int table[] = {1, 2, 3, 4, 8};
|
||||
|
||||
return find_index_by_val(changed_prefs.gfx_framerate, table,
|
||||
sizeof(table) / sizeof(table[0]), 5);
|
||||
return find_index_by_val(changed_prefs.gfx_framerate, framerate_table,
|
||||
sizeof(framerate_table) / sizeof(framerate_table[0]), 5);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user