@@ -68,7 +68,7 @@ int MainApplication::run() {
6868 });
6969 m_captureAreaWindow.emplace (CaptureAreaWindow::Args{
7070 .windowClass = m_mainThread.windowClass (),
71- .rect = operatonModeLens ().captureAreaRect (),
71+ .rect = operationModeLens ().captureAreaRect (),
7272 });
7373 m_duplicationController.emplace (DuplicationController::Args{
7474 .windowClass = m_mainThread.windowClass (),
@@ -100,10 +100,10 @@ void MainApplication::changeOperationMode(OperationMode operationMode) {
100100 if (m_state.config .operationMode != operationMode) {
101101 m_state.config .operationMode = operationMode;
102102 if (m_outputWindow) m_outputWindow->updateOperationMode (operationMode);
103- if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
103+ if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
104104 if (m_duplicationController) {
105- m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
106- m_duplicationController->updateOutputZoom (operatonModeLens ().outputZoom ());
105+ m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
106+ m_duplicationController->updateOutputZoom (operationModeLens ().outputZoom ());
107107 }
108108 if (operationMode == OperationMode::CaptureArea) {
109109 m_state.outputMonitor = m_state.config .captureMonitor ;
@@ -130,9 +130,9 @@ void MainApplication::updateScreenRect(Rect rect) {
130130 if (m_state.captureMonitorRect != rect) {
131131 m_state.captureMonitorRect = rect;
132132 if (config ().operationMode == OperationMode::PresentMirror && m_captureAreaWindow)
133- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
133+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
134134 if (config ().operationMode == OperationMode::CaptureArea && m_duplicationController)
135- m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
135+ m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
136136 }
137137}
138138
@@ -155,14 +155,14 @@ void MainApplication::updateOutputRect(Rect rect) {
155155 if (m_outputWindow) m_outputWindow->updateRect (m_state.config .outputRect ());
156156 if (config ().operationMode == OperationMode::PresentMirror) {
157157 if (dimensionChanged && m_captureAreaWindow)
158- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
158+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
159159 }
160160 if (dimensionChanged && m_duplicationController)
161161 m_duplicationController->updateOutputDimension (m_state.config .outputDimension );
162162 if (config ().operationMode == OperationMode::CaptureArea) {
163- if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
163+ if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
164164 if (topLeftChanged && m_duplicationController)
165- m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
165+ m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
166166
167167 updateCaptureAreaOutputScreen ();
168168 }
@@ -173,7 +173,7 @@ void MainApplication::resizeOutputWindow(Dimension dimension, bool isMaximized)
173173 if (m_state.config .outputDimension != dimension) {
174174 m_state.config .outputDimension = dimension;
175175 if (m_outputWindow) m_outputWindow->updateRect (m_state.config .outputRect ());
176- if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
176+ if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
177177 if (m_duplicationController) m_duplicationController->updateOutputDimension (m_state.config .outputDimension );
178178 }
179179 if (m_state.outputMaximized != isMaximized) {
@@ -193,9 +193,9 @@ void MainApplication::moveOutputWindowTo(Point topLeft) {
193193 // note: on maximize the is triggered wrongly
194194 // if (m_outputWindow) m_outputWindow->updateRect(m_state.config.outputRect());
195195 if (config ().operationMode == OperationMode::CaptureArea) {
196- if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
196+ if (m_captureAreaWindow) m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
197197 if (m_duplicationController)
198- m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
198+ m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
199199
200200 updateCaptureAreaOutputScreen ();
201201 }
@@ -207,26 +207,26 @@ void MainApplication::moveCaptureOffsetByScreen(int dx, int dy) {
207207 if (dx != 0 || dy != 0 ) {
208208 m_state.config .captureOffset .x += static_cast <float >(dx) / m_state.config .outputZoom ;
209209 m_state.config .captureOffset .y += static_cast <float >(dy) / m_state.config .outputZoom ;
210- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
211- if (m_duplicationController) m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
210+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
211+ if (m_duplicationController) m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
212212 }
213213}
214214
215215void MainApplication::resetOutputZoom () {
216216 if (config ().operationMode != OperationMode::PresentMirror) return ; // not used in this mode
217217 if (m_state.config .outputZoom != 1 .0f ) {
218218 m_state.config .outputZoom = 1 .0f ;
219- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
220- if (m_duplicationController) m_duplicationController->updateOutputZoom (operatonModeLens ().outputZoom ());
219+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
220+ if (m_duplicationController) m_duplicationController->updateOutputZoom (operationModeLens ().outputZoom ());
221221 }
222222}
223223
224224void MainApplication::zoomOutputBy (float delta) {
225225 if (config ().operationMode != OperationMode::PresentMirror) return ; // not used in this mode
226226 if (delta >= 0 .0001f || delta <= 0 .0001f ) {
227227 m_state.config .outputZoom += delta;
228- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
229- if (m_duplicationController) m_duplicationController->updateOutputZoom (operatonModeLens ().outputZoom ());
228+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
229+ if (m_duplicationController) m_duplicationController->updateOutputZoom (operationModeLens ().outputZoom ());
230230 }
231231}
232232
@@ -242,10 +242,10 @@ void MainApplication::zoomOutputAt(Point point, float delta) {
242242 m_state.config .outputZoom += delta;
243243 m_state.config .captureOffset .x -= offsetPoint.x - static_cast <float >(mx) / m_state.config .outputZoom ;
244244 m_state.config .captureOffset .y -= offsetPoint.y - static_cast <float >(my) / m_state.config .outputZoom ;
245- m_captureAreaWindow->updateRect (operatonModeLens ().captureAreaRect ());
245+ m_captureAreaWindow->updateRect (operationModeLens ().captureAreaRect ());
246246 if (m_duplicationController) {
247- m_duplicationController->updateCaptureOffset (operatonModeLens ().captureOffset ());
248- m_duplicationController->updateOutputZoom (operatonModeLens ().outputZoom ());
247+ m_duplicationController->updateCaptureOffset (operationModeLens ().captureOffset ());
248+ m_duplicationController->updateOutputZoom (operationModeLens ().outputZoom ());
249249 }
250250 }
251251}
0 commit comments