mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-30 17:25:22 +02:00
Full Screen Fix.
This commit is contained in:
parent
468f00dc39
commit
2243f58fbc
@ -41,9 +41,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Pokemon3D.ico" />
|
<Content Include="Pokemon3D.ico" />
|
||||||
<Content Include="Pokemon\Items\_itemList.txt">
|
<Content Include="Pokemon\Items\_itemList.txt" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Reference Include="OpenTK">
|
<Reference Include="OpenTK">
|
||||||
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
|
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -83,8 +83,8 @@
|
|||||||
fileName = .Year & "-" & month & "-" & day & "_" & hour & "." & minute & "." & second & ".png"
|
fileName = .Year & "-" & month & "-" & day & "_" & hour & "." & minute & "." & second & ".png"
|
||||||
End With
|
End With
|
||||||
|
|
||||||
If System.IO.Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
If Directory.Exists(GameController.GamePath & "\screenshots\") = False Then
|
||||||
System.IO.Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
Directory.CreateDirectory(GameController.GamePath & "\screenshots\")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Core.GraphicsManager.IsFullScreen = False Then
|
If Core.GraphicsManager.IsFullScreen = False Then
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
Core.GraphicsDevice.SetRenderTarget(Nothing)
|
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)
|
screenshot.SaveAsPng(stream, Core.windowSize.Width, Core.windowSize.Height)
|
||||||
stream.Dispose()
|
stream.Dispose()
|
||||||
End If
|
End If
|
||||||
@ -116,11 +116,21 @@
|
|||||||
|
|
||||||
Private Shared Sub ToggleFullScreen()
|
Private Shared Sub ToggleFullScreen()
|
||||||
If Core.GraphicsManager.IsFullScreen = False Then
|
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.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
|
||||||
Core.GraphicsManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
|
Core.GraphicsManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
|
||||||
Core.windowSize = New Rectangle(0, 0, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, 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()
|
Core.GraphicsManager.ToggleFullScreen()
|
||||||
|
|
||||||
@ -130,7 +140,7 @@
|
|||||||
Core.GraphicsManager.PreferredBackBufferHeight = 680
|
Core.GraphicsManager.PreferredBackBufferHeight = 680
|
||||||
Core.windowSize = New Rectangle(0, 0, 1200, 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()
|
Core.GraphicsManager.ToggleFullScreen()
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
Shared _valid As Boolean = False
|
Shared _valid As Boolean = False
|
||||||
|
|
||||||
Const RUNVALIDATION As Boolean = False
|
Const RUNVALIDATION As Boolean = False
|
||||||
Const EXPECTEDSIZE As Integer = 42393009
|
Const EXPECTEDSIZE As Integer = 42393016
|
||||||
Const METAHASH As String = "MzMwN0I2QTAwQzVFMTYzRjZEM0ZFMjAwQURBQzBBM0E="
|
Const METAHASH As String = "QkMyMEE2NEQxMDI3MDE1NkUzRjEzOEY5RDExRTk2RDU="
|
||||||
|
|
||||||
Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean
|
Public Shared ReadOnly Property IsValid(ByVal ForceResult As Boolean) As Boolean
|
||||||
Get
|
Get
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user