Banc GPU (20/10) : mesures GTX 1660 SUPER, pic 5448 FPS (ciel), documentation et outils
Cette révision appartient à :
1 Parent
30489ab25c
révision
7da6fdb75f
7 fichiers modifiés
+258
-3
Aucun fichier ne correspond à votre recherche
@@ -0,0 +1,97 @@
|
||||
param(
|
||||
[string]$GameArgs = "assets\terrain\vercora_zone_1m.vchm"
|
||||
)
|
||||
|
||||
$code = @"
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class DesktopLauncher {
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
public struct STARTUPINFO {
|
||||
public int cb;
|
||||
public string lpReserved;
|
||||
public string lpDesktop;
|
||||
public string lpTitle;
|
||||
public int dwX;
|
||||
public int dwY;
|
||||
public int dwXSize;
|
||||
public int dwYSize;
|
||||
public int dwXCountChars;
|
||||
public int dwYCountChars;
|
||||
public int dwFillAttribute;
|
||||
public int dwFlags;
|
||||
public short wShowWindow;
|
||||
public short cbReserved2;
|
||||
public IntPtr lpReserved2;
|
||||
public IntPtr hStdInput;
|
||||
public IntPtr hStdOutput;
|
||||
public IntPtr hStdError;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct PROCESS_INFORMATION {
|
||||
public IntPtr hProcess;
|
||||
public IntPtr hThread;
|
||||
public int dwProcessId;
|
||||
public int dwThreadId;
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
public static extern bool CreateProcess(
|
||||
string lpApplicationName,
|
||||
string lpCommandLine,
|
||||
IntPtr lpProcessAttributes,
|
||||
IntPtr lpThreadAttributes,
|
||||
bool bInheritHandles,
|
||||
uint dwCreationFlags,
|
||||
IntPtr lpEnvironment,
|
||||
string lpCurrentDirectory,
|
||||
ref STARTUPINFO lpStartupInfo,
|
||||
out PROCESS_INFORMATION lpProcessInformation
|
||||
);
|
||||
|
||||
public const uint CREATE_NEW_CONSOLE = 0x00000010;
|
||||
|
||||
public static int Launch(string appPath, string cmdLine, string workDir, string desktop) {
|
||||
STARTUPINFO si = new STARTUPINFO();
|
||||
si.cb = Marshal.SizeOf(si);
|
||||
si.lpDesktop = desktop;
|
||||
|
||||
PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
|
||||
bool ok = CreateProcess(
|
||||
appPath,
|
||||
cmdLine,
|
||||
IntPtr.Zero,
|
||||
IntPtr.Zero,
|
||||
false,
|
||||
CREATE_NEW_CONSOLE,
|
||||
IntPtr.Zero,
|
||||
workDir,
|
||||
ref si,
|
||||
out pi
|
||||
);
|
||||
|
||||
if (!ok) {
|
||||
int err = Marshal.GetLastWin32Error();
|
||||
Console.WriteLine("CreateProcess failed with error: " + err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Console.WriteLine("Process launched successfully! PID: " + pi.dwProcessId);
|
||||
return pi.dwProcessId;
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
Add-Type -TypeDefinition $code
|
||||
|
||||
$root = "C:\Users\theog\Documents\_CODE\4-vercors\vercora"
|
||||
$exe = Join-Path $root "build\vercora.exe"
|
||||
$cmd = "`"$exe`" $GameArgs"
|
||||
|
||||
Write-Host "Lancement avec console sur le bureau interactif utilisateur (WinSta0\default)..."
|
||||
$pidResult = [DesktopLauncher]::Launch($exe, $cmd, $root, "WinSta0\default")
|
||||
if ($pidResult -gt 0) {
|
||||
Write-Host "Vercora est demarre sur l'ecran utilisateur avec le PID $pidResult."
|
||||
}
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur