aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
authorVincent Zhang <73851560+bootsareme@users.noreply.github.com>2026-03-05 23:54:30 -0500
committerGitHub <noreply@github.com>2026-03-05 22:54:30 -0600
commit73cc345f54b989aab39d05ad1b269a338771ab52 (patch)
tree15c54e8bd7322151ebc55ca58533d759e423585b /Minecraft.Client
parent5cbdf27b46e4ac23e441489c524b1f1aba88c269 (diff)
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
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/Minecraft.Client.vcxproj.user22
-rw-r--r--Minecraft.Client/Windows64/Windows64_Minecraft.cpp5
2 files changed, 4 insertions, 23 deletions
diff --git a/Minecraft.Client/Minecraft.Client.vcxproj.user b/Minecraft.Client/Minecraft.Client.vcxproj.user
deleted file mode 100644
index 24ca62f8..00000000
--- a/Minecraft.Client/Minecraft.Client.vcxproj.user
+++ /dev/null
@@ -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>
diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
index 2eef5f73..1146b86d 100644
--- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
+++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
@@ -110,6 +110,7 @@ struct Win64LaunchOptions
{
int screenMode;
bool serverMode;
+ bool fullscreen;
};
static void CopyWideArgToAnsi(LPCWSTR source, char* dest, size_t destSize)
@@ -256,6 +257,8 @@ static Win64LaunchOptions ParseLaunchOptions()
g_Win64MultiplayerPort = (int)port;
}
}
+ else if (_wcsicmp(argv[i], L"-fullscreen") == 0)
+ options.fullscreen = true;
}
LocalFree(argv);
@@ -1245,7 +1248,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
// Restore fullscreen state from previous session
- if (LoadFullscreenOption() && !g_isFullscreen)
+ if (LoadFullscreenOption() && !g_isFullscreen || launchOptions.fullscreen)
{
ToggleFullscreen();
}