Add user-friendliness

This commit is contained in:
nastys
2019-08-04 02:07:05 +02:00
parent a8f6f1e8ea
commit 058a2c68a3
29 changed files with 55872 additions and 4358 deletions
@@ -8,8 +8,13 @@ using namespace System::Windows::Forms;
[STAThread]
int showUI() {
if (Environment::OSVersion->Version->Major >= 6)
SetProcessDPIAware();
SetProcessDPIAware();
// trick Optimus into switching to the NVIDIA GPU
HMODULE nvcudaModule = LoadLibraryW(L"nvcuda.dll");
// cuInit actually returns a CUresult, but we don't really care about it
void(WINAPI * cuInit)(unsigned int flags) = (void(WINAPI*)(unsigned int flags))GetProcAddress(nvcudaModule, "cuInit");
if (cuInit != NULL) cuInit(0);
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);