use int instead of enum.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26916 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-06-18 13:33:22 +00:00
parent f9b0f81d63
commit be7e835d92
2 changed files with 6 additions and 6 deletions

View file

@ -75,9 +75,7 @@ struct preferences {
bool wrap; bool wrap;
bool wipe; bool wipe;
bool active_one_line; bool active_one_line;
enum { int align; /* 0: left, 1: center, 2: right */
ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT,
} align;
bool statusbar_on; bool statusbar_on;
bool display_title; bool display_title;
#endif #endif
@ -2225,7 +2223,7 @@ static void load_or_save_settings(bool save)
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line },
"active one line", NULL }, "active one line", NULL },
{ TYPE_INT, 0, 2, { .int_p = (int *) &prefs.align }, "align", NULL }, { TYPE_INT, 0, 2, { .int_p = &prefs.align }, "align", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.statusbar_on }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.statusbar_on },
"statusbar on", NULL }, "statusbar on", NULL },
{ TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title },
@ -2256,7 +2254,7 @@ static void load_or_save_settings(bool save)
prefs.wrap = true; prefs.wrap = true;
prefs.wipe = true; prefs.wipe = true;
prefs.active_one_line = false; prefs.active_one_line = false;
prefs.align = ALIGN_CENTER; prefs.align = 1; /* center */
prefs.statusbar_on = false; prefs.statusbar_on = false;
prefs.display_title = true; prefs.display_title = true;
#endif #endif
@ -2848,6 +2846,7 @@ static int lrc_main(void)
{ {
/* current.loaded_lrc is false after changing encode setting */ /* current.loaded_lrc is false after changing encode setting */
update_display_state = true; update_display_state = true;
display_state();
load_lrc_file(); load_lrc_file();
} }
if (update_display_state) if (update_display_state)

View file

@ -238,7 +238,8 @@ struct settings {
struct resources humanres; struct resources humanres;
struct resources compres; struct resources compres;
enum { GS_PROD, GS_MOVE, GS_WAR } gamestate; enum { GS_PROD, GS_MOVE, GS_WAR };
int gamestate;
struct cursor{ struct cursor{
int x; int x;