diff --git a/src/gui/editControls.cpp b/src/gui/editControls.cpp index 912bd1c09..a2014a30d 100644 --- a/src/gui/editControls.cpp +++ b/src/gui/editControls.cpp @@ -23,12 +23,16 @@ void FurnaceGUI::drawMobileControls() { if (ImGui::Begin("Mobile Controls",NULL,ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoScrollWithMouse|globalWinFlags)) { + ImGui::SetWindowPos(ImVec2(0.0f,0.0f)); + ImGui::SetWindowSize(portrait?ImVec2(scrW*dpiScale,0.1*scrW*dpiScale):ImVec2(0.1*scrH*dpiScale,scrH*dpiScale)); float availX=ImGui::GetContentRegionAvail().x; ImVec2 buttonSize=ImVec2(availX,availX); if (ImGui::Button(ICON_FA_CHEVRON_RIGHT "##MobileMenu",buttonSize)) { } + ImGui::Text("I put here"); + ImGui::Separator(); ImGui::PushStyleColor(ImGuiCol_Button,TOGGLE_COLOR(e->isPlaying())); diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 9bd20333c..c74f077f0 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -2595,24 +2595,24 @@ void FurnaceGUI::processPoint(SDL_Event& ev) { #define OOB_PIXELS_SAFETY 25 bool FurnaceGUI::detectOutOfBoundsWindow() { - int count = SDL_GetNumVideoDisplays(); - if(count < 1) { - logW("bounds check: error %s", SDL_GetError()); + int count=SDL_GetNumVideoDisplays(); + if (count<1) { + logW("bounds check: error %s",SDL_GetError()); return false; } SDL_Rect rect; - for(int i = 0;i < count;i ++) { - if(SDL_GetDisplayUsableBounds(i, &rect) != 0) { - logW("bounds check: error %s", SDL_GetError()); + for (int i=0; i= scrX; - bool ybound = (rect.y + OOB_PIXELS_SAFETY) <= (scrY + scrH) && (rect.y + rect.h - OOB_PIXELS_SAFETY) >= scrY; - logD("bounds check: display %d is at %dx%dx%dx%d: %s%s", i, rect.x + OOB_PIXELS_SAFETY, rect.y + OOB_PIXELS_SAFETY, rect.x + rect.w - OOB_PIXELS_SAFETY, rect.y + rect.h - OOB_PIXELS_SAFETY, xbound ? "x" : "", ybound ? "y" : ""); + bool xbound=((rect.x+OOB_PIXELS_SAFETY)<=(scrX+scrW)) && ((rect.x+rect.w-OOB_PIXELS_SAFETY)>=scrX); + bool ybound=((rect.y+OOB_PIXELS_SAFETY)<=(scrY+scrH)) && ((rect.y+rect.h-OOB_PIXELS_SAFETY)>=scrY); + logD("bounds check: display %d is at %dx%dx%dx%d: %s%s",i,rect.x+OOB_PIXELS_SAFETY,rect.y+OOB_PIXELS_SAFETY,rect.x+rect.w-OOB_PIXELS_SAFETY,rect.y+rect.h-OOB_PIXELS_SAFETY,xbound?"x":"",ybound?"y":""); - if(xbound && ybound) { + if (xbound && ybound) { return true; } } @@ -2746,6 +2746,7 @@ bool FurnaceGUI::loop() { scrW=ev.window.data1/dpiScale; scrH=ev.window.data2/dpiScale; #endif + portrait=(scrWgetConfInt("lastWindowX",SDL_WINDOWPOS_CENTERED); scrY=scrConfY=e->getConfInt("lastWindowY",SDL_WINDOWPOS_CENTERED); scrMax=e->getConfBool("lastWindowMax",false); + portrait=(scrWdisplaySize.w/dpiScale) scrW=(displaySize.w/dpiScale)-32; if (scrH>displaySize.h/dpiScale) scrH=(displaySize.h/dpiScale)-32; + portrait=(scrW sysSearchResults; std::vector newSongSearchResults; - bool quit, warnQuit, willCommit, edit, modified, displayError, displayExporting, vgmExportLoop, vgmExportPatternHints; + bool quit, warnQuit, willCommit, edit, modified, displayError, displayExporting, vgmExportLoop, vgmExportPatternHints, portrait; bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu; bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly; bool displayPendingIns, pendingInsSingle, displayPendingRawSample;