mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- implement backend switcher for Windows. NYD: Still needs to be done for Mac and Linux
This commit is contained in:
parent
879aae1bd3
commit
6be5769746
1 changed files with 12 additions and 3 deletions
|
@ -51,6 +51,15 @@
|
|||
|
||||
EXTERN_CVAR(Int, vid_maxfps)
|
||||
|
||||
CUSTOM_CVAR(Int, vid_backend, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
||||
{
|
||||
// [SP] This may seem pointless - but I don't want to implement live switching just
|
||||
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to
|
||||
// do it right without memory leaks
|
||||
|
||||
Printf("Changing the video backend requires a restart for " GAMENAME ".\n");
|
||||
}
|
||||
|
||||
extern HWND Window;
|
||||
|
||||
IVideo *Video;
|
||||
|
@ -127,7 +136,7 @@ void I_InitGraphics ()
|
|||
// are the active app. Huh?
|
||||
}
|
||||
|
||||
// if (vid_backend == 0)
|
||||
if (vid_backend == 0)
|
||||
{
|
||||
// first try Vulkan, if that fails OpenGL
|
||||
try
|
||||
|
@ -139,10 +148,10 @@ void I_InitGraphics ()
|
|||
Video = new Win32GLVideo();
|
||||
}
|
||||
}
|
||||
/*else
|
||||
else
|
||||
{
|
||||
Video = new Win32GLVideo();
|
||||
}*/
|
||||
}
|
||||
|
||||
if (Video == NULL)
|
||||
I_FatalError ("Failed to initialize display");
|
||||
|
|
Loading…
Reference in a new issue