GUI: prevent connection to self

This commit is contained in:
tildearrow 2023-01-11 00:42:30 -05:00
parent 0fd0206cc3
commit 5a48c85c14
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ void FurnaceGUI::drawMixer() {
if (portDragActive) {
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left)) {
portDragActive=false;
if (hoveredPortSet!=0x1fff && hoveredSubPort>=0) {
if (hoveredPortSet!=0x1fff && hoveredSubPort>=0 && selectedPortSet!=hoveredPortSet) {
unsigned int src=(selectedPortSet<<4)|selectedSubPort;
unsigned int dest=(hoveredPortSet<<4)|hoveredSubPort;