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)
|
||||
return false;
|
||||
|
||||
return init(preferred_device);
|
||||
return init();
|
||||
}
|
||||
|
||||
bool Context::create_win32_surface(HINSTANCE hinstance, HWND hwnd)
|
||||
|
|
|
@ -89,7 +89,7 @@ bool EmuCanvasVulkan::createContext()
|
|||
|
||||
#ifdef _WIN32
|
||||
auto hwnd = (HWND)winId();
|
||||
if (!context->init_win32(nullptr, hwnd, config->display_device_index))
|
||||
if (!context->init_win32())
|
||||
goto fail;
|
||||
if (!context->create_win32_surface(nullptr, hwnd))
|
||||
goto fail;
|
||||
|
|
|
@ -62,7 +62,11 @@ bool CVulkan::Initialize(HWND hWnd)
|
|||
|
||||
try {
|
||||
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;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
|
@ -180,7 +184,7 @@ bool CVulkan::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
|
|||
|
||||
if (newWidth != current_width || newHeight != current_height)
|
||||
{
|
||||
context->recreate_swapchain(newWidth, newHeight);
|
||||
context->recreate_swapchain();
|
||||
context->wait_idle();
|
||||
current_width = newWidth;
|
||||
current_height = newHeight;
|
||||
|
|
Loading…
Reference in New Issue