Skip to content

Commit eb7ee41

Browse files
committed
Fix failing to create and initialize context
Add and link missing riffa driver translator library
1 parent 9e6be62 commit eb7ee41

File tree

8 files changed

+5
-5
lines changed

8 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ if (MSVC)
101101
set(LIBONI_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libONI/win64)
102102
target_link_libraries(${PLUGIN_NAME} "${LIBONI_LIB_DIR}/liboni.lib")
103103
target_link_libraries(${PLUGIN_NAME} "${LIBONI_LIB_DIR}/riffa.lib")
104-
install(FILES ${LIBONI_LIB_DIR}/liboni.dll DESTINATION ${GUI_BIN_DIR}/shared CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES})
105-
install(FILES ${LIBONI_LIB_DIR}/riffa.dll DESTINATION ${GUI_BIN_DIR}/shared CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES})
104+
target_link_libraries(${PLUGIN_NAME} "${LIBONI_LIB_DIR}/onidriver_riffa.lib")
105+
install(DIRECTORY ${LIBONI_LIB_DIR}/ DESTINATION ${GUI_BIN_DIR}/shared FILES_MATCHING PATTERN "*.dll")
106106
elseif(LINUX)
107107
find_library(LIBONI_LIBRARIES oni liboni PATHS ${CMAKE_CURRENT_SOURCE_DIR}/libONI/linux)
108108
target_link_libraries(${PLUGIN_NAME} ${LIBONI_LIBRARIES})

Source/OnixSource.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ void OnixSource::updateSettings(OwnedArray<ContinuousChannel>* continuousChannel
6666

6767
ctx = oni_create_ctx("riffa"); // "riffa" is the PCIe driver name
6868

69-
if (!ctx) { LOGD("Failed to create context."); return; }
69+
if (!ctx) { LOGE("Failed to create context."); return; }
7070

7171
// Initialize context and discover hardware
7272
int errorCode = oni_init_ctx(ctx, 0);
7373

74-
if (errorCode) { LOGD("Error: ", oni_error_str(errorCode)); return; }
74+
if (errorCode) { LOGE(oni_error_str(errorCode)); return; }
7575

7676
oni_size_t num_devs = 0;
7777
oni_device_t* devices = NULL;
@@ -82,7 +82,7 @@ void OnixSource::updateSettings(OwnedArray<ContinuousChannel>* continuousChannel
8282

8383
size_t devices_sz = sizeof(oni_device_t) * num_devs;
8484
devices = (oni_device_t *)realloc(devices, devices_sz);
85-
if (devices == NULL) { LOGD("No devices found."); return; }
85+
if (devices == NULL) { LOGE("No devices found."); return; }
8686
oni_get_opt(ctx, ONI_OPT_DEVICETABLE, devices, &devices_sz);
8787

8888
// print device info

libONI/win64/liboni.dll

41.5 KB
Binary file not shown.

libONI/win64/liboni.lib

0 Bytes
Binary file not shown.

libONI/win64/libonidriver_riffa.dll

64 KB
Binary file not shown.

libONI/win64/onidriver_riffa.lib

4.27 KB
Binary file not shown.

libONI/win64/riffa.dll

59.5 KB
Binary file not shown.

libONI/win64/riffa.lib

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)