mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-05 21:39:47 -06:00
Handle failure of OpenGL context creation (#2172)
This commit is contained in:
@ -841,7 +841,15 @@ void MainWindow::createScreenPanel()
|
||||
|
||||
panel = panelGL;
|
||||
|
||||
panelGL->createContext();
|
||||
// Check that creating the context hasn't failed
|
||||
if (panelGL->createContext() == false)
|
||||
{
|
||||
Log(LogLevel::Error, "Failed to create OpenGL context, falling back to Software Renderer.\n");
|
||||
hasOGL = false;
|
||||
|
||||
globalCfg.SetBool("Screen.UseGL", false);
|
||||
globalCfg.SetInt("3D.Renderer", renderer3D_Software);
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasOGL)
|
||||
|
Reference in New Issue
Block a user