mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-25 20:16:54 +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];
|
changed_prefs.floppy_speed = floppy_table[which];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int framerate_table[] = {1, 2, 3, 4, 8};
|
||||||
|
|
||||||
static void set_gfx_framerate(int which)
|
static void set_gfx_framerate(int which)
|
||||||
{
|
{
|
||||||
int table[] = {1, 2, 3, 4, 8};
|
|
||||||
|
|
||||||
/* Custom setting - don't touch! */
|
/* Custom setting - don't touch! */
|
||||||
if (which > sizeof(table) / sizeof(table[0]))
|
if (which > sizeof(framerate_table) / sizeof(framerate_table[0]))
|
||||||
return;
|
return;
|
||||||
changed_prefs.gfx_framerate = table[which];
|
changed_prefs.gfx_framerate = framerate_table[which];
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_gfx_framerate(void)
|
static int get_gfx_framerate(void)
|
||||||
{
|
{
|
||||||
int table[] = {1, 2, 3, 4, 8};
|
return find_index_by_val(changed_prefs.gfx_framerate, framerate_table,
|
||||||
|
sizeof(framerate_table) / sizeof(framerate_table[0]), 5);
|
||||||
return find_index_by_val(changed_prefs.gfx_framerate, table,
|
|
||||||
sizeof(table) / sizeof(table[0]), 5);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user