We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't know if you had intentions to do it or not, but I wrote a simple C# code to replace the engine2 string in hlvr.exe with hlnonvr:
internal void ApplyNonVRPatch() { string fullPath = installPath + "\\game\\bin\\win64\\hlvr.exe"; Dictionary<int, string> strings = new Dictionary<int, string>(); byte[] byteArray = File.ReadAllBytes(fullPath); List<char> chars = new List<char>(); for (int i = 0; i < byteArray.Length; i++) { byte b = byteArray[i]; if (b == 0 && chars.Count > 0) { string word = new String(chars.ToArray()); strings.Add(i - word.Length, word); chars.Clear(); } else if (b > 0) chars.Add(Convert.ToChar(b)); } strings = strings.Where(x => x.Value.Contains("engine2")) .ToDictionary(x => x.Key, x => x.Value); foreach (KeyValuePair<int, string> kv in strings) { string value = kv.Value.Replace("engine2", "hlnonvr"); char[] charArray = value.ToCharArray(); for (int i = 0; i < charArray.Length; i++) { byteArray[kv.Key + i] = Convert.ToByte(charArray[i]); } } try { File.WriteAllBytes(fullPath.Replace("hlvr.exe", "hlnonvr.exe"), byteArray); File.Copy(AppDomain.CurrentDomain.BaseDirectory + "/Tools/HLnonVR/hlnonvr.dll", installPath + "\\game\\bin\\win64\\hlnonvr.dll"); } catch (Exception) { } }
The text was updated successfully, but these errors were encountered:
It wouldn't actually be "distributing valve code", and it would call out people who are afraid to use a hex editor.
Sorry, something went wrong.
No branches or pull requests
I don't know if you had intentions to do it or not, but I wrote a simple C# code to replace the engine2 string in hlvr.exe with hlnonvr:
The text was updated successfully, but these errors were encountered: