Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@ if(LIBVIRTUALDISPLAY_ENABLE_FRAME_TRANSPORT)
endif()

if(WIN32)
target_link_libraries(${MODULE} PRIVATE setupapi d3d11 dxgi)
if(MINGW)
# MinGW ships CompareObjectHandles in libonecore.a, not libkernelbase.a.
target_link_libraries(${MODULE} PRIVATE onecore)
else()
target_link_libraries(${MODULE} PRIVATE kernelbase)
endif()
# The Windows SDK and MinGW both provide CompareObjectHandles through OneCore.
target_link_libraries(${MODULE} PRIVATE setupapi d3d11 dxgi onecore)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand Down
13 changes: 12 additions & 1 deletion src/driver/windows_driver/driver_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3443,7 +3443,18 @@ namespace {
}
}

auto find_current_monitor_locked(const std::uint64_t display_id, const IDDCX_MONITOR monitor) {
/**
* @brief Find the current record for an IddCx monitor handle.
*
* @param display_id Display identifier associated with the handle.
* @param monitor IddCx monitor handle to match.
* @return The matching record, or the end iterator if the handle is stale or unknown.
* @pre The caller holds the monitor mutex.
*/
std::map<std::uint64_t, MonitorRecord>::iterator find_current_monitor_locked(
const std::uint64_t display_id,
const IDDCX_MONITOR monitor
) {
const auto record = monitors_.find(display_id);
if (record == monitors_.end() || record->second.monitor != monitor) {
return monitors_.end();
Expand Down
Loading