mirror of https://github.com/snes9xgit/snes9x.git
Vulkan/win32: Fix build errors.
This commit is contained in:
parent
febcf27482
commit
08403d47d1
|
@ -100,7 +100,7 @@ bool Context::init_win32()
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return init(preferred_device);
|
return init();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Context::create_win32_surface(HINSTANCE hinstance, HWND hwnd)
|
bool Context::create_win32_surface(HINSTANCE hinstance, HWND hwnd)
|
||||||
|
|
|
@ -89,7 +89,7 @@ bool EmuCanvasVulkan::createContext()
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
auto hwnd = (HWND)winId();
|
auto hwnd = (HWND)winId();
|
||||||
if (!context->init_win32(nullptr, hwnd, config->display_device_index))
|
if (!context->init_win32())
|
||||||
goto fail;
|
goto fail;
|
||||||
if (!context->create_win32_surface(nullptr, hwnd))
|
if (!context->create_win32_surface(nullptr, hwnd))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
@ -62,7 +62,11 @@ bool CVulkan::Initialize(HWND hWnd)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
context = std::make_unique<Vulkan::Context>();
|
context = std::make_unique<Vulkan::Context>();
|
||||||
if (!context->init_win32(0, hWnd))
|
if (!context->init_win32())
|
||||||
|
return false;
|
||||||
|
if (!context->create_win32_surface(0, hWnd))
|
||||||
|
return false;
|
||||||
|
if (!context->create_swapchain())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
|
@ -180,7 +184,7 @@ bool CVulkan::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
|
||||||
|
|
||||||
if (newWidth != current_width || newHeight != current_height)
|
if (newWidth != current_width || newHeight != current_height)
|
||||||
{
|
{
|
||||||
context->recreate_swapchain(newWidth, newHeight);
|
context->recreate_swapchain();
|
||||||
context->wait_idle();
|
context->wait_idle();
|
||||||
current_width = newWidth;
|
current_width = newWidth;
|
||||||
current_height = newHeight;
|
current_height = newHeight;
|
||||||
|
|
Loading…
Reference in New Issue