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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build_type: macos-native-clang-x86_64
- build_host: macos-latest
build_type: macos-native-clang-arm64
- build_host: windows-latest
- build_host: windows-2022
build_type: windows-native-msvc-x64
env:
BUILD_TYPE: ${{ matrix.build_type }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ starting after version 4.0.12, but historic entries might not.

### Added

- Windows: Dynamically monitor ZCM1 and ZCM2 controller connections and disconnections
- macOS: Add build support for M1/Apple Silicon (Fixes #440)
- Linux/Debian: Force building tracker and test programs (Fixes #437)
- Added `psmove_tracker_opencv.h` for OpenCV-specific functions
Expand All @@ -24,6 +25,7 @@ starting after version 4.0.12, but historic entries might not.

### Changed

- Windows: `psmove pair -d` now waits for controller notifications instead of repeatedly rescanning
- CI: Migrate from Travis CI (macOS, Linux), and AppVeyor (Windows) to Github Actions
- Linux: Build OpenCV from source
- `CMakeLists.txt`: Add check for 'git submodule init' (Fixes #352)
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")

list(APPEND PSMOVEAPI_PLATFORM_SRC
${CMAKE_CURRENT_LIST_DIR}/platform/psmove_port_windows.c)

list(APPEND PSMOVEAPI_MOVED_SRC
${CMAKE_CURRENT_LIST_DIR}/daemon/moved_monitor_windows.cpp)
ELSE()
# Linux
find_package(PkgConfig REQUIRED)
Expand Down
26 changes: 18 additions & 8 deletions src/daemon/moved_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@



#include "psmove.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -54,17 +56,25 @@ typedef void (*moved_event_callback)(enum MonitorEvent event,

typedef struct _moved_monitor moved_monitor;

moved_monitor *
moved_monitor_new(moved_event_callback callback, void *user_data);
ADDAPI moved_monitor *
ADDCALL moved_monitor_new(moved_event_callback callback, void *user_data);

#ifdef _WIN32
// Block until Windows signals a device change or the fallback rescan is due.
// Call moved_monitor_poll() after this returns to process any controller
// additions or removals.
ADDAPI void
ADDCALL moved_monitor_wait(moved_monitor *monitor);
#endif

void
moved_monitor_poll(moved_monitor *monitor);
ADDAPI void
ADDCALL moved_monitor_poll(moved_monitor *monitor);

int
moved_monitor_get_fd(moved_monitor *monitor);
ADDAPI int
ADDCALL moved_monitor_get_fd(moved_monitor *monitor);

void
moved_monitor_free(moved_monitor *monitor);
ADDAPI void
ADDCALL moved_monitor_free(moved_monitor *monitor);

#ifdef __cplusplus
}
Expand Down
Loading
Loading