- fixes
This commit is contained in:
parent
94d7471aec
commit
3102efaf4f
|
|
@ -66,7 +66,7 @@ set (OPENSSL_INCLUDE ${LIB_PLATFORM}/openssl/1.0/include)
|
||||||
message ("Using OpenSSL include files from ${OPENSSL_INCLUDE}")
|
message ("Using OpenSSL include files from ${OPENSSL_INCLUDE}")
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "Windows*")
|
if (CMAKE_SYSTEM MATCHES "Windows*")
|
||||||
add_definitions(-DTARGET_WIN)
|
add_definitions (-DTARGET_WIN -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "Linux*")
|
if (CMAKE_SYSTEM MATCHES "Linux*")
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ void DSoundInit::load()
|
||||||
hr = ::CoInitialize(NULL);
|
hr = ::CoInitialize(NULL);
|
||||||
|
|
||||||
//load the DirectSound DLL
|
//load the DirectSound DLL
|
||||||
mRoutines.mInstance = ::LoadLibrary(L"dsound.dll");
|
mRoutines.mInstance = ::LoadLibraryW(L"dsound.dll");
|
||||||
if (!mRoutines.mInstance)
|
if (!mRoutines.mInstance)
|
||||||
throw std::logic_error("Cannot load dsound.dll");
|
throw std::logic_error("Cannot load dsound.dll");
|
||||||
|
|
||||||
|
|
@ -287,8 +287,8 @@ void XpEnumerator::open(int direction)
|
||||||
int count = waveInGetNumDevs();
|
int count = waveInGetNumDevs();
|
||||||
for (int i=0; i<count; i++)
|
for (int i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
WAVEINCAPS caps;
|
WAVEINCAPSW caps;
|
||||||
if (waveInGetDevCaps(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
if (waveInGetDevCapsW(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||||
mNameList.push_back(caps.szPname);
|
mNameList.push_back(caps.szPname);
|
||||||
else
|
else
|
||||||
mNameList.push_back(L"Bad device");
|
mNameList.push_back(L"Bad device");
|
||||||
|
|
@ -299,8 +299,8 @@ void XpEnumerator::open(int direction)
|
||||||
int count = waveOutGetNumDevs();
|
int count = waveOutGetNumDevs();
|
||||||
for (int i=0; i<count; i++)
|
for (int i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
WAVEOUTCAPS caps;
|
WAVEOUTCAPSW caps;
|
||||||
if (waveOutGetDevCaps(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
if (waveOutGetDevCapsW(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||||
mNameList.push_back(caps.szPname);
|
mNameList.push_back(caps.szPname);
|
||||||
else
|
else
|
||||||
mNameList.push_back(L"Bad device");
|
mNameList.push_back(L"Bad device");
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@ file(GLOB HELPER_LIB_SOURCES "*.cpp" "*.h")
|
||||||
|
|
||||||
add_library(helper_lib ${HELPER_LIB_SOURCES})
|
add_library(helper_lib ${HELPER_LIB_SOURCES})
|
||||||
target_include_directories(helper_lib PRIVATE ../../libs/ ../../engine ../)
|
target_include_directories(helper_lib PRIVATE ../../libs/ ../../engine ../)
|
||||||
target_compile_definitions(helper_lib PRIVATE -D_CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(helper_lib PRIVATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#include "HL_Usb.h"
|
#include "HL_Usb.h"
|
||||||
#include "HL_Exception.h"
|
#include "HL_Exception.h"
|
||||||
|
|
||||||
#ifdef TARGET_WIN
|
#ifdef TARGET_WIN
|
||||||
#include <devguid.h>
|
#include <devguid.h>
|
||||||
|
|
||||||
|
|
@ -9,7 +10,7 @@
|
||||||
UsbChangeListener::UsbChangeListener()
|
UsbChangeListener::UsbChangeListener()
|
||||||
:mNotifyHandle(NULL), mHiddenWindow(NULL), mDelegate(NULL)
|
:mNotifyHandle(NULL), mHiddenWindow(NULL), mDelegate(NULL)
|
||||||
{
|
{
|
||||||
wsprintf(mWindowClassName, ADR_WINDOW_CLASS_NAME, (unsigned int)rand());
|
wsprintfW(mWindowClassName, ADR_WINDOW_CLASS_NAME, (unsigned int)rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
UsbChangeListener::~UsbChangeListener()
|
UsbChangeListener::~UsbChangeListener()
|
||||||
|
|
@ -30,16 +31,16 @@ UsbChangeListener::Delegate* UsbChangeListener::getDelegate() const
|
||||||
void UsbChangeListener::start()
|
void UsbChangeListener::start()
|
||||||
{
|
{
|
||||||
// Exposing Window to Mixer
|
// Exposing Window to Mixer
|
||||||
WNDCLASSEX wcx;
|
WNDCLASSEXW wcx;
|
||||||
memset( &wcx, 0, sizeof(WNDCLASSEX) );
|
memset( &wcx, 0, sizeof(WNDCLASSEXW) );
|
||||||
wcx.cbSize = sizeof(WNDCLASSEX);
|
wcx.cbSize = sizeof(WNDCLASSEXW);
|
||||||
wcx.lpszClassName = mWindowClassName;
|
wcx.lpszClassName = mWindowClassName;
|
||||||
wcx.lpfnWndProc = (WNDPROC)ADRWindowProc;
|
wcx.lpfnWndProc = (WNDPROC)ADRWindowProc;
|
||||||
::RegisterClassEx(&wcx);
|
::RegisterClassExW(&wcx);
|
||||||
|
|
||||||
wchar_t windowname[128];
|
wchar_t windowname[128];
|
||||||
wsprintf(windowname, ADR_WINDOW_NAME, rand());
|
wsprintfW(windowname, ADR_WINDOW_NAME, rand());
|
||||||
mHiddenWindow = CreateWindow( mWindowClassName,
|
mHiddenWindow = CreateWindowW( mWindowClassName,
|
||||||
windowname,
|
windowname,
|
||||||
WS_POPUP | WS_DISABLED,
|
WS_POPUP | WS_DISABLED,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
|
|
@ -102,7 +103,7 @@ void UsbChangeListener::stop()
|
||||||
::DestroyWindow(mHiddenWindow);
|
::DestroyWindow(mHiddenWindow);
|
||||||
mHiddenWindow = NULL;
|
mHiddenWindow = NULL;
|
||||||
|
|
||||||
::UnregisterClass(mWindowClassName, NULL);
|
::UnregisterClassW(mWindowClassName, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue