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

Configure Feed

Select the types of activity you want to include in your feed.

Restore Windows 7 compatibility (#160)

* Call SetProcessDpiAwareness via GetProcAddress to preserve Windows 7 compatibility

Shcore.dll and SetProcessDpiAwareness were introduced in Windows 8 and higher, so to keep compatibility with Windows 7, we use GetProcAddress to call this function dynamically, avoiding linker writing binary dependency on shcore.dll in the import table

* Revert "Call SetProcessDpiAwareness via GetProcAddress to preserve Windows 7 compatibility"

This reverts commit f1f397fdbe64e64ab8f7b5457e8206e9193cece0.

* Reapply the fix

authored by

void_17 and committed by
GitHub
5a9e5121 bdc8fb5d

+13 -1
+13 -1
Minecraft.Client/Windows64/Windows64_Minecraft.cpp
··· 707 707 if( g_pd3dDevice ) g_pd3dDevice->Release(); 708 708 } 709 709 710 + typedef HRESULT(__stdcall* SetProcessDpiAwareness_f)(PROCESS_DPI_AWARENESS); 711 + static HRESULT dyn_SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value) 712 + { 713 + static const auto ptr = reinterpret_cast<SetProcessDpiAwareness_f>( 714 + reinterpret_cast<void*>(::GetProcAddress(static_cast<HMODULE>(LoadLibraryExW(L"Shcore.dll", nullptr, 0)), "SetProcessDpiAwareness"))); 715 + if (ptr == nullptr) 716 + { 717 + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 718 + return E_NOTIMPL; 719 + } 710 720 721 + return ptr(value); 722 + } 711 723 712 724 int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, 713 725 _In_opt_ HINSTANCE hPrevInstance, ··· 717 729 UNREFERENCED_PARAMETER(hPrevInstance); 718 730 UNREFERENCED_PARAMETER(lpCmdLine); 719 731 720 - SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); 732 + dyn_SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); 721 733 g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN); 722 734 g_iScreenHeight = GetSystemMetrics(SM_CYSCREEN); 723 735