mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-21 00:41:05 +00:00
vk: Support for the SDL 3.1.3 Preview release
https://github.com/yquake2/ref_vk/pull/51 https://github.com/yquake2/yquake2/issues/1156
This commit is contained in:
parent
e905ae1e09
commit
d9de3ea0df
1 changed files with 15 additions and 9 deletions
|
@ -1716,6 +1716,20 @@ static int RE_PrepareForWindow(void)
|
|||
return SDL_WINDOW_VULKAN;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
RE_GetSDLVersion(void)
|
||||
{
|
||||
#ifdef USE_SDL3
|
||||
int version = SDL_GetVersion();
|
||||
return SDL_VERSIONNUM_MAJOR(version);
|
||||
#else
|
||||
SDL_version ver;
|
||||
SDL_VERSION(&ver);
|
||||
return ver.major;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
GetRefAPI
|
||||
|
@ -1726,18 +1740,10 @@ GetRefAPI(refimport_t imp)
|
|||
{
|
||||
refexport_t refexport = {0};
|
||||
|
||||
// Need to communicate the SDL major version to the client.
|
||||
#ifdef USE_SDL3
|
||||
SDL_Version ver;
|
||||
#else
|
||||
SDL_version ver;
|
||||
#endif
|
||||
SDL_VERSION(&ver);
|
||||
|
||||
ri = imp;
|
||||
|
||||
refexport.api_version = API_VERSION;
|
||||
refexport.framework_version = ver.major;
|
||||
refexport.framework_version = RE_GetSDLVersion();
|
||||
|
||||
refexport.BeginRegistration = RE_BeginRegistration;
|
||||
refexport.RegisterModel = RE_RegisterModel;
|
||||
|
|
Loading…
Reference in a new issue