Merge pull request #60 from nycki93/main
use ZL and ZR to change songs with lid closed
This commit is contained in:
23
.vscode/c_cpp_properties.json
vendored
Normal file
23
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Win32",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"${DEVKITPRO}/libctru/include",
|
||||||
|
"${DEVKITPRO}/devkitARM/arm-none-eabi/include"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"_DEBUG",
|
||||||
|
"UNICODE",
|
||||||
|
"_UNICODE"
|
||||||
|
],
|
||||||
|
"windowsSdkVersion": "10.0.22000.0",
|
||||||
|
"compilerPath": "cl.exe",
|
||||||
|
"cStandard": "c17",
|
||||||
|
"cppStandard": "c++17",
|
||||||
|
"intelliSenseMode": "windows-msvc-x64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp.errorSquiggles": "disabled"
|
||||||
|
}
|
||||||
18
README.md
18
README.md
@@ -48,13 +48,21 @@ Build dependencies:
|
|||||||
- [makerom](https://github.com/3DSGuy/Project_CTR)
|
- [makerom](https://github.com/3DSGuy/Project_CTR)
|
||||||
- [bannertool](https://github.com/Steveice10/bannertool)
|
- [bannertool](https://github.com/Steveice10/bannertool)
|
||||||
- [devkitARM](https://devkitpro.org/wiki/Getting_Started), with the following packages installed:
|
- [devkitARM](https://devkitpro.org/wiki/Getting_Started), with the following packages installed:
|
||||||
- libctru
|
|
||||||
- 3ds-libmpg123
|
|
||||||
- 3ds-libopus
|
|
||||||
- 3ds-libopusfile
|
|
||||||
- 3ds-libogg
|
- 3ds-libogg
|
||||||
- 3ds-libvorbisidec
|
- 3ds-libopus
|
||||||
- 3ds-libsidplay
|
- 3ds-libsidplay
|
||||||
|
- 3ds-libvorbisidec
|
||||||
|
- 3ds-mpg123
|
||||||
|
- 3ds-opusfile
|
||||||
|
- libctru
|
||||||
|
|
||||||
|
Installing packages in MSYS2:
|
||||||
|
|
||||||
|
```
|
||||||
|
pacman -S libctru 3ds-mpg123 3ds-libopus 3ds-opusfile 3ds-libogg 3ds-libvorbisidec 3ds-libsidplay
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to put `C:\devkitPro\tools\bin` on your PATH.
|
||||||
|
|
||||||
To build, type `make` in the project folder.
|
To build, type `make` in the project folder.
|
||||||
|
|
||||||
|
|||||||
@@ -541,10 +541,55 @@ int main(int argc, char **argv)
|
|||||||
consoleClear();
|
consoleClear();
|
||||||
|
|
||||||
changeFile(dirList.files[fileNum - dirList.dirNum - 1], &playbackInfo);
|
changeFile(dirList.files[fileNum - dirList.dirNum - 1], &playbackInfo);
|
||||||
|
error = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (kDown & KEY_ZR && fileNum < fileMax) {
|
||||||
|
fileNum += 1;
|
||||||
|
consoleSelect(&topScreenInfo);
|
||||||
|
consoleClear();
|
||||||
|
consoleSelect(&topScreenLog);
|
||||||
|
consoleClear();
|
||||||
|
changeFile(dirList.files[fileNum - dirList.dirNum - 1], &playbackInfo);
|
||||||
|
error = 0;
|
||||||
|
consoleSelect(&bottomScreen);
|
||||||
|
if(listDir(from, MAX_LIST, fileNum, dirList) < 0) err_print("Unable to list directory.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kDown & KEY_ZL && fileNum > 0) {
|
||||||
|
fileNum -= 1;
|
||||||
|
consoleSelect(&topScreenInfo);
|
||||||
|
consoleClear();
|
||||||
|
consoleSelect(&topScreenLog);
|
||||||
|
consoleClear();
|
||||||
|
changeFile(dirList.files[fileNum - dirList.dirNum - 1], &playbackInfo);
|
||||||
|
error = 0;
|
||||||
|
consoleSelect(&bottomScreen);
|
||||||
|
if(listDir(from, MAX_LIST, fileNum, dirList) < 0) err_print("Unable to list directory.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// play next song automatically
|
||||||
|
if (error == -1) {
|
||||||
|
if (fileNum >= fileMax) {
|
||||||
|
error = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
fileNum += 1;
|
||||||
|
consoleSelect(&topScreenInfo);
|
||||||
|
consoleClear();
|
||||||
|
consoleSelect(&topScreenLog);
|
||||||
|
consoleClear();
|
||||||
|
changeFile(dirList.files[fileNum - dirList.dirNum - 1], &playbackInfo);
|
||||||
|
error = 0;
|
||||||
|
consoleSelect(&bottomScreen);
|
||||||
|
if(listDir(from, MAX_LIST, fileNum, dirList) < 0) err_print("Unable to list directory.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* After 1000ms, update playback time. */
|
/* After 1000ms, update playback time. */
|
||||||
while(osGetTime() - mill > 1000)
|
while(osGetTime() - mill > 1000)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user