Renames views/player to views/music_player (#18)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
The MP3 player was named `player` in view context. It had multiple
meanings.
Although probably not perfect (since it only plays MP3 files, this
renames it to `music_player`.

## Motivation and Context
<!--- What does this sample do? What problem does it solve? -->
<!--- If it fixes/closes/resolves an open issue, please link to the
issue here -->
It could be confusing otherwise.

## How Has This Been Tested?
<!-- (if applicable) -->
<!--- Please describe in detail how you tested your sample/changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots
<!-- (if appropriate): -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Improvement (non-breaking change that adds a new feature)
- [ ] Bug fix (fixes an issue)
- [ ] Breaking change (breaking change)
- [ ] Config and build (change in the configuration and build system,
has no impact on code or features)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

<!--- It would be nice if you could sign off your contribution by
replacing the name with your GitHub user name and GitHub email contact.
-->
Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>
This commit is contained in:
Robin Jones 2023-07-22 11:30:39 +01:00 committed by GitHub
parent edf8e13da1
commit 7a348ea6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View File

@ -36,7 +36,7 @@ SRCS = \
menu/views/fragments/fragments.c \ menu/views/fragments/fragments.c \
menu/views/fragments/widgets.c \ menu/views/fragments/widgets.c \
menu/views/load.c \ menu/views/load.c \
menu/views/player.c \ menu/views/music_player.c \
menu/views/startup.c \ menu/views/startup.c \
menu/views/system_info.c \ menu/views/system_info.c \
utils/fs.c utils/fs.c

View File

@ -112,8 +112,8 @@ void menu_run (boot_params_t *boot_params) {
view_system_info_display(menu, display); view_system_info_display(menu, display);
break; break;
case MENU_MODE_PLAYER: case MENU_MODE_MUSIC_PLAYER:
view_player_display(menu, display); view_music_player_display(menu, display);
break; break;
case MENU_MODE_CREDITS: case MENU_MODE_CREDITS:
@ -158,8 +158,8 @@ void menu_run (boot_params_t *boot_params) {
view_system_info_init(menu); view_system_info_init(menu);
break; break;
case MENU_MODE_PLAYER: case MENU_MODE_MUSIC_PLAYER:
view_player_init(menu); view_music_player_init(menu);
break; break;
case MENU_MODE_CREDITS: case MENU_MODE_CREDITS:

View File

@ -24,7 +24,7 @@ typedef enum {
MENU_MODE_BROWSER, MENU_MODE_BROWSER,
MENU_MODE_FILE_INFO, MENU_MODE_FILE_INFO,
MENU_MODE_SYSTEM_INFO, MENU_MODE_SYSTEM_INFO,
MENU_MODE_PLAYER, MENU_MODE_MUSIC_PLAYER,
MENU_MODE_CREDITS, MENU_MODE_CREDITS,
MENU_MODE_LOAD, MENU_MODE_LOAD,
MENU_MODE_ERROR, MENU_MODE_ERROR,

View File

@ -209,7 +209,7 @@ static void process (menu_t *menu) {
menu->next_mode = MENU_MODE_LOAD; menu->next_mode = MENU_MODE_LOAD;
break; break;
case ENTRY_TYPE_MUSIC: case ENTRY_TYPE_MUSIC:
menu->next_mode = MENU_MODE_PLAYER; menu->next_mode = MENU_MODE_MUSIC_PLAYER;
break; break;
default: default:
menu->next_mode = MENU_MODE_FILE_INFO; menu->next_mode = MENU_MODE_FILE_INFO;

View File

@ -124,7 +124,7 @@ static void draw (menu_t *menu, surface_t *d) {
} }
void view_player_init (menu_t *menu) { void view_music_player_init (menu_t *menu) {
mp3player_err_t error; mp3player_err_t error;
unmute_counter = 0; unmute_counter = 0;
@ -151,10 +151,10 @@ void view_player_init (menu_t *menu) {
path_free(path); path_free(path);
} }
void view_player_display (menu_t *menu, surface_t *display) { void view_music_player_display (menu_t *menu, surface_t *display) {
process(menu); process(menu);
draw(menu, display); draw(menu, display);
if (menu->next_mode != MENU_MODE_PLAYER) { if (menu->next_mode != MENU_MODE_MUSIC_PLAYER) {
mp3player_deinit(); mp3player_deinit();
} }
} }

View File

@ -29,8 +29,8 @@ void view_system_info_display (menu_t *menu, surface_t *display);
void view_file_info_init (menu_t *menu); void view_file_info_init (menu_t *menu);
void view_file_info_display (menu_t *menu, surface_t *display); void view_file_info_display (menu_t *menu, surface_t *display);
void view_player_init (menu_t *menu); void view_music_player_init (menu_t *menu);
void view_player_display (menu_t *menu, surface_t *display); void view_music_player_display (menu_t *menu, surface_t *display);
void view_credits_init (menu_t *menu); void view_credits_init (menu_t *menu);
void view_credits_display (menu_t *menu, surface_t *display); void view_credits_display (menu_t *menu, surface_t *display);