diff --git a/src/internal/platform_backend.h b/src/internal/platform_backend.h index de0f583..0f2b09f 100644 --- a/src/internal/platform_backend.h +++ b/src/internal/platform_backend.h @@ -114,9 +114,7 @@ namespace Blah void gl_context_make_current(void* context); void gl_context_destroy(void* context); -#if _WIN32 // D3D11 Methods void* d3d11_get_hwnd(); -#endif } } \ No newline at end of file diff --git a/src/internal/platform_backend_sdl2.cpp b/src/internal/platform_backend_sdl2.cpp index 94216f1..84dcf14 100644 --- a/src/internal/platform_backend_sdl2.cpp +++ b/src/internal/platform_backend_sdl2.cpp @@ -649,13 +649,16 @@ void PlatformBackend::gl_context_destroy(void* context) SDL_GL_DeleteContext(context); } -#if _WIN32 void* PlatformBackend::d3d11_get_hwnd() { +#if _WIN32 SDL_SysWMinfo info; SDL_VERSION(&info.version); SDL_GetWindowWMInfo(window, &info); return info.info.win.window; -} +#else + return nullptr; #endif +} + #endif // BLAH_USE_SDL2