diff --git a/.vscode/launch.json b/.vscode/launch.json index e2da8dfd0e..be0fbe5f36 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,16 +2,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug Tests", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/tests/RunAllTests", - "MIMode": "gdb", - "cwd": "${workspaceRoot}", - "miDebuggerPath": "gdb", - }, - { - "name": "Cortex-Debug J-Link", + "name": "Cortex-Debug Load/Run Debug", "preLaunchTask": "Build Debug", "type": "cortex-debug", "request": "launch", @@ -50,27 +41,46 @@ }, }, { - "name": "Cortex-Debug OpenOCD", - "preLaunchTask": "Build Debug", + "name": "Cortex-Debug Load/Run RelWithDebInfo", + "preLaunchTask": "Build RelWithDebInfo", "type": "cortex-debug", "request": "launch", "cwd": "${workspaceRoot}", - "executable": "${workspaceRoot}/build/Debug/deluge.elf", - "serverpath": "${workspaceRoot}/toolchain/win32-x64/openocd/bin/openocd.exe", - "servertype": "openocd", - "configFiles": [ - "/interface/cmsis-dap.cfg", - "${workspaceRoot}/contrib/renesas-rz-a1lu.cfg", - ], + "executable": "${workspaceRoot}/build/RelWithDebInfo/deluge.elf", + "windows": { + "serverpath": "C:\\Program Files\\SEGGER\\JLink\\JLinkGDBServerCL.exe", + }, + "servertype": "jlink", "device": "R7S721020", - "runToEntryPoint": "main", + "interface": "swd", + //"runToEntryPoint": "main", "svdFile": "${workspaceRoot}/contrib/rza1.svd", + "overrideLaunchCommands": [ + "monitor reset", + "load" + ], + "overrideResetCommands": [ + "monitor reset", + "load" + ], + "overrideRestartCommands": [ + "monitor reset", + "load" + ], "rttConfig": { "enabled": true, + "address": "auto", + "decoders": [ + { + "port": 0, + "timestamp": true, + "type": "console" + } + ] }, }, { - "name": "Attach Debug", + "name": "CppDBG Attach Debug", "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/build/debug/deluge7SEG.elf", @@ -92,7 +102,7 @@ "svdPath": "${workspaceRoot}/contrib/rza1.svd", }, { - "name": "Load/Run Debug", + "name": "CppDBG Load/Run Debug", "type": "cppdbg", "preLaunchTask": "Build Debug", "request": "launch", @@ -135,7 +145,7 @@ ] }, { - "name": "Load/Run RelWithDebInfo", + "name": "CppDBG Load/Run RelWithDebInfo", "type": "cppdbg", "preLaunchTask": "Build RelWithDebInfo", "request": "launch", @@ -177,6 +187,15 @@ }, ] }, + { + "name": "Debug Tests", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceRoot}/tests/RunAllTests", + "MIMode": "gdb", + "cwd": "${workspaceRoot}", + "miDebuggerPath": "gdb", + }, { // NOTE: Do not try `load`ing the program using this config "name": "LLDB Attach Debug", @@ -188,6 +207,26 @@ "processCreateCommands": [ "gdb-remote localhost:3333" ], - } + }, + { + "name": "Cortex-Debug OpenOCD", + "preLaunchTask": "Build Debug", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceRoot}", + "executable": "${workspaceRoot}/build/Debug/deluge.elf", + "serverpath": "${workspaceRoot}/toolchain/win32-x64/openocd/bin/openocd.exe", + "servertype": "openocd", + "configFiles": [ + "/interface/cmsis-dap.cfg", + "${workspaceRoot}/contrib/renesas-rz-a1lu.cfg", + ], + "device": "R7S721020", + "runToEntryPoint": "main", + "svdFile": "${workspaceRoot}/contrib/rza1.svd", + "rttConfig": { + "enabled": true, + }, + }, ] } diff --git a/src/deluge/gui/ui/keyboard/keyboard_screen.cpp b/src/deluge/gui/ui/keyboard/keyboard_screen.cpp index 063ef1e68f..f159c65a00 100644 --- a/src/deluge/gui/ui/keyboard/keyboard_screen.cpp +++ b/src/deluge/gui/ui/keyboard/keyboard_screen.cpp @@ -102,6 +102,13 @@ ActionResult KeyboardScreen::padAction(int32_t x, int32_t y, int32_t velocity) { // Pad pressed down, add to list if not full if (velocity) { + //TODO: Logic should be inverted as part of a bigger rewrite + if(currentUIMode == UI_MODE_EXPLODE_ANIMATION + || currentUIMode == UI_MODE_ANIMATION_FADE + || currentUIMode == UI_MODE_INSTRUMENT_CLIP_COLLAPSING) { + return ActionResult::DEALT_WITH; + } + int32_t freeSlotIdx = -1; for (int32_t idx = 0; idx < kMaxNumKeyboardPadPresses; ++idx) { // Free slot found diff --git a/src/deluge/gui/views/session_view.cpp b/src/deluge/gui/views/session_view.cpp index ecfe7149d7..c67cd11a60 100644 --- a/src/deluge/gui/views/session_view.cpp +++ b/src/deluge/gui/views/session_view.cpp @@ -3089,7 +3089,13 @@ Clip* SessionView::gridCreateClip(uint32_t targetSection, Output* targetOutput, InstrumentClip* newInstrumentClip = (InstrumentClip*)newClip; // Create a new track for the clip if (targetOutput == nullptr) { - gridCreateNewTrackForClip(sourceClip->output->type, newInstrumentClip, false); + if(!gridCreateNewTrackForClip(sourceClip->output->type, newInstrumentClip, false)) { + currentSong->sessionClips.deleteAtIndex(0); + newClip->~Clip(); + delugeDealloc(newClip); + return nullptr; + } + targetOutput = newInstrumentClip->output; } @@ -3433,6 +3439,8 @@ ActionResult SessionView::gridHandlePadsLaunch(int32_t x, int32_t y, int32_t on, } } } + + return ActionResult::ACTIONED_AND_CAUSED_CHANGE; } }