⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 playlist_menu.c

📁 编译后直接运行的MP3播放器全部C语言源代码 一个包含FAT文件系统、系统引导 Boot、FLASH Driver等内容的
💻 C
字号:
/*************************************************************************** *             __________               __   ___. *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  / *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  < *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \ *                     \/            \/     \/    \/            \/ * $Id: playlist_menu.c,v 1.4 2004/01/26 17:05:21 hardeeps Exp $ * * Copyright (C) 2002 Bj鰎n Stenberg * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/#include <string.h>#include "menu.h"#include "file.h"#include "keyboard.h"#include "playlist.h"#include "tree.h"#include "settings.h"#include "playlist_viewer.h"#include "lang.h"#define DEFAULT_PLAYLIST_NAME "/dynamic.m3u"static bool save_playlist(void){    char filename[MAX_PATH+1];    strncpy(filename, DEFAULT_PLAYLIST_NAME, sizeof(filename));    if (!kbd_input(filename, sizeof(filename)))    {        playlist_save(NULL, filename);                /* reload in case playlist was saved to cwd */        reload_directory();    }    return false;}static bool recurse_directory(void){    char* names[] = { str(LANG_OFF),                       str(LANG_ON),                      str(LANG_RESUME_SETTING_ASK) };    return set_option( str(LANG_RECURSE_DIRECTORY),                       &global_settings.recursive_dir_insert, INT, names, 3,                       NULL );}bool playlist_menu(void){    int m;    bool result;    struct menu_items items[] = {        { str(LANG_CREATE_PLAYLIST),       create_playlist   },        { str(LANG_VIEW_DYNAMIC_PLAYLIST), playlist_viewer   },        { str(LANG_SAVE_DYNAMIC_PLAYLIST), save_playlist     },        { str(LANG_RECURSE_DIRECTORY),     recurse_directory },    };        m = menu_init( items, sizeof items / sizeof(struct menu_items) );    result = menu_run(m);    menu_exit(m);    return result;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -