diff options
| author | Konstantin <const@const.me> | 2023-01-18 19:55:25 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-18 19:55:25 +0100 |
| commit | ad097a744759c6a78e1b33ea9d2b4b2af01c529d (patch) | |
| tree | da738750a40790a2f2553b3ebce29b08027ea8df /Examples | |
| parent | 72b03a0d899e0de6a39be278b0efc31570cd7d59 (diff) | |
Consistent cancellation API across the library: S_OK = continue, S_FALSE = stop
Diffstat (limited to 'Examples')
| -rw-r--r-- | Examples/WhisperDesktop/CaptureDlg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Examples/WhisperDesktop/CaptureDlg.cpp b/Examples/WhisperDesktop/CaptureDlg.cpp index 3c22078..0bd86f7 100644 --- a/Examples/WhisperDesktop/CaptureDlg.cpp +++ b/Examples/WhisperDesktop/CaptureDlg.cpp @@ -442,8 +442,8 @@ LRESULT CaptureDlg::onThreadStatus( UINT nMessage, WPARAM wParam, LPARAM lParam, HRESULT __stdcall CaptureDlg::cbCancel( void* pv ) noexcept { - CaptureDlg& dialog = *(CaptureDlg*)pv; - return dialog.threadState.stopRequested ? S_OK : S_FALSE; + const bool stopRequested = ( (CaptureDlg*)pv )->threadState.stopRequested; + return stopRequested ? S_FALSE : S_OK; } HRESULT __stdcall CaptureDlg::cbStatus( void* pv, Whisper::eCaptureStatus status ) noexcept |
