Merge branch 'tildearrow:master' into guimprove

This commit is contained in:
Eknous 2023-08-27 15:05:50 +04:00 committed by GitHub
commit 7a87702518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 2 deletions

View File

@ -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;
}
}
}

View File

@ -203,6 +203,7 @@ const char* aboutLine[]={
"",
"greetings to:",
"NEOART Costa Rica",
"Xenium Demoparty",
"all members of Deflers of Noice!",
"",
"copyright © 2021-2023 tildearrow",

View File

@ -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")) {

View File

@ -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),

View File

@ -1343,6 +1343,7 @@ class FurnaceGUI {
int displayInsTypeListMakeInsSample;
int mobileEditPage;
int wheelCalmDown;
int shallDetectScale;
float mobileMenuPos, autoButtonSize, mobileEditAnim;
ImVec2 mobileEditButtonPos, mobileEditButtonSize;
const int* curSysSection;

View File

@ -29,6 +29,7 @@
#include "IconsFontAwesome4.h"
#include "furIcons.h"
#include "misc/cpp/imgui_stdlib.h"
#include "scaling.h"
#include <fmt/printf.h>
#include <imgui.h>
@ -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) {