diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 797b94cdd..6a726d4fe 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -9121,8 +9121,7 @@ FurnaceGUI::FurnaceGUI(): romMultiFile(false), romExportSave(false), pendingExport(NULL), - romExportExists(false), - desBpm(150.0) { + romExportExists(false) { // value keys valueKeys[SDLK_0]=0; valueKeys[SDLK_1]=1; diff --git a/src/gui/gui.h b/src/gui/gui.h index db558b4c5..6aaaf741e 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2835,8 +2835,6 @@ class FurnaceGUI { std::vector randomDemoSong; - double desBpm; - void commandExportOptions(); void drawExportAudio(bool onWindow=false); diff --git a/src/gui/speed.cpp b/src/gui/speed.cpp index 56d6871d3..02e04481a 100644 --- a/src/gui/speed.cpp +++ b/src/gui/speed.cpp @@ -21,7 +21,6 @@ #include "imgui.h" #include "misc/cpp/imgui_stdlib.h" #include "intConst.h" -#include "IconsFontAwesome4.h" void FurnaceGUI::drawSpeed(bool asChild) { if (nextWindow==GUI_WINDOW_SPEED) { @@ -50,7 +49,7 @@ void FurnaceGUI::drawSpeed(bool asChild) { } } ImGui::TableNextColumn(); - float avail=ImGui::GetContentRegionAvail().x-ImGui::GetStyle().ItemSpacing.x*2-ImGui::GetFontSize(); + float avail=ImGui::GetContentRegionAvail().x; float halfAvail=(avail-ImGui::GetStyle().ItemSpacing.x)*0.5; ImGui::SetNextItemWidth(halfAvail); float setHz=tempoView?e->curSubSong->hz*2.5:e->curSubSong->hz; @@ -162,37 +161,6 @@ void FurnaceGUI::drawSpeed(bool asChild) { } } } - ImGui::SameLine(); - ImGui::Button(ICON_FA_CALCULATOR "##grooveCalc"); - if (ImGui::BeginPopupContextItem("##grooveCalc", ImGuiPopupFlags_MouseButtonLeft)) { - ImGui::InputDouble("Desired BPM", &desBpm); - if (ImGui::Button("OK")) {; - e->lockEngine([this]() { - unsigned char* out=e->curSubSong->speeds.val; - memset(out, 0, 16*sizeof(char)); - double calcBpm=0, tickTrack=0; - int len=0; - while (len<16) { - if (fabs(desBpm-calcBpm)<2.2204460492503130808472633361816e-12) break; - double noteTime=(1.0/(desBpm/60.0))/e->curSubSong->hilightA; - double noteTick=noteTime*e->curSubSong->hz; - tickTrack+=noteTick; - int totalNum=0; - for (int i=0; icurSubSong->hz)*e->curSubSong->hilightA); - } - e->curSubSong->speeds.len=len; - }); - if (e->isPlaying()) play(); - MARK_MODIFIED; - ImGui::CloseCurrentPopup(); - } - ImGui::EndPopup(); - } - avail=ImGui::GetContentRegionAvail().x; - halfAvail=(avail-ImGui::GetStyle().ItemSpacing.x)*0.5; ImGui::TableNextRow(); ImGui::TableNextColumn();