mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
Convert wgl_ctx into C - also take care of serious warning
This commit is contained in:
parent
c3851d42e6
commit
a4a027be67
@ -270,14 +270,21 @@ void create_graphics_context(HWND hwnd, bool *quit)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_VULKAN
|
#ifdef HAVE_VULKAN
|
||||||
RECT rect;
|
RECT rect;
|
||||||
unsigned width = rect.right - rect.left;
|
HINSTANCE instance;
|
||||||
unsigned height = rect.bottom - rect.top;
|
unsigned width = 0;
|
||||||
|
unsigned height = 0;
|
||||||
|
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
HINSTANCE instance = GetModuleHandle(NULL);
|
|
||||||
|
instance = GetModuleHandle(NULL);
|
||||||
|
width = rect.right - rect.left;
|
||||||
|
height = rect.bottom - rect.top;
|
||||||
|
|
||||||
if (!vulkan_surface_create(&win32_vk, VULKAN_WSI_WIN32,
|
if (!vulkan_surface_create(&win32_vk, VULKAN_WSI_WIN32,
|
||||||
&instance, &hwnd,
|
&instance, &hwnd,
|
||||||
width, height, win32_interval))
|
width, height, win32_interval))
|
||||||
*quit = true;
|
*quit = true;
|
||||||
|
|
||||||
g_inited = true;
|
g_inited = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
@ -165,6 +165,12 @@ VIDEO CONTEXT
|
|||||||
============================================================ */
|
============================================================ */
|
||||||
#include "../gfx/drivers_context/gfx_null_ctx.c"
|
#include "../gfx/drivers_context/gfx_null_ctx.c"
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
|
#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN)
|
||||||
|
#include "../gfx/drivers_context/wgl_ctx.c"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__CELLOS_LV2__)
|
#if defined(__CELLOS_LV2__)
|
||||||
#include "../gfx/drivers_context/ps3_ctx.c"
|
#include "../gfx/drivers_context/ps3_ctx.c"
|
||||||
#elif defined(ANDROID)
|
#elif defined(ANDROID)
|
||||||
|
@ -101,9 +101,6 @@ AUDIO
|
|||||||
UI COMMON CONTEXT
|
UI COMMON CONTEXT
|
||||||
============================================================ */
|
============================================================ */
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN)
|
|
||||||
#include "../gfx/drivers_context/wgl_ctx.cpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
#include "../gfx/drivers_context/gdi_ctx.cpp"
|
#include "../gfx/drivers_context/gdi_ctx.cpp"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user