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; } } } 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", 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")) { 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; diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 8b09ac96..109526ad 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 @@ -4088,7 +4089,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) {