From 2d5fcf8aca17ee3a801ba3d16c69b09b2389666d Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 27 Aug 2023 03:19:00 -0500 Subject: [PATCH 1/5] how could I not expose this compat flag --- src/gui/compatFlags.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/compatFlags.cpp b/src/gui/compatFlags.cpp index 0010fc89..efa88fee 100644 --- a/src/gui/compatFlags.cpp +++ b/src/gui/compatFlags.cpp @@ -184,6 +184,10 @@ void FurnaceGUI::drawCompatFlags() { if (ImGui::IsItemHovered()) { ImGui::SetTooltip("behavior changed in 0.6pre5"); } + ImGui::Checkbox("Pre-note does not take effects into consideration",&e->song.preNoteNoEffect); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("behavior changed in 0.6pre9"); + } ImGui::EndTabItem(); } if (ImGui::BeginTabItem(".mod import")) { From f53bc88242031eea909c2d6419d08b6f0e19a20a Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 27 Aug 2023 03:26:32 -0500 Subject: [PATCH 2/5] ES5506: make chan osc louder --- src/engine/platform/es5506.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/platform/es5506.cpp b/src/engine/platform/es5506.cpp index b25e6954..d5eb38a0 100644 --- a/src/engine/platform/es5506.cpp +++ b/src/engine/platform/es5506.cpp @@ -167,7 +167,7 @@ void DivPlatformES5506::acquire(short** buf, size_t len) { buf[(o<<1)|1][h]=es5506.rout(o); } for (int i=chanMax; i>=0; i--) { - oscBuf[i]->data[oscBuf[i]->needle++]=(es5506.voice_lout(i)+es5506.voice_rout(i))>>6; + oscBuf[i]->data[oscBuf[i]->needle++]=(es5506.voice_lout(i)+es5506.voice_rout(i))>>5; } } } From 0e19716dcd4a5c81f651b0625756d8247695e4f8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 27 Aug 2023 03:31:26 -0500 Subject: [PATCH 3/5] GUI: auto-detect scale factor on settings change --- src/gui/settings.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 4c70b5f2..348671bb 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -29,6 +29,7 @@ #include "IconsFontAwesome4.h" #include "furIcons.h" #include "misc/cpp/imgui_stdlib.h" +#include "scaling.h" #include #include @@ -4063,7 +4064,20 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { setupLabel(settings.emptyLabel.c_str(),emptyLabel,3); setupLabel(settings.emptyLabel2.c_str(),emptyLabel2,2); - if (settings.dpiScale>=0.5f) dpiScale=settings.dpiScale; + // get scale factor + const char* videoBackend=SDL_GetCurrentVideoDriver(); + if (settings.dpiScale>=0.5f) { + logD("setting UI scale factor from config (%f).",settings.dpiScale); + dpiScale=settings.dpiScale; + } else { + logD("auto-detecting UI scale factor."); + dpiScale=getScaleFactor(videoBackend); + logD("scale factor: %f",dpiScale); + if (dpiScale<0.1f) { + logW("scale what?"); + dpiScale=1.0f; + } + } // colors if (updateFonts) { From 64e6cf12c20e54e33532aa25aa4495c60dae70c2 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 27 Aug 2023 03:58:01 -0500 Subject: [PATCH 4/5] GUI: re-apply UI settings when displays are connec --- src/gui/gui.cpp | 11 +++++++++++ src/gui/gui.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 27ec53c9..1053f202 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -3520,10 +3520,12 @@ bool FurnaceGUI::loop() { case SDL_DISPLAYEVENT_CONNECTED: logD("display %d connected!",ev.display.display); updateWindow=true; + shallDetectScale=16; break; case SDL_DISPLAYEVENT_DISCONNECTED: logD("display %d disconnected!",ev.display.display); updateWindow=true; + shallDetectScale=16; break; case SDL_DISPLAYEVENT_ORIENTATION: logD("display oriented to %d",ev.display.data1); @@ -6115,6 +6117,14 @@ bool FurnaceGUI::loop() { willCommit=false; } + if (shallDetectScale) { + if (--shallDetectScale<1) { + if (settings.dpiScale<0.5f) { + applyUISettings(); + } + } + } + if (fontsFailed) { showError("it appears I couldn't load these fonts. any setting you can check?"); logE("couldn't load fonts"); @@ -6889,6 +6899,7 @@ FurnaceGUI::FurnaceGUI(): displayInsTypeListMakeInsSample(-1), mobileEditPage(0), wheelCalmDown(0), + shallDetectScale(0), mobileMenuPos(0.0f), autoButtonSize(0.0f), mobileEditAnim(0.0f), diff --git a/src/gui/gui.h b/src/gui/gui.h index 9f6b04b2..8fcf2bec 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1343,6 +1343,7 @@ class FurnaceGUI { int displayInsTypeListMakeInsSample; int mobileEditPage; int wheelCalmDown; + int shallDetectScale; float mobileMenuPos, autoButtonSize, mobileEditAnim; ImVec2 mobileEditButtonPos, mobileEditButtonSize; const int* curSysSection; From 440cbff5e41d30415d1bf66d01661ed88388e623 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 27 Aug 2023 04:14:50 -0500 Subject: [PATCH 5/5] GUI: update credits --- src/gui/about.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/about.cpp b/src/gui/about.cpp index c111be19..2151f5c6 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -203,6 +203,7 @@ const char* aboutLine[]={ "", "greetings to:", "NEOART Costa Rica", + "Xenium Demoparty", "all members of Deflers of Noice!", "", "copyright © 2021-2023 tildearrow",