682 Commits

Author SHA1 Message Date
redpolline
c81c506b97 Fix linux build scripts.
Make seperate debug and release build scripts.

Strip the release build.

Add missing define flags.

Fix shared lib arg for libasan.
2025-02-12 09:35:26 -05:00
redpolline
59cb19e56a Clang fixes. 2025-02-12 09:35:26 -05:00
redpolline
c5afbe9fea Return a val when EMU_OVERLAY isn't defined.
Steam_Overlay::RegisteredInternalCallbacks must return a value when
EMU_OVERLAY isn't defined. (lobby_connect build.)
2025-02-12 09:35:25 -05:00
redpolline
e2e21441c8 Add missing NO_DISK_WRITES local_storage funcs.
Add Local_Storage::delete_data_settings and Local_Storage::data_settings_exists
implementations when NO_DISK_WRITES is defined. (lobby_connect build.)
2025-02-12 09:35:25 -05:00
redpolline
55b5118dc0 Add Overlay UI functions.
Too many things to list.
2025-02-12 09:35:25 -05:00
redpolline
cd5d45e610 Support saving / loading UI Notification Position. 2025-02-12 09:35:25 -05:00
redpolline
816479259b Add Settings::ui_notification_position. 2025-02-12 09:35:25 -05:00
redpolline
ba49e5618c Use correct callback queue for AvatarImageLoaded_t 2025-02-12 09:35:25 -05:00
redpolline
5705403157 Check callback registration in NOTIFY_AVATAR_IMAGE.
Make sure overlay callbacks are registered before firing callbacks for
set_profile_image.
2025-02-12 09:35:25 -05:00
redpolline
4dbf130cb9 Allow checking registration for GB_CALLBACK
Add cb_type ## _is_registered function for GOLDBERG_CALLBACK_INTERNAL
macro to allow external checking of the callback's registration status
with CCallbackMgr.
2025-02-12 09:35:25 -05:00
redpolline
f693bfb073 Implement sending and receiving friend avatars.
Moves Steam_Friends::Callback into a cpp file.

Generates callbacks for avatar changes.

Requests avatars when asked for one that is unknown.
2025-02-12 09:35:25 -05:00
redpolline
25d34a65c4 Redo image handling in settings.
Lock the buffers when modifying them.

Notify when callers change a set avatar image.

Create a get function for images.

Allow deletion of previously loaded images, and reuse of their ids.
2025-02-12 09:35:25 -05:00
redpolline
c593c3f8b8 Move most functionality from the macro to template.
Have the users of the macro use common functionality.
2025-02-12 09:35:24 -05:00
redpolline
35ff20ebfc Add image buffer writing, file copy, avatar save.
Adds functions for saving the user selected avatar image to the global
settings folder. (These also get reused to send the avatar to remote
users.)
2025-02-12 09:35:24 -05:00
redpolline
e555bcef7a Init callback objects first, fix mutex locking
Init callback related objects in Steam_Client before initing anything
else.

Fix missing global_mutex lock in Steam_Client::RegisterCallback() and
Steam_Client::UnregisterCallback().
2025-02-12 09:35:24 -05:00
redpolline
55277ab770 Change filenames for global settings avatar images...
... and fix the debug messages.

This changes the filenames to be "avatar_*" instead of "profile_*" to
keep things consistent with the proper naming elsewhere.
2025-02-12 09:35:24 -05:00
redpolline
bfb0272300 Fix debug message for Steam_Utils::GetImageRGBA(). 2025-02-12 09:35:24 -05:00
redpolline
f560fce352 Add protobuf message type Image and Friend_Avatar.
Also adds Friend_Avatar to the Common_Message list of possible
messages.
2025-02-12 09:35:24 -05:00
redpolline
75035de2f4 Add try_get_steam_client().
This allows the emulator to attempt to access the global steam_client object
without creating it if it doesn't exist.
2025-02-12 09:35:24 -05:00
redpolline
cde29f0fd0 Create GOLDBERG_CALLBACK_INTERNAL() macro.
This allows the usage of steam callbacks within the emulator itself.
2025-02-12 09:35:24 -05:00
redpolline
1fa0f4d4d5 Add fs utility functions for overlay use.
As we need to add a file chooser to the overlay, we need the backend
functions for it to use.

This commit adds:

Local_Storage::get_parent_directory().
Local_Storage::is_directory().
Local_Storage::get_user_pictures_path().
Local_Storage::get_drive_list().
Posix version of DirectoryExists().
2025-02-12 09:35:24 -05:00
redpolline
d493e30b98 Add avatar image loading from global ...
... settings directory.

Also adds some additional related debug logging, and a utility function
for converting between std::vector<image_pixel_t> used by Local_Storage::load_image(),
and std::string used by Settings::add_image().
2025-02-12 09:35:23 -05:00
redpolline
0eaba52f76 Make add_friend_avatars handle local_user avatar
... changes.

Implements STEAM_CALL_RESULT( AvatarImageLoaded_t ).
Adds support for a sending a STEAM_CALL_RESULT( PersonaStateChange_t ) with the k_EPersonaChangeAvatar flag.

Creates a mapping in Settings to hold the avatar image data.

Also adds additional debug logging to indicate which image handle is
returned for each user / image size.
2025-02-12 09:35:23 -05:00
redpolline
1408890d20 Enumerate fonts under Windows instead of ...
... hardcoding a path to a font file from the system directory.

Wine doesn't have anything in there, and doing it this way allows
Wine to "just work" without using Winetricks.
2025-02-12 09:35:23 -05:00
redpolline
5241fc892f Overlay: Implement achievement icon display.
Display achievement icons in steam_overlay, and during achievement
notifications.

Add total achievement counts and progress bar to steam_overlay.

Add new global settings for displaying unearned hidden achievements in
the achievement list and displaying achievement descriptions in unlock
notifications. (Both disabled by default.)
2025-02-12 09:35:23 -05:00
redpolline
59b8354f2d Win7 / Wine fixes DX11_Hook.cpp.
Don't create image resources if the D3D device isn't inited yet.
(Causes app crash.)

Set quality value on substruct.
2025-02-12 09:35:23 -05:00
redpolline
77d2a84af8 Wine + Enscripten fixes for OpenGL_Hook.cpp. 2025-02-12 09:35:23 -05:00
redpolline
2164ff292c Extra debugging log functions. 2025-02-12 09:35:23 -05:00
redpolline
8029c41c04 Implement ISteamUserStats::GetAchievementIcon(). 2025-02-12 09:35:23 -05:00
redpolline
662e22bade Add some achievement display settings. 2025-02-12 09:35:23 -05:00
redpolline
dfc486dd3b Add functions for global flag settings, ...
return width and height for loaded images.
2025-02-12 09:35:23 -05:00
redpolline
a1ec70d3b0 Fix memory leak in resolve_ip. 2025-02-12 09:35:22 -05:00
redpolline
a8c696c565 Fix detours not attaching to all threads on startup. 2025-02-12 09:35:22 -05:00
redpolline
c9236a7337 Fix compiler warnings. 2025-02-12 09:35:22 -05:00
redpolline
e767bb9fe9 Add inttypes defs to common_includes.h 2025-02-12 09:35:22 -05:00
redpolline
e88f92cf4a Add 32bit registry view editing to ColdClientLoader. 2025-02-12 09:35:22 -05:00
redpolline
629473b53e Set env:SteamAppPath in steamclient_loader. 2025-02-12 09:35:22 -05:00
redpolline
8e8355c013 Add missing header include guards. 2025-02-12 09:35:22 -05:00
redpolline
ae6e1829dd CI: Use winehq.org's rpm until fedora 40 goes EOL.
Otherwise, we'll be constantly changing the URL in the CI yml everytime
Wine makes a new point release.
2025-02-12 09:32:46 -05:00
redpolline
74d22df42e Fix CI to use BAT files only for win build.
For consistency have the CI use the same build path as
the end-user builds.

Use where.exe from wine-10.0.

CI's version is a stub. Use one that actually works, until the CI gets
updated.

Also, fix broken RtlGenRandom by importing ADVAPI32's GetUserNameW(),
and calling GetModuleHandleW() / GetProcAddress() for SystemFunction032().
Instead of trying to use a fake import lib.

Bonus: Can now use the host system's username as the default for the
steam user name instead of "Noob".
("Noob" is still used as the fallback if this call fails, or the host
system's username is invalid.)
2025-02-11 07:59:19 -05:00
redpolline
abd8300d47 Update .gitlab-ci.yml file to skip building the PDBs.
(CI throws errors and skips building the PE files.)
2025-02-08 05:30:25 -05:00
redpolline
b75f324100 Fix build scripts.
Fix list:
 - Make cmd not choke on recursive calls to build_env_x*.bat.
 - Create build directories and move build output there instead of
   polluting the root of the source tree.
 - Make proper debug builds with pdb output.
 - Make proper x64 builds of lobby_connect, and steamclient_loader. (lobby_connect_x64.exe, and steamclient_loader_x64.exe)
 - Rename x86 build of lobby_connect.exe to lobby_connect_x86.exe.
 - Rename x86 build of steamclient_loader.exe to steamclient_loader_x86.exe.
 - Make proper distrib directories. (I.e. <release,debug>/<build type>/<arch>/<binaries>.)
2024-12-21 07:28:48 -05:00
ayaka
ef5c4731b4 dll/wrap: fix build for glibc 2.33
I don't think I need the step that converting to legacy struct.

Signed-off-by: ayaka <ayaka@soulik.info>
2024-01-10 05:17:17 -05:00
redpolline
a2c9f9230f Improve steam_masterserver_updater stub.
This creates a new "custom_master_server.txt" file that can be used to pre-seed a master server list.

This also allows for steam apps to manipulate the master server list in memory.
I.e. This implements:
  Steam_Masterserver_Updater::AddMasterServer()
  Steam_Masterserver_Updater::RemoveMasterServer()
  Steam_Masterserver_Updater::GetNumMasterServers()
  Steam_Masterserver_Updater::GetMasterServerAddress()

Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 05:13:22 -05:00
redpolline
8f212b82ca Generate PDB files for the debug builds.
Allows for better debugging with Windows debuggers.

Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 05:00:43 -05:00
redpolline
d78ab8e8a5 Add missing echo off to build_win_debug_experimental_steamclient.bat.
Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 04:45:37 -05:00
redpolline
d1a0a68d4f Add relay daemon mode to lobby_connect.
This (along with the existing custom_broadcasts support) allows for users on different read: _routed_ subnets to see and connect to each other's games.

To use this mode:

Build lobby_connect and run it with the "-d" argument.

Create the custom_broadcasts.txt file in the steam_settings folder next to steam_api.dll / steam_api64.dll and put the IP address of the host running lobby_connect in it.

Run games.

Note: This should even work with existing installations, _provided_ that at least one of them creates the custom_broadcasts.txt file as described above.
(This is because existing installations use broadcast packets to establish new connections, forwarding all of their knowledge to each other.
 Thus having at least one host on the current subnet configured in this new way turns it into a "proxy" for the other hosts.)

Caveat: This will _NOT_ work if NAT is involved. This is due to the lack of NAT traversal support in the emu.
(I.e. The lobby_connect daemon will get the info from the NAT'ed hosts and forward it to the others, but hosts outside the NAT won't be able to connect.)

Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 04:30:17 -05:00
redpolline
98488d6570 Create windows lobby_connect debug build script.
Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 04:29:06 -05:00
redpolline
92623f586d Fix too many env vars causing build failures, and put debug builds in their own folder like release builds.
Cannot call the vc vars batch too many times. Fix it by calling set/end local.

See also: https://developercommunity.visualstudio.com/t/vcvarsallbat-reports-the-input-line-is-too-long-if/257260

Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 04:27:41 -05:00
redpolline
2e3f14e7bd Fix copy-paste syntax error in steam_ugc.h.
Signed-off-by: redpolline <11156324-redpolline@users.noreply.gitlab.com>
2024-01-10 04:20:50 -05:00