the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)

fix: fix resolution detection (#133)

* fix: fix UI skin/scene resolution mismatch and readd screen resolution detection

* fix: fix build in vs2022

authored by

daoge and committed by
GitHub
afa4efbc 2145ada7

+11 -18
+1
CMakeLists.txt
··· 54 54 MinecraftWorld 55 55 d3d11 56 56 XInput9_1_0 57 + Shcore 57 58 "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Iggy/lib/iggy_w64.lib" 58 59 "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Miles/lib/mss64.lib" 59 60 $<$<CONFIG:Debug>:
+4 -4
Minecraft.Client/Common/UI/UIController.cpp
··· 426 426 #elif defined __PSVITA__ 427 427 platformSkinPath = L"skinVita.swf"; 428 428 #elif defined _WINDOWS64 429 - if(m_fScreenHeight>=1080.0f) 429 + if(m_fScreenHeight>720.0f) 430 430 { 431 431 platformSkinPath = L"skinHDWin.swf"; 432 432 } ··· 435 435 platformSkinPath = L"skinWin.swf"; 436 436 } 437 437 #elif defined _DURANGO 438 - if(m_fScreenHeight>=1080.0f) 438 + if(m_fScreenHeight>720.0f) 439 439 { 440 440 platformSkinPath = L"skinHDDurango.swf"; 441 441 } ··· 444 444 platformSkinPath = L"skinDurango.swf"; 445 445 } 446 446 #elif defined __ORBIS__ 447 - if(m_fScreenHeight>=1080.0f) 447 + if(m_fScreenHeight>720.0f) 448 448 { 449 449 platformSkinPath = L"skinHDOrbis.swf"; 450 450 } ··· 455 455 456 456 #endif 457 457 // Every platform has one of these, so nothing shared 458 - if(m_fScreenHeight>=1080.0f) 458 + if(m_fScreenHeight>720.0f) 459 459 { 460 460 m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf"); 461 461 }
+3 -3
Minecraft.Client/Minecraft.Client.vcxproj
··· 1296 1296 <Link> 1297 1297 <GenerateDebugInformation>true</GenerateDebugInformation> 1298 1298 <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> 1299 - <AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_Debug\Minecraft.World.lib;%(AdditionalDependencies);XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib</AdditionalDependencies> 1299 + <AdditionalDependencies>d3d11.lib;Shcore.lib;..\Minecraft.World\x64_Debug\Minecraft.World.lib;%(AdditionalDependencies);XInput9_1_0.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib</AdditionalDependencies> 1300 1300 <ShowProgress>NotSet</ShowProgress> 1301 1301 <SuppressStartupBanner>false</SuppressStartupBanner> 1302 1302 <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput> ··· 1429 1429 <Link> 1430 1430 <GenerateDebugInformation>true</GenerateDebugInformation> 1431 1431 <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> 1432 - <AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies> 1432 + <AdditionalDependencies>d3d11.lib;Shcore.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies> 1433 1433 <ShowProgress>NotSet</ShowProgress> 1434 1434 <SuppressStartupBanner>false</SuppressStartupBanner> 1435 1435 </Link> ··· 1474 1474 <Link> 1475 1475 <GenerateDebugInformation>true</GenerateDebugInformation> 1476 1476 <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> 1477 - <AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies> 1477 + <AdditionalDependencies>d3d11.lib;Shcore.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies> 1478 1478 <ShowProgress>NotSet</ShowProgress> 1479 1479 <SuppressStartupBanner>false</SuppressStartupBanner> 1480 1480 </Link>
+2 -11
Minecraft.Client/Windows64/Windows64_Minecraft.cpp
··· 4 4 #include "stdafx.h" 5 5 6 6 #include <assert.h> 7 + #include <ShellScalingApi.h> 7 8 #include "GameConfig\Minecraft.spa.h" 8 9 #include "..\MinecraftServer.h" 9 10 #include "..\LocalPlayer.h" ··· 716 717 UNREFERENCED_PARAMETER(hPrevInstance); 717 718 UNREFERENCED_PARAMETER(lpCmdLine); 718 719 719 - /* 720 - // Declare DPI awareness so GetSystemMetrics returns physical pixels 721 - SetProcessDPIAware(); 720 + SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); 722 721 g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN); 723 722 g_iScreenHeight = GetSystemMetrics(SM_CYSCREEN); 724 - 725 - { 726 - char buf[128]; 727 - sprintf(buf, "Screen resolution: %dx%d\n", g_iScreenWidth, g_iScreenHeight); 728 - OutputDebugStringA(buf); 729 - } 730 - */ 731 - 732 723 733 724 if(lpCmdLine) 734 725 {
+1
README.md
··· 16 16 - Added support for keyboard and mouse input 17 17 - Added fullscreen mode support (toggle using F11) 18 18 - Disabled V-Sync for better performance 19 + - Device's screen resolution will be used as the game resolution instead of using a fixed resolution (1920x1080) 19 20 20 21 ## Controls (Keyboard & Mouse) 21 22