Exemplo n.º 1
0
void loadDefaults() {

    state.memoryAvailable = 0;
    state.memoryPercentage = 50;

#ifndef NO_GUI

    video.sdlStarted = 0;
    video.agarStarted = 0;
    video.screenWtoApply = 0;
    video.screenHtoApply = 0;
    video.screenBPP = 0;
#ifdef WITHOUT_AGAR
    video.screenFS = 0;
#else
    video.screenFS = 1;
#endif
    video.screenAA = 0;

    strcpy(video.fontFile, "Vera.ttf");
    video.fontSize = 11;

#endif

    viewInit();
    spawnDefaults();
    stateInit();
    commandInit();

}
Exemplo n.º 2
0
int
register_update_commands(RecoveryCommandContext *ctx)
{
    int ret;

    ret = commandInit();
    if (ret < 0) return ret;

    /*
     * Commands
     */

    ret = registerCommand("assert", CMD_ARGS_BOOLEAN, cmd_assert, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("delete", CMD_ARGS_WORDS, cmd_delete, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("delete_recursive", CMD_ARGS_WORDS, cmd_delete,
            (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("copy_dir", CMD_ARGS_WORDS,
            cmd_copy_dir, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("run_program", CMD_ARGS_WORDS,
            cmd_run_program, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("set_perm", CMD_ARGS_WORDS,
            cmd_set_perm, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("set_perm_recursive", CMD_ARGS_WORDS,
            cmd_set_perm, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("show_progress", CMD_ARGS_WORDS,
            cmd_show_progress, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("symlink", CMD_ARGS_WORDS, cmd_symlink, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("format", CMD_ARGS_WORDS, cmd_format, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_radio_image", CMD_ARGS_WORDS,
            cmd_write_firmware_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_hboot_image", CMD_ARGS_WORDS,
            cmd_write_firmware_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_raw_image", CMD_ARGS_WORDS,
            cmd_write_raw_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("mark", CMD_ARGS_WORDS, cmd_mark, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("done", CMD_ARGS_WORDS, cmd_done, (void *)ctx);
    if (ret < 0) return ret;

    /*
     * Functions
     */

    ret = registerFunction("compatible_with", fn_compatible_with, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("update_forced", fn_update_forced, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("get_mark", fn_get_mark, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("hash_dir", fn_hash_dir, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("matches", fn_matches, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("concat", fn_concat, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("getprop", fn_getprop, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("file_contains", fn_file_contains, (void *)ctx);
    if (ret < 0) return ret;

    return 0;
}
Exemplo n.º 3
0
void ConsoleConfig(void){
	USART1_config(115200);
	commandInit();
}