Add a launch argument for full screen (#663)
* per user config should be .gitignored * add comment surrounding gitignore update * make it wildcard * add fullscreen to launch option struct * remove redundant forward declaration and use fullscreen launch option in main
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -433,3 +433,6 @@ build/*
|
|||||||
|
|
||||||
# Local saves
|
# Local saves
|
||||||
Minecraft.Client/Saves/
|
Minecraft.Client/Saves/
|
||||||
|
|
||||||
|
# Visual Studio Per-User Config
|
||||||
|
*.user
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<LastConfigDeployed>Debug</LastConfigDeployed>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -110,6 +110,7 @@ struct Win64LaunchOptions
|
|||||||
{
|
{
|
||||||
int screenMode;
|
int screenMode;
|
||||||
bool serverMode;
|
bool serverMode;
|
||||||
|
bool fullscreen;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void CopyWideArgToAnsi(LPCWSTR source, char* dest, size_t destSize)
|
static void CopyWideArgToAnsi(LPCWSTR source, char* dest, size_t destSize)
|
||||||
@@ -256,6 +257,8 @@ static Win64LaunchOptions ParseLaunchOptions()
|
|||||||
g_Win64MultiplayerPort = (int)port;
|
g_Win64MultiplayerPort = (int)port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (_wcsicmp(argv[i], L"-fullscreen") == 0)
|
||||||
|
options.fullscreen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalFree(argv);
|
LocalFree(argv);
|
||||||
@@ -1245,7 +1248,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Restore fullscreen state from previous session
|
// Restore fullscreen state from previous session
|
||||||
if (LoadFullscreenOption() && !g_isFullscreen)
|
if (LoadFullscreenOption() && !g_isFullscreen || launchOptions.fullscreen)
|
||||||
{
|
{
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user