Merge branch 'master' of https://github.com/tildearrow/furnace into ymf289b
This commit is contained in:
commit
5cea63753c
|
@ -265,6 +265,9 @@ if (USE_SDL2)
|
|||
if (MSVC)
|
||||
list(APPEND DEPENDENCIES_COMPILE_OPTIONS "/DHAVE_LIBC")
|
||||
endif()
|
||||
if (WIN32)
|
||||
list(APPEND DEPENDENCIES_LIBRARIES SDL2main)
|
||||
endif()
|
||||
message(STATUS "Using vendored SDL2")
|
||||
endif()
|
||||
else()
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -230,7 +230,7 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
if (chan[i].std.pitch.had) {
|
||||
if (chan[i].std.pitch.mode) {
|
||||
chan[i].pitch2+=chan[i].std.pitch.val;
|
||||
CLAMP_VAR(chan[i].pitch2,-32768,32767);
|
||||
CLAMP_VAR(chan[i].pitch2,-1048575,1048575);
|
||||
} else {
|
||||
chan[i].pitch2=chan[i].std.pitch.val;
|
||||
}
|
||||
|
@ -244,6 +244,7 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_PCE);
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||
if (chan[i].freq<0) chan[i].freq=0;
|
||||
if (chan[i].freq>1048575) chan[i].freq=1048575;
|
||||
if (chan[i].keyOn) {
|
||||
}
|
||||
|
|
|
@ -707,11 +707,11 @@ const void* DivPlatformQSound::getSampleMem(int index) {
|
|||
}
|
||||
|
||||
size_t DivPlatformQSound::getSampleMemCapacity(int index) {
|
||||
return index == 0 ? 16777216 : index == 1 ? MAX(0,16777216 - sampleMemUsage) : 0;
|
||||
return index == 0 ? 16777216 : index == 1 ? (sampleMemUsage>=16777216?1:(16777216 - sampleMemUsage)) : 0;
|
||||
}
|
||||
|
||||
size_t DivPlatformQSound::getSampleMemUsage(int index) {
|
||||
return index == 0 ? sampleMemLen : index == 1 ? MAX(0,sampleMemLenBS - sampleMemUsage) : 0;
|
||||
return index == 0 ? sampleMemLen : index == 1 ? ((sampleMemUsage>=sampleMemLenBS)?0:(sampleMemLenBS - sampleMemUsage)) : 0;
|
||||
}
|
||||
|
||||
bool DivPlatformQSound::isSampleLoaded(int index, int sample) {
|
||||
|
|
|
@ -5148,7 +5148,12 @@ bool FurnaceGUI::loop() {
|
|||
renderTimeDelta=renderTimeEnd-renderTimeBegin;
|
||||
eventTimeDelta=eventTimeEnd-eventTimeBegin;
|
||||
|
||||
if (--soloTimeout<0) soloTimeout=0;
|
||||
soloTimeout-=ImGui::GetIO().DeltaTime;
|
||||
if (soloTimeout<0) {
|
||||
soloTimeout=0;
|
||||
} else {
|
||||
WAKE_UP;
|
||||
}
|
||||
|
||||
wheelX=0;
|
||||
wheelY=0;
|
||||
|
@ -5784,7 +5789,6 @@ FurnaceGUI::FurnaceGUI():
|
|||
editStep(1),
|
||||
exportLoops(0),
|
||||
soloChan(-1),
|
||||
soloTimeout(0),
|
||||
orderEditMode(0),
|
||||
orderCursor(-1),
|
||||
loopOrder(-1),
|
||||
|
@ -5803,6 +5807,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
dragDestinationY(0),
|
||||
oldBeat(-1),
|
||||
oldBar(-1),
|
||||
soloTimeout(0.0f),
|
||||
exportFadeOut(5.0),
|
||||
editControlsOpen(true),
|
||||
ordersOpen(true),
|
||||
|
|
|
@ -1294,6 +1294,7 @@ class FurnaceGUI {
|
|||
int exportLoops;
|
||||
double exportFadeOut;
|
||||
int macroLayout;
|
||||
float doubleClickTime;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1428,6 +1429,7 @@ class FurnaceGUI {
|
|||
exportLoops(0),
|
||||
exportFadeOut(0.0),
|
||||
macroLayout(0),
|
||||
doubleClickTime(0.3f),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
@ -1447,9 +1449,10 @@ class FurnaceGUI {
|
|||
|
||||
DivInstrument* prevInsData;
|
||||
|
||||
int curIns, curWave, curSample, curOctave, curOrder, prevIns, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan, soloTimeout, orderEditMode, orderCursor;
|
||||
int curIns, curWave, curSample, curOctave, curOrder, prevIns, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan,orderEditMode, orderCursor;
|
||||
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory, latchTarget;
|
||||
int wheelX, wheelY, dragSourceX, dragSourceY, dragDestinationX, dragDestinationY, oldBeat, oldBar;
|
||||
float soloTimeout;
|
||||
|
||||
double exportFadeOut;
|
||||
|
||||
|
|
|
@ -755,7 +755,7 @@ void FurnaceGUI::drawPattern() {
|
|||
soloTimeout=0;
|
||||
} else {
|
||||
e->toggleMute(i);
|
||||
soloTimeout=20;
|
||||
soloTimeout=settings.doubleClickTime;
|
||||
soloChan=i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -367,7 +367,7 @@ int PlotCustomEx(ImGuiPlotType plot_type, const char* label, float (*values_gett
|
|||
if (plot_type == ImGuiPlotType_Lines)
|
||||
ImGui::SetTooltip("%d: %8.4g\n%d: %8.4g", v_idx, v0, v_idx + 1, v1);
|
||||
else if (plot_type == ImGuiPlotType_Histogram)
|
||||
ImGui::SetTooltip("%d: %8.4g", v_idx+values_display_offset, v0);
|
||||
ImGui::SetTooltip("%d: %d", v_idx+values_display_offset, (int)v0);
|
||||
}
|
||||
idx_hovered = v_idx;
|
||||
}
|
||||
|
|
|
@ -492,6 +492,13 @@ void FurnaceGUI::drawSettings() {
|
|||
|
||||
ImGui::Separator();
|
||||
|
||||
if (CWSliderFloat("Double-click time (seconds)",&settings.doubleClickTime,0.02,1.0,"%.2f")) {
|
||||
if (settings.doubleClickTime<0.02) settings.doubleClickTime=0.02;
|
||||
if (settings.doubleClickTime>1.0) settings.doubleClickTime=1.0;
|
||||
|
||||
applyUISettings(false);
|
||||
}
|
||||
|
||||
ImGui::Text("Toggle channel solo on:");
|
||||
if (ImGui::RadioButton("Right-click or double-click##soloA",settings.soloAction==0)) {
|
||||
settings.soloAction=0;
|
||||
|
@ -2557,6 +2564,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.exportLoops=e->getConfInt("exportLoops",0);
|
||||
settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0);
|
||||
settings.macroLayout=e->getConfInt("macroLayout",0);
|
||||
settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -2667,6 +2675,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.ordersCursor,0,1);
|
||||
clampSetting(settings.persistFadeOut,0,1);
|
||||
clampSetting(settings.macroLayout,0,4);
|
||||
clampSetting(settings.doubleClickTime,0.02,1.0);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -2870,6 +2879,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("exportLoops",settings.exportLoops);
|
||||
e->setConf("exportFadeOut",settings.exportFadeOut);
|
||||
e->setConf("macroLayout",settings.macroLayout);
|
||||
e->setConf("doubleClickTime",settings.doubleClickTime);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
@ -3444,6 +3454,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
|
|||
ImGui::GetIO().ConfigInputTrickleEventQueue=settings.eventDelay;
|
||||
ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly=settings.moveWindowTitle;
|
||||
ImGui::GetIO().ConfigInertialScrollToleranceSqr=pow(dpiScale*4.0f,2.0f);
|
||||
ImGui::GetIO().MouseDoubleClickTime=settings.doubleClickTime;
|
||||
|
||||
for (int i=0; i<256; i++) {
|
||||
ImVec4& base=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
||||
|
|
|
@ -613,7 +613,3 @@ int main(int argc, char** argv) {
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winMain.cpp"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue