mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 06:20:24 +00:00
Some fixes for opening bfres without opengl enabled
This commit is contained in:
parent
0aaf6b97a3
commit
ee58bfcadb
1 changed files with 7 additions and 4 deletions
|
@ -99,11 +99,14 @@ namespace FirstPlugin.Forms
|
|||
stTabControl2.myBackColor = FormThemes.BaseTheme.FormBackColor;
|
||||
|
||||
//Always create an instance of the viewport unless opengl is disabled
|
||||
if (viewport == null && Runtime.UseOpenGL || viewport.IsDisposed && Runtime.UseOpenGL)
|
||||
if (Runtime.UseOpenGL)
|
||||
{
|
||||
viewport = new Viewport(ObjectEditor.GetDrawableContainers());
|
||||
viewport.Dock = DockStyle.Fill;
|
||||
viewport.DisplayAll = DisplayAll;
|
||||
if (viewport == null || (viewport != null && viewport.IsDisposed))
|
||||
{
|
||||
viewport = new Viewport(ObjectEditor.GetDrawableContainers());
|
||||
viewport.Dock = DockStyle.Fill;
|
||||
viewport.DisplayAll = DisplayAll;
|
||||
}
|
||||
}
|
||||
|
||||
//If the option is enabled by settings, and it has models display the viewport
|
||||
|
|
Loading…
Reference in a new issue