Max Kellermann
9c19368fc7
Merge branch 'v0.23.x'
2023-06-02 14:36:02 +02:00
Shen-Ta Hsieh
bcb393628e
win32/ComWorker: rename variable name to prevent ambiguous
2023-06-02 14:22:11 +02:00
Max Kellermann
b773ef3f0f
win32/HResult: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
42f6a0441c
use [[gnu::...]] attributes
2023-03-06 16:14:15 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
76177dbc79
win32/HResult: use [[gnu::const]]
2023-01-23 15:35:36 +01:00
Max Kellermann
6cc532c9a0
win32/HResult: remove unused function FormatHResultError()
2023-01-23 15:35:36 +01:00
Max Kellermann
debac0dfd4
win32/ComWorker: use std::queue/Mutex/Cond instead of boost::lockfree::spsc_queue/WinEvent
2023-01-23 13:25:07 +01:00
Max Kellermann
96ae659fdf
system/FmtError: new library
...
Replaces the Format*() functions in system/Error.hxx.
2022-11-28 21:56:12 +01:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
184e8eca7c
win32/Win32Main: throw on error
2021-10-13 16:37:56 +02:00
Max Kellermann
0a8886704a
Main: move top-level exception handler to main()
...
Allows win32_main() to throw exceptions.
2021-10-13 16:37:34 +02:00
Max Kellermann
bcf0fdd3a8
meson.build: define NOUSER on Windows for lighter windows.h
...
A few exceptions are needed for sources which include COM header
(directly or indirectly).
This fixes lots of shadow warnings, see
https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:02:49 +02:00
Max Kellermann
a8f05a7efc
win32/HResult: un-inline HRESULTToString() to reduce header dependencies
2021-05-19 17:48:42 +02:00
Max Kellermann
a169a05e41
win32, ...: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-05-19 17:25:32 +02:00
Max Kellermann
d72263d28d
win32/HResult: support AUDCLNT_E_NOT_{INITIALIZED,STOPPED}
2021-03-08 22:57:44 +01:00
Max Kellermann
24a205a1aa
win32/HResult: try to use FormatMessage()
2021-03-08 22:54:46 +01:00
Max Kellermann
ec76583c33
win32/Com: add COINIT_DISABLE_OLE1DDE
...
MSDN documentation suggests always passing this flag to reduce
overhead for an "obsolete technology".
2021-03-08 14:03:33 +01:00
Max Kellermann
927f1e03a3
win32/Com: make COINIT_APARTMENTTHREADED the default constructor
2021-03-08 14:02:49 +01:00
Max Kellermann
f2c679cfec
win32/Com: remove the unused COINIT_MULTITHREADED constructor
2021-03-08 14:02:49 +01:00
Max Kellermann
6a75c48dba
win32/HResult: add MakeHResultError()
...
None of the current FormatHResultError() callers need the format string.
2021-03-08 13:46:36 +01:00
Max Kellermann
48bdd09f64
win32/ComWorker: fold class COMWorkerThread into class COMWorker
2021-03-07 18:22:59 +01:00
Max Kellermann
cf108c389f
win32/ComWorker: remove parameter passing from Async()
...
Parameters should better be captured. This removes some complexity
from Async().
2021-03-07 18:20:59 +01:00
Max Kellermann
90d97053a8
win32/ComWorker: make COMWorker a real class, no static members
2021-03-06 20:46:29 +01:00
Max Kellermann
9ff790b7bb
output/wasapi: move COM utilities to separate headers
2021-03-05 18:33:31 +01:00
Max Kellermann
ebc1fe2821
win32/ComPtr: operator*() returns reference
2021-03-05 17:39:48 +01:00
Max Kellermann
637cf8a039
win32/WinEvent: add default value to Wait()
2021-03-05 16:05:32 +01:00
Max Kellermann
2011a6e2ee
win32/WinEvent: un-inline the constructor
...
Reduce header dependencies.
2021-03-05 16:01:23 +01:00
Max Kellermann
a7e7312cca
win32/HResult: un-inline HResultCategory::message()
2021-03-05 13:40:40 +01:00
Max Kellermann
6b83fc6b57
win32/HResult: un-inline FormatHResultError()
...
Reduce header dependencies.
2021-03-05 13:40:38 +01:00
Max Kellermann
74f9e07151
win32/HResult: include cleanup
2021-03-05 13:40:37 +01:00
Max Kellermann
82a61ab3be
win32/meson.build: fix syntax error
2021-03-05 13:40:34 +01:00
Max Kellermann
54c1794cee
win32: build static library
...
Fixes linker failure on test/run_output.exe
2021-03-05 13:32:58 +01:00
Max Kellermann
932756efce
win32/ComWorker: fix the FormatHResultError() return type
...
Casting to std::runtime_error loses information (and prevents RVO).
2021-03-05 13:17:40 +01:00
Max Kellermann
7838265482
win32/ComWorker: remove debug log messages
2021-03-05 13:16:09 +01:00
Max Kellermann
b14b0e5634
win32/ComWorker: reorder includes
2021-03-05 13:15:45 +01:00
Max Kellermann
4d2d0e7bb8
win32/ComWorker: include cleanup
2021-03-05 13:15:21 +01:00
Shen-Ta Hsieh
b1d7567226
win32: Add ComWorker to run all COM function on same thread
2021-03-04 18:43:16 +01:00
Max Kellermann
5103eb3039
meson.build: compile Win32Main.cxx only on Windows
2021-03-04 18:43:00 +01:00
Shen-Ta Hsieh
0cccdcf9b2
src/win32: Add support for COINIT_APARTMENTTHREADED
2021-03-04 18:37:56 +01:00
Shen-Ta Hsieh
22b840c2f1
win32/Com: use if with init-statement
2021-03-04 18:37:35 +01:00
Shen-Ta Hsieh
7ef489e057
src/win32: run clang-format
2021-02-15 17:50:51 +01:00
Shen-Ta Hsieh
d9e5d5ff5b
src/win32: Add error message for NO_ERROR
2021-02-15 17:45:25 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Shen-Ta Hsieh
e5eac71d72
win32: add COM helper classes
2020-05-30 22:21:03 +08:00
Rosen Penev
97425d56e7
remove gcc_unused
...
[[maybe_unused]] (introduced in C++17) is standard C++.
https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
a139279575
Copyright year 2019
2019-06-17 11:17:30 +02:00
Max Kellermann
71a5c8b819
Main: allocate Instance on the stack
2019-05-29 21:22:25 +02:00
Max Kellermann
ce49d99c2f
check.h: remove obsolete header
...
Since we switched from autotools to Meson in commit
94592c1406
, we don't need to include
`config.h` early to properly enable large file support. Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.
This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00