Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: yopyop on August 12, 2015, 02:48:10 PM

Title: Clip+ button to pause/play while in file-view? (SOLVED)
Post by: yopyop on August 12, 2015, 02:48:10 PM
Is it possible for a button to play/pause from file-view by changing a setting in "keymap-clip.c" ?

Update: I think the solution is to add something similar to HAVE_VOLUME_IN_LIST to list.c and a few other files. Let's hope so because that looks easy and I have very little coding experience.

Update 1.1 I've got VOLUP/DOWN functioning as play/pause within the file browser at the moment! I'm using this:

int status = audio_status();
            if (status & AUDIO_STATUS_PLAY)
                if (status & AUDIO_STATUS_PAUSE)
                    unpause_action(true, true);
                    pause_action(true, true);

From misc.c. But I replace (true,true) with (true,false) so wps does not update and ruin the screen. I will continue to update this until I am finished or give up. Current issue is that I do not know how to replicate HAVE_VOL_IN_LIST. My replication seems to do nothing. Maybe I'll just use it and add more binds to it. Ugly hack but what the hell, I am making this for my personal use, so...

Ok it's working now ...