moving ifdefs into implementation

This commit is contained in:
Noel Berry 2021-01-02 20:46:42 -08:00
parent 7ce2d07153
commit ff4d4b1acb
2 changed files with 5 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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