19 Commits

Author SHA1 Message Date
Kawe Mazidjatari
f0f90e5c1b Launcher: use emplace_back
Avoid copy.
2025-02-09 00:42:40 +01:00
Kawe Mazidjatari
b4f68d69ce Launcher: improve dropdown UI name
Name it "mode" as that is more known for gamers.
2025-02-02 14:41:20 +01:00
Kawe Mazidjatari
b75655c101 Tier0: binary io stream class refactor
Class has been reworked to always take the reverve seek amount into account when adding to output size. Previously, we still incremented the output size even when we seeked back and modified data rather than appending to the end.

The manual write size calculation was a design choice as seeking and calling tellp is slow.

The enum has also been slightly reworked by removing the BINARY enumerant, and adding a new mode which allows you to open a stream in read/write mode.
2025-01-01 22:44:43 +01:00
Kawe Mazidjatari
3974ba70bb Tier0: separate launcher and imgui configs to user directory
Keep it separate from the system configurations.
2024-10-08 23:04:45 +02:00
Kawe Mazidjatari
e999871b32 Resource: sdk resource file cleanup 2024-07-11 02:01:26 +02:00
Kawe Mazidjatari
cd78ee6654 Launcher: parse maps and playlists on surface setup
This allows you to scroll through the combo list with the scroll wheel without uncollapsing it.
2024-05-05 11:32:32 +02:00
Kawe Mazidjatari
8ef05a8f43 Launcher: several fixes and improvements
- Reload map list each time the combo box is opened (needs to refresh if user installed a new map while launcher is still open).
- Reload playlists each time the combo box is opened (makes sure that the list is up-to-date if user modified it in any way).
- Use global VPK dir regex to parse out map names.
2024-04-23 00:06:11 +02:00
Kawe Mazidjatari
e0f24d3313 Launcher: initialize all member vars
Suppress IntelliSense warnings.
2024-04-20 23:28:35 +02:00
Kawe Mazidjatari
bf0cef130d Launcher: fix use after free (ASAN)
The launcher would regularly throw the PSA (Program Compatibility Assistance) notification upon exit. Running the program with address sanitizer revealed 'CSurface::GetControlValue()' returned a pointer to a temporary buffer, this is destroyed as 'Forms::Control::Text()' returns class String by value. 'CSurface::GetControlValue()' is no longer necessary since we moved to the official KeyValues class, so this function has been removed all together and the issue has therefore been fixed.
2024-04-20 23:08:31 +02:00
Kawe Mazidjatari
9281bffad8 Launcher: fix compiler error
Prototype changed in commit c261db243e7de0a57445ed9bb036238a7171e572.
2024-04-17 22:07:00 +02:00
Kawe Mazidjatari
9f01ff0ea7 Launcher: surface and launcher code overhaul
- SDK Launcher is now a proper GUI app (no longer defaults to terminal, but can of course still be used in the terminal).
- Set uniform font on all controls (GetStockObject sometimes returns fonts that isn't currently supported on the UI layout causing text to clip; we don't show in other languages or character encodings so we should just default to Microsoft Sans Serif).
- Make anchors uniform for all controls (resize not yet supported).
- Don't attempt to send commands to game instances if command string is null or empty.
- Clamp surface console list size to window size.
- Remove surface console logger boilerplate (surface logging is now a dedicated function).
- Use actual SDK logging system for console prints/warnings/errors.
- Fixed bug where the use of a shared stack buffer caused truncated parts of the file name to end up in the command line text.
2024-04-17 20:49:22 +02:00
Kawe Mazidjatari
dacc4ac8f5 Core: allow launching dedicated server without terminal window
The terminal window isn't always necessary, especially on Linux systems. In fact, it causes issues on some Wine environments. Allow user to disable it with -noconsole. This option only exists on the dedicated server. The client builds have the console disabled by default, and can enable them with -wconsole.
2024-04-14 19:39:52 +02:00
Kawe Mazidjatari
4867f5da74 Launcher: untoggle windowed mode by default and rename field
Untoggled by default due to popular demand (most wanted to launch full screen). Also renamed maxFPS field to fpsMax to remain consistency with the actual cvar name.
2024-04-14 14:21:03 +02:00
Kawe Mazidjatari
6315a0c6c8 Launcher: light overhaul and use KeyValues class
Reworked some of the code to make globals static and used KeyValues class to parse VDF files instead.
2024-04-13 15:48:24 +02:00
Kawe Mazidjatari
b89f72ac36 Tier0: iostream light cleanup
- Take const char* directly instead of making extraneous copies
- Add overload for reading strings into fixed size buffers
2024-02-03 23:34:14 +01:00
Kawe Mazidjatari
0938eb2415 Fix unresolved external symbols
These projects used 'V_FixSlashes' but weren't licked to Tier1.
2024-01-30 13:45:37 +01:00
Kawe Mazidjatari
fa079bf5e4 These files are now located in the bin dir 2023-10-21 18:58:42 +02:00
Kawe Mazidjatari
7157a95350 Add table for affinity mask
Small usage table.
2023-10-06 21:28:57 +02:00
Kawe Mazidjatari
fd3e227a86 Align folder structure with p4 2023-09-19 22:13:22 +02:00