mirror of https://github.com/AxioDL/boo.git
Windows fixes
This commit is contained in:
parent
6950d96b46
commit
b7646f7f9a
|
@ -1129,7 +1129,7 @@ struct GLCommandQueue : IGraphicsCommandQueue
|
||||||
static void RenderingWorker(GLCommandQueue* self)
|
static void RenderingWorker(GLCommandQueue* self)
|
||||||
{
|
{
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
std::string thrName = WCSTMBS(APP->getFriendlyName().c_str()) + " GL Rendering Thread";
|
std::string thrName = WCSTMBS(APP->getFriendlyName().data()) + " GL Rendering Thread";
|
||||||
#else
|
#else
|
||||||
std::string thrName = std::string(APP->getFriendlyName()) + " GL Rendering Thread";
|
std::string thrName = std::string(APP->getFriendlyName()) + " GL Rendering Thread";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -75,7 +75,7 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
std::unique_lock<std::mutex> lk(device->m_initMutex);
|
std::unique_lock<std::mutex> lk(device->m_initMutex);
|
||||||
|
|
||||||
/* POSIX.. who needs it?? -MS */
|
/* POSIX.. who needs it?? -MS */
|
||||||
device->m_devHandle = CreateFileA(device->m_devPath.c_str(),
|
device->m_devHandle = CreateFileA(device->m_devPath.data(),
|
||||||
GENERIC_WRITE | GENERIC_READ,
|
GENERIC_WRITE | GENERIC_READ,
|
||||||
FILE_SHARE_WRITE | FILE_SHARE_READ,
|
FILE_SHARE_WRITE | FILE_SHARE_READ,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -85,8 +85,8 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
if (INVALID_HANDLE_VALUE == device->m_devHandle)
|
if (INVALID_HANDLE_VALUE == device->m_devHandle)
|
||||||
{
|
{
|
||||||
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
||||||
device->m_token.getProductName().c_str(),
|
device->m_token.getProductName().data(),
|
||||||
device->m_devPath.c_str(), GetLastError());
|
device->m_devPath.data(), GetLastError());
|
||||||
device->m_devImp->deviceError(errStr);
|
device->m_devImp->deviceError(errStr);
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
device->m_initCond.notify_one();
|
device->m_initCond.notify_one();
|
||||||
|
@ -96,8 +96,8 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
if (!WinUsb_Initialize(device->m_devHandle, &device->m_usbHandle))
|
if (!WinUsb_Initialize(device->m_devHandle, &device->m_usbHandle))
|
||||||
{
|
{
|
||||||
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
||||||
device->m_token.getProductName().c_str(),
|
device->m_token.getProductName().data(),
|
||||||
device->m_devPath.c_str(), GetLastError());
|
device->m_devPath.data(), GetLastError());
|
||||||
device->m_devImp->deviceError(errStr);
|
device->m_devImp->deviceError(errStr);
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
device->m_initCond.notify_one();
|
device->m_initCond.notify_one();
|
||||||
|
@ -110,8 +110,8 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
if (!WinUsb_QueryInterfaceSettings(device->m_usbHandle, 0, &ifDesc))
|
if (!WinUsb_QueryInterfaceSettings(device->m_usbHandle, 0, &ifDesc))
|
||||||
{
|
{
|
||||||
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
||||||
device->m_token.getProductName().c_str(),
|
device->m_token.getProductName().data(),
|
||||||
device->m_devPath.c_str(), GetLastError());
|
device->m_devPath.data(), GetLastError());
|
||||||
device->m_devImp->deviceError(errStr);
|
device->m_devImp->deviceError(errStr);
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
device->m_initCond.notify_one();
|
device->m_initCond.notify_one();
|
||||||
|
@ -177,7 +177,7 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
|
|
||||||
/* POSIX.. who needs it?? -MS */
|
/* POSIX.. who needs it?? -MS */
|
||||||
device->m_overlapped.hEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
|
device->m_overlapped.hEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
|
||||||
device->m_hidHandle = CreateFileA(device->m_devPath.c_str(),
|
device->m_hidHandle = CreateFileA(device->m_devPath.data(),
|
||||||
GENERIC_WRITE | GENERIC_READ,
|
GENERIC_WRITE | GENERIC_READ,
|
||||||
FILE_SHARE_WRITE | FILE_SHARE_READ,
|
FILE_SHARE_WRITE | FILE_SHARE_READ,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -187,8 +187,8 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
if (INVALID_HANDLE_VALUE == device->m_hidHandle)
|
if (INVALID_HANDLE_VALUE == device->m_hidHandle)
|
||||||
{
|
{
|
||||||
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
_snprintf(errStr, 256, "Unable to open %s@%s: %d\n",
|
||||||
device->m_token.getProductName().c_str(),
|
device->m_token.getProductName().data(),
|
||||||
device->m_devPath.c_str(), GetLastError());
|
device->m_devPath.data(), GetLastError());
|
||||||
device->m_devImp->deviceError(errStr);
|
device->m_devImp->deviceError(errStr);
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
device->m_initCond.notify_one();
|
device->m_initCond.notify_one();
|
||||||
|
@ -198,8 +198,8 @@ class HIDDeviceWinUSB final : public IHIDDevice
|
||||||
if (!HidD_GetPreparsedData(device->m_hidHandle, &device->m_preparsedData))
|
if (!HidD_GetPreparsedData(device->m_hidHandle, &device->m_preparsedData))
|
||||||
{
|
{
|
||||||
_snprintf(errStr, 256, "Unable get preparsed data of %s@%s: %d\n",
|
_snprintf(errStr, 256, "Unable get preparsed data of %s@%s: %d\n",
|
||||||
device->m_token.getProductName().c_str(),
|
device->m_token.getProductName().data(),
|
||||||
device->m_devPath.c_str(), GetLastError());
|
device->m_devPath.data(), GetLastError());
|
||||||
device->m_devImp->deviceError(errStr);
|
device->m_devImp->deviceError(errStr);
|
||||||
lk.unlock();
|
lk.unlock();
|
||||||
device->m_initCond.notify_one();
|
device->m_initCond.notify_one();
|
||||||
|
|
|
@ -375,7 +375,7 @@ public:
|
||||||
int clientReturn = 0;
|
int clientReturn = 0;
|
||||||
std::thread clientThread([&]()
|
std::thread clientThread([&]()
|
||||||
{
|
{
|
||||||
std::string thrName = WCSTMBS(getFriendlyName().c_str()) + " Client Thread";
|
std::string thrName = WCSTMBS(getFriendlyName().data()) + " Client Thread";
|
||||||
logvisor::RegisterThreadName(thrName.c_str());
|
logvisor::RegisterThreadName(thrName.c_str());
|
||||||
CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE);
|
CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE);
|
||||||
clientReturn = m_callback.appMain(this);
|
clientReturn = m_callback.appMain(this);
|
||||||
|
@ -486,7 +486,7 @@ int ApplicationRun(IApplication::EPlatformType platform,
|
||||||
const std::vector<SystemString>& args,
|
const std::vector<SystemString>& args,
|
||||||
bool singleInstance)
|
bool singleInstance)
|
||||||
{
|
{
|
||||||
std::string thrName = WCSTMBS(friendlyName.c_str()) + " Main Thread";
|
std::string thrName = WCSTMBS(friendlyName.data()) + " Main Thread";
|
||||||
logvisor::RegisterThreadName(thrName.c_str());
|
logvisor::RegisterThreadName(thrName.c_str());
|
||||||
if (APP)
|
if (APP)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -972,7 +972,7 @@ public:
|
||||||
|
|
||||||
WindowWin32(SystemStringView title, Boo3DAppContextWin32& b3dCtx, void* vulkanHandle, uint32_t sampleCount)
|
WindowWin32(SystemStringView title, Boo3DAppContextWin32& b3dCtx, void* vulkanHandle, uint32_t sampleCount)
|
||||||
{
|
{
|
||||||
m_hwnd = CreateWindowW(L"BooWindow", title.c_str(), WS_OVERLAPPEDWINDOW,
|
m_hwnd = CreateWindowW(L"BooWindow", title.data(), WS_OVERLAPPEDWINDOW,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
HINSTANCE wndInstance = HINSTANCE(GetWindowLongPtr(m_hwnd, GWLP_HINSTANCE));
|
HINSTANCE wndInstance = HINSTANCE(GetWindowLongPtr(m_hwnd, GWLP_HINSTANCE));
|
||||||
|
|
Loading…
Reference in New Issue