Auto-change rendering backend when Iris is present
This commit is contained in:
@@ -376,14 +376,11 @@ public abstract class AbstractModInitializer
|
|||||||
// Iris only supports native OpenGL
|
// Iris only supports native OpenGL
|
||||||
if (renderApi != EDhApiRenderApi.OPEN_GL)
|
if (renderApi != EDhApiRenderApi.OPEN_GL)
|
||||||
{
|
{
|
||||||
String irisUnsupportedMessage = "Iris doesn't support DH when using the ["+EDhApiRenderApi.BLAZE_3D+"] rendering API, this will need to be fixed on Iris end. As a temporary fix please change the rendering API to ["+EDhApiRenderApi.OPEN_GL+"] in the DH config file.";
|
String irisUnsupportedMessage = "Iris does not support DH when using the [" + EDhApiRenderApi.BLAZE_3D + "] rendering API, this will need to be fixed on Iris end.\nRendering API will be auto-changed to [" + EDhApiRenderApi.OPEN_GL + "].";
|
||||||
LOGGER.fatal(irisUnsupportedMessage);
|
LOGGER.error(irisUnsupportedMessage);
|
||||||
NativeDialogUtil.showDialog(ModInfo.READABLE_NAME, irisUnsupportedMessage, "ok", "error");
|
NativeDialogUtil.showDialog(ModInfo.READABLE_NAME, irisUnsupportedMessage, "ok", "warning");
|
||||||
|
|
||||||
IMinecraftClientWrapper mc = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
|
Config.Client.Advanced.Graphics.Experimental.renderingApi.set(EDhApiRenderApi.OPEN_GL);
|
||||||
String errorMessage = "loading Distant Horizons. "+irisUnsupportedMessage;
|
|
||||||
String exceptionError = "Distant Horizons conditional mod config Exception";
|
|
||||||
mc.crashMinecraft(errorMessage, new Exception(exceptionError));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user