In the 'OpenExisting' function, 'open_access' is used to create the flags for opening the file.
However, it is not set to zero, so could end up being incorrect file modes, potentially even emptying the file for appending, which would be bad.
This simply initialises it to zero first.
Previously XexUnloadImage did not cleanup the image fully,
and if XexLoadImage was to be called again on the same module,
it was not initialized fully, leading to a crash when using it.
New cvar clock_source_raw allows to use the cpu cycle counter itself as an alternative time source, if system timing resolution is to low and causes problems.
- Removed tick and time values from ThreadSavedState.
- Removed affiliated get/set code from Save and Restore.
- Removed dangerous SetGuestTickCount method.
This fixes cases introduced by 52e836d0f81e752ba368717e68773b591adfa9cf
where thread handles get closed before the thread finishes.
Handle was assumed to be alive there, which was not true as
threads self-referenced only their objects, not their handles.
Affected games: Payday 2 Demo
Although this seems counter-intuitive, operating on handle
reference counters in
- ObLookupThreadByThreadId
- ObReferenceObjectByHandle
- ObDereferenceObject
allows to cleanly clean up handles for resources created elsewhere
and destructed by ObDereferenceObject (for example, threads with 0x80
creation flag). Operating on pointer reference counters alone
would leave a stray handle in the slots list.
Closing the thread handle should delete the thread object
if it's finished. When this handle was retained, closing the handle
left a lingering handle reference and thus this XThread would leak
By default imgui saves an INI file named 'imgui.ini' to the current directory,
which is undesired behavior. Until we can properly specify a full path to
a good location, disable saving of the INI file.
- Font atlas is now owned by context.
- Switch from deprecated io.RenderDrawListsFn callback to dedicated call in window.cc.
- Replaced deprecated ImGuiCol_ModalWindowDarkening with ImGuiCol_ModalWindowDimBg.
- Replaced deprecated SetScrollHere() with SetScrollHereY().
- Replaced deprecated GetContentRegionAvailWidth() with GetContentRegionAvail().x.
- Replaced deprecated ShowTestWindow() with ShowDemoWindow().
- Replaced deprecated ImGuiCol_ChildWindowBg with ImGuiCol_ChildBg.
- Replaced deprecated SetNextTreeNodeOpen() with SetNextItemOpen().