hle(host_posix): the calls that tell a title what it is running on (version, VerifyVersionInfo, interrupt time, system times, RAM) are stubs #624
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:56:49Z.
Summary
Six calls that tell a title what it is running on were unimplemented in
host_posix/system.rs, so they answered through the loader's import stub:RtlGetVersion,GetVersionExWVerifyVersionInfoWQueryUnbiasedInterruptTimeGetSystemTimesGetPhysicallyInstalledSystemMemoryA version check that fails is the risky one: a title without a manifest asks "am I on Windows 10 or later", gets no, and takes the Windows 7 path it still carries for its launcher — a path this host does not serve.
What the change does
RtlGetVersionandGetVersionExWfill eitherOSVERSIONINFOWorOSVERSIONINFOEXW, by the size the caller wrote, as Windows 10 build 19041 with no service pack.GetVersionExWrefuses a size that is neither, as Windows does;RtlGetVersionalways succeeds. Shortcut, written down: the console reports its own build, and this is the build the GDK's own headers target.VerifyVersionInfoWreads theCONDITION_VECTORand answers the operator in the high byte oftype_mask(EQUAL,GREATER,GREATER_EQUAL,LESS,LESS_EQUAL,AND,OR) for every field the low byte selects,ERROR_OLD_WIN_VERSIONwhen one does not hold.QueryUnbiasedInterruptTimeis 100 ns units from the host's own counter.GetSystemTimesgives the process's own kernel and user time fromgetrusageand no idle time, which is the honest answer here: this host does not account for another process's idling and a title only subtracts two readings.GetPhysicallyInstalledSystemMemoryishw.memsizein KiB.ntdll.dllis now served by the same table askernel32, because theRtl*names live there and a title imports them from there.Tests
Three new ones in
system.rs: the version is filled in both forms and a wrong size is refused; the comparison answers with the operator it was given, including two fields at once; and the interrupt time moves, the process has used CPU time with no idle time, and the RAM is a Mac's.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:57:05Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T15:57:14Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #624in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T16:31:53Z.
Merged with the PR that serves these calls; closing.