mirror of https://github.com/snes9xgit/snes9x.git
win32: Don't allow Vulkan and OpenGL to be used in the same session.
This commit is contained in:
parent
5e02a77d59
commit
24cea1972c
|
@ -115,6 +115,8 @@ returns true if successful, false otherwise
|
||||||
*/
|
*/
|
||||||
bool WinDisplayReset(void)
|
bool WinDisplayReset(void)
|
||||||
{
|
{
|
||||||
|
static bool VulkanUsed = false;
|
||||||
|
static bool OpenGLUsed = false;
|
||||||
S9xDisplayOutput->DeInitialize();
|
S9xDisplayOutput->DeInitialize();
|
||||||
FlushMessageQueue();
|
FlushMessageQueue();
|
||||||
|
|
||||||
|
@ -129,10 +131,22 @@ bool WinDisplayReset(void)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case OPENGL:
|
case OPENGL:
|
||||||
|
if (VulkanUsed)
|
||||||
|
{
|
||||||
|
MessageBox(GUI.hWnd, TEXT("Changing to OpenGL requires a restart if you've already used Vulkan"), TEXT("Snes9x Display Driver"), MB_OK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
S9xDisplayOutput = &OpenGL;
|
S9xDisplayOutput = &OpenGL;
|
||||||
|
OpenGLUsed = true;
|
||||||
break;
|
break;
|
||||||
case VULKAN:
|
case VULKAN:
|
||||||
|
if (OpenGLUsed)
|
||||||
|
{
|
||||||
|
MessageBox(GUI.hWnd, TEXT("Changing to Vulkan requires a restart if you've already used OpenGL"), TEXT("Snes9x Display Driver"), MB_OK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
S9xDisplayOutput = &VulkanDriver;
|
S9xDisplayOutput = &VulkanDriver;
|
||||||
|
VulkanUsed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue