Commit: 2d432d9c8a21a262f93edc6498179cdf93dc4eda Author: Nicholas Rishel Date: Tue Jun 15 16:15:06 2021 -0700 Branches: wintab-high-frequency https://developer.blender.org/rB2d432d9c8a21a262f93edc6498179cdf93dc4eda
Remove autos, remove assignment as conditions. =================================================================== M intern/ghost/intern/GHOST_SystemWin32.cpp M intern/ghost/intern/GHOST_Wintab.cpp =================================================================== diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 214af4d70ad..95e77cdd890 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1528,28 +1528,34 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, case SC_KEYMENU: eventHandled = true; break; - case SC_RESTORE: + case SC_RESTORE: { ::ShowWindow(hwnd, SW_RESTORE); window->setState(window->getState()); - if (auto wt = window->getWintab()) { + GHOST_Wintab *wt = window->getWintab(); + if (wt) { wt->enable(); } eventHandled = true; break; - case SC_MAXIMIZE: - if (auto wt = window->getWintab()) { + } + case SC_MAXIMIZE: { + GHOST_Wintab *wt = window->getWintab(); + if (wt) { wt->enable(); } /* Don't report event as handled so that default handling occurs. */ break; - case SC_MINIMIZE: - if (auto wt = window->getWintab()) { + } + case SC_MINIMIZE: { + GHOST_Wintab *wt = window->getWintab(); + if (wt) { wt->disable(); } /* Don't report event as handled so that default handling occurs. */ break; + } } break; //////////////////////////////////////////////////////////////////////// diff --git a/intern/ghost/intern/GHOST_Wintab.cpp b/intern/ghost/intern/GHOST_Wintab.cpp index 1ec63520c78..b1e3938af66 100644 --- a/intern/ghost/intern/GHOST_Wintab.cpp +++ b/intern/ghost/intern/GHOST_Wintab.cpp @@ -373,7 +373,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo) while (buttonsChanged) { if (buttonsChanged & 1) { /* Find the index for the changed button from the button map. */ - auto button = mapWintabToGhostButton(pkt.pkCursor, buttonIndex); + GHOST_TButtonMask button = mapWintabToGhostButton(pkt.pkCursor, buttonIndex); if (button != GHOST_kButtonMaskNone) { /* Extend output if multiple buttons are pressed. We don't extend input until we confirm @@ -381,7 +381,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo) if (buttons > 0) { outWintabInfo.resize(outWintabInfo.size() + 1); outExtent++; - auto &out = outWintabInfo[i + outExtent]; + GHOST_WintabInfoWin32 &out = outWintabInfo[i + outExtent]; out = buttonRef; } buttons++; @@ -450,7 +450,7 @@ void GHOST_Wintab::mapWintabToSysCoordinates(LONG x_in, LONG y_in, int &x_out, i * Out = (abs(InExtent) - (In - OutOrgin)) * abs(OutExtent) / abs(InExtent) + OutOrgin */ - auto &tab = m_tabletCoord, &sys = m_systemCoord; + Coord &tab = m_tabletCoord, &sys = m_systemCoord; if ((tab.ext[0] < 0) == (sys.ext[0] < 0)) { x_out = (x_in - tab.org[0]) * abs(sys.ext[0]) / abs(tab.ext[0]) + sys.org[0]; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs