Holding a key while closing the panel will keep the message in the event queue, the next time one of the windows are opened, the message will be spammed. Send a null msg to clear it properly.
Check if the window is occluded first before sampling. Massive runtime load reduction when application minimized in full-screen mode.
This also fixes the issue where the console would scroll all the way to the top when the application is minimized in full screen mode, as we can't calculate the window sizes properly causing SetScrollPos to set the pos to a large negative value.
A common request was to make the tab key select the highlighted item in the autocomplete suggest window, much like the enter key. This key however could also be used to instantly select the first item in the autocomplete suggest window without having to move the cursor there.
In commit f5f14c153f0115af7a0ac5fe3b4be98b3816be84, a change was made to switch the default keys to pgup and pgdown. It appears however that these keys were used for the chat window.
The defaults have been adjusted to (backtick and f10) for console, and (insert and f11) for the browser.
There was also a bug in ImGuiConfig::Save() where it double nested the keyvalues, this has also been fixed. The keyvalue file now parser properly.
The option panel in the console has been slightly reworked to also show the secondary binding options for both the console als browser allowing the user to change both the primary and secondary for both windows without having to manually edit the files.
Cleanup by qualifying anything const that isn't or shouldn't be modified. Also made an optimization StringReplaceC (String Replace Copied), to only start copying if the substring to replace even exists in the given input.
Present only returns the status when DXGI_PRESENT_TEST is set, no data will be renderer and displayed. We should not run the frame rate limiting logic, and NVIDIA reflex on this!
The script engine supports running coroutines, which means we cannot use statics for each message as 2 coroutines could fight for a event mesage
I.e. we have 2 coroutines handling a player damaged event, the message could be populated with a mix of data between the 2 coroutines.
Therefore, we cannot optimize this by statically allocating it and must allocate it for each coroutine separately. The extra memory and cpu overhead caused by this is still very low.
The keyvalues file is written incorrectly as we double nest the mod list by calling FindKey on "ModList" with the create parameter set. The constructor of KeyValues already creates the root object called "ModList" in which the list should be stored.
The list is now properly parsed, making the enable/disable feature for individual mods work again.
- renamed pak_swap to pak_requestswap.
- Installed autocompletion callback for pak_requestswap.
- use const where possible.
- improved logging on success/failures.
- use new reversed types and fields to determine when to skip an asset in Pak_ListTypes_f.
- only allow unloading or swapping of a specific pak file if its status is PAK_STATUS_LOADED.
This warning should be for non-cert builds only, all command code calling this function is already warning on their own, and in actual runtime code, silent failure is prefered as there are other warning/error routines there. The non-string version of this function should always be prevered however as its much faster.
Since directx initialized a lot later then when we first start logging, and since we no longer lock and log when the system isn't initialized as per commit 0dde788aa737d2bdb85a8493b4f8f1e549c44ecb, initial logs will not be stored for rendering.
The imgui console will now instead check if the system has been explicitly disabled, or has been disabled due to an error. If an error occurs, the buffer will also be cleared. This way we still avoid locking and logging anything at all times when -noimgui was passed in.
The home key should be reserved for console input as this is useful when running script code through the console, and needing to switch cursor positions to fix a typo or copy something. Page Up and Page Down weren't used and are less likely to be used by something in the game, remapped the defaults' secondary to these keys.
Most of the pak load functions are now reverse engineered, documented and ready to be used from the API handle. Structure is confirmed to align with the engine.
FS_OpenAsyncFile is inline in StreamDB_Init, and in our implementation, FS_OpenAsyncFile is the only place channel id's get mapped to file slots, so it will be null for stbsp's. Commented assert out as there isn't anything we could do about this besides rebuilding StreamDB_Init which is a large task.
The engine assigns channel ID's to paks, which it then uses to determine whether to error out or warn when a certain pak file failed to load.
Paks loaded with a higher channel ID, such as the load screens or gladiator cards, won't call Error() in the engine if the loading thereof failed, where paks with a lower channel ID, such as common.rpak will.
Paks with a higher channel ID are quite verbose in the console, as the game often switches between gladiator card rpaks from scripts to update the banners in the world dynamically. User can now explicitly set the channel ID, with the default being 4 which only logs core engine and sdk paks, along with preloaded and level paks.
The async file read system uses a similar concept, this was confirmed when reversing Pak_SetupBuffersAndLoad as this calls FS_OpenAsyncFile for its patch files with the log channel that was assigned during Pak_LoadAsync. This code already had logging, but has been adjusted to follow the design of the system. Async file reads however are disabled by default as these are very verbose and will degrade performance of the game.
Instead of manually calling each surface instance directly from CImguiSystem::SampleFrame(), allow the caller to install their own surfaces. Also, only lock the buffer mutex if we are going to take a snapshot of the draw data. The system now also only renders to the backend if there's draw data to be rendered. Slightly reworked and reordered the control flow of the system to make it easier to catch bugs. The system can now also be disabled using the -noimgui command line option.