From 3972512b2a5c25236ea3ba586621dba6e5b56361 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Fri, 21 Dec 2012 01:44:57 -0500 Subject: Looks like only having 'lang' crashes the options dialog. Restore the array of pointers. --- README.md | 4 ++++ source/nds/gui.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c214582..2324d22 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,10 @@ need to do the following: , "Deutsch" ``` +* Still in `source/nds/gui.c`, find `char* language_options[]`, which is below + the language names. Add an entry similar to the others, with the last number + plus 1. For example, if the last entry is `, (char *) &lang[2]`, yours would + be `, (char *) &lang[3]`. * Still in `source/nds/gui.c`, find `case CHINESE_SIMPLIFIED`. Copy the lines starting at the `case` and ending with `break`, inclusively. Paste them before the `}`. Change the language name and tags, and update the `cmplen` diff --git a/source/nds/gui.c b/source/nds/gui.c index 2f9e1d2..bf85b67 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -49,6 +49,8 @@ char *lang[3] = "Français", // 2 }; +char *language_options[] = { (char *) &lang[0], (char *) &lang[1], (char *) &lang[2] }; + /****************************************************************************** * Macro definition ******************************************************************************/ @@ -3117,8 +3119,8 @@ u32 menu(u16 *screen) //CPU speed /* 01 */ NUMERIC_SELECTION_OPTION(NULL, &msg[MSG_SUB_MENU_42], &clock_speed_number, 6, NULL, 1), - /* 02 */ STRING_SELECTION_OPTION(language_set, NULL, &msg[MSG_SUB_MENU_41], lang, - &emu_config.language, sizeof(lang) / sizeof(lang[0]) /* number of possible languages */, NULL, ACTION_TYPE, 2), + /* 02 */ STRING_SELECTION_OPTION(language_set, NULL, &msg[MSG_SUB_MENU_41], language_options, + &emu_config.language, sizeof(language_options) / sizeof(language_options[0]) /* number of possible languages */, NULL, ACTION_TYPE, 2), /* 03 */ STRING_SELECTION_OPTION(NULL, show_card_space, &msg[MSG_SUB_MENU_43], NULL, &desert, 2, NULL, PASSIVE_TYPE | HIDEN_TYPE, 3), -- cgit v1.2.3