From 0bd449b3da1634fcad6f9a4a1e777ad35fa289cd Mon Sep 17 00:00:00 2001 From: teru Date: Fri, 18 Jun 2010 13:33:22 +0000 Subject: [PATCH] use int instead of enum. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26916 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lrcplayer.c | 9 ++++----- apps/plugins/superdom.c | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index dce5f4ff0..fdd54b636 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -75,9 +75,7 @@ struct preferences { bool wrap; bool wipe; bool active_one_line; - enum { - ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, - } align; + int align; /* 0: left, 1: center, 2: right */ bool statusbar_on; bool display_title; #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.active_one_line }, "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 }, "statusbar on", NULL }, { 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.wipe = true; prefs.active_one_line = false; - prefs.align = ALIGN_CENTER; + prefs.align = 1; /* center */ prefs.statusbar_on = false; prefs.display_title = true; #endif @@ -2848,6 +2846,7 @@ static int lrc_main(void) { /* current.loaded_lrc is false after changing encode setting */ update_display_state = true; + display_state(); load_lrc_file(); } if (update_display_state) diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index d5d08fb16..c2a7d8f89 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c @@ -238,7 +238,8 @@ struct settings { struct resources humanres; struct resources compres; -enum { GS_PROD, GS_MOVE, GS_WAR } gamestate; +enum { GS_PROD, GS_MOVE, GS_WAR }; +int gamestate; struct cursor{ int x; -- 2.11.4.GIT