Full Screen Fix.
This commit is contained in:
parent
468f00dc39
commit
2243f58fbc
|
@ -41,9 +41,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Pokemon3D.ico" />
|
||||
<Content Include="Pokemon\Items\_itemList.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pokemon\Items\_itemList.txt" />
|
||||
<Reference Include="OpenTK">
|
||||
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -83,8 +83,8 @@
|
|||
fileName = .Year & "-" & month & "-" & day & "_" & hour & "." & minute & "." & second & ".png"
|
||||
End With
|
||||
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
||||
System.IO.Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
||||
If Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
||||
Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
||||
End If
|
||||
|
||||
If Core.GraphicsManager.IsFullScreen = False Then
|
||||
|
@ -102,7 +102,7 @@
|
|||
|
||||
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
||||
|
||||
Dim stream As System.IO.Stream = System.IO.File.OpenWrite(GameController.GamePath & "\screenshots\" & fileName)
|
||||
Dim stream As Stream = File.OpenWrite(GameController.GamePath & "\screenshots\" & fileName)
|
||||
screenshot.SaveAsPng(stream, Core.windowSize.Width, Core.windowSize.Height)
|
||||
stream.Dispose()
|
||||
End If
|
||||
|
@ -116,11 +116,21 @@
|
|||
|
||||
Private Shared Sub ToggleFullScreen()
|
||||
If Core.GraphicsManager.IsFullScreen = False Then
|
||||
' MonoGame Bug > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width != System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
|
||||
' MonoGame Bug > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height != System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
|
||||
' Temp Fix just in case someone else face this as well.
|
||||
If GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width <> System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width OrElse
|
||||
GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height <> System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height Then
|
||||
Core.GraphicsManager.PreferredBackBufferWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
|
||||
Core.GraphicsManager.PreferredBackBufferHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
|
||||
Core.windowSize = New Rectangle(0, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height)
|
||||
Else
|
||||
Core.GraphicsManager.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
|
||||
Core.GraphicsManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
|
||||
Core.windowSize = New Rectangle(0, 0, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height)
|
||||
End If
|
||||
|
||||
System.Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
|
||||
Core.GraphicsManager.ToggleFullScreen()
|
||||
|
||||
|
@ -130,7 +140,7 @@
|
|||
Core.GraphicsManager.PreferredBackBufferHeight = 680
|
||||
Core.windowSize = New Rectangle(0, 0, 1200, 680)
|
||||
|
||||
System.Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
Windows.Forms.Application.VisualStyleState = Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
|
||||
|
||||
Core.GraphicsManager.ToggleFullScreen()
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
Shared _valid As Boolean = False
|
||||
|
||||
Const RUNVALIDATION As Boolean = False
|
||||
Const EXPECTEDSIZE As Integer = 42393009
|
||||
Const METAHASH As String = "MzMwN0I2QTAwQzVFMTYzRjZEM0ZFMjAwQURBQzBBM0E="
|
||||
Const EXPECTEDSIZE As Integer = 42393016
|
||||
Const METAHASH As String = "QkMyMEE2NEQxMDI3MDE1NkUzRjEzOEY5RDExRTk2RDU="
|
||||
|
||||
Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean
|
||||
Get
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue