- 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}")
|
||||
|
||||
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()
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Linux*")
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void DSoundInit::load()
|
|||
hr = ::CoInitialize(NULL);
|
||||
|
||||
//load the DirectSound DLL
|
||||
mRoutines.mInstance = ::LoadLibrary(L"dsound.dll");
|
||||
mRoutines.mInstance = ::LoadLibraryW(L"dsound.dll");
|
||||
if (!mRoutines.mInstance)
|
||||
throw std::logic_error("Cannot load dsound.dll");
|
||||
|
||||
|
|
@ -287,8 +287,8 @@ void XpEnumerator::open(int direction)
|
|||
int count = waveInGetNumDevs();
|
||||
for (int i=0; i<count; i++)
|
||||
{
|
||||
WAVEINCAPS caps;
|
||||
if (waveInGetDevCaps(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||
WAVEINCAPSW caps;
|
||||
if (waveInGetDevCapsW(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||
mNameList.push_back(caps.szPname);
|
||||
else
|
||||
mNameList.push_back(L"Bad device");
|
||||
|
|
@ -299,8 +299,8 @@ void XpEnumerator::open(int direction)
|
|||
int count = waveOutGetNumDevs();
|
||||
for (int i=0; i<count; i++)
|
||||
{
|
||||
WAVEOUTCAPS caps;
|
||||
if (waveOutGetDevCaps(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||
WAVEOUTCAPSW caps;
|
||||
if (waveOutGetDevCapsW(i, &caps, sizeof caps) == MMSYSERR_NOERROR)
|
||||
mNameList.push_back(caps.szPname);
|
||||
else
|
||||
mNameList.push_back(L"Bad device");
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ file(GLOB HELPER_LIB_SOURCES "*.cpp" "*.h")
|
|||
|
||||
add_library(helper_lib ${HELPER_LIB_SOURCES})
|
||||
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_Exception.h"
|
||||
|
||||
#ifdef TARGET_WIN
|
||||
#include <devguid.h>
|
||||
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
UsbChangeListener::UsbChangeListener()
|
||||
: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()
|
||||
|
|
@ -30,16 +31,16 @@ UsbChangeListener::Delegate* UsbChangeListener::getDelegate() const
|
|||
void UsbChangeListener::start()
|
||||
{
|
||||
// Exposing Window to Mixer
|
||||
WNDCLASSEX wcx;
|
||||
memset( &wcx, 0, sizeof(WNDCLASSEX) );
|
||||
wcx.cbSize = sizeof(WNDCLASSEX);
|
||||
WNDCLASSEXW wcx;
|
||||
memset( &wcx, 0, sizeof(WNDCLASSEXW) );
|
||||
wcx.cbSize = sizeof(WNDCLASSEXW);
|
||||
wcx.lpszClassName = mWindowClassName;
|
||||
wcx.lpfnWndProc = (WNDPROC)ADRWindowProc;
|
||||
::RegisterClassEx(&wcx);
|
||||
::RegisterClassExW(&wcx);
|
||||
|
||||
wchar_t windowname[128];
|
||||
wsprintf(windowname, ADR_WINDOW_NAME, rand());
|
||||
mHiddenWindow = CreateWindow( mWindowClassName,
|
||||
wsprintfW(windowname, ADR_WINDOW_NAME, rand());
|
||||
mHiddenWindow = CreateWindowW( mWindowClassName,
|
||||
windowname,
|
||||
WS_POPUP | WS_DISABLED,
|
||||
0, 0, 0, 0,
|
||||
|
|
@ -102,7 +103,7 @@ void UsbChangeListener::stop()
|
|||
::DestroyWindow(mHiddenWindow);
|
||||
mHiddenWindow = NULL;
|
||||
|
||||
::UnregisterClass(mWindowClassName, NULL);
|
||||
::UnregisterClassW(mWindowClassName, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue