Commit graph

372 commits

Author SHA1 Message Date
redpolline
b8bcc81473 Implement SteamAPI_WriteMiniDump. 2025-02-08 11:17:38 -05:00
redpolline
aedbc30cfa Fix overlay when avatar images are not configured.
(Otherwise, we'll crash after generating too many images.)
2025-02-08 11:17:37 -05:00
redpolline
8919581be7 Rate limit Settings::background_monitor. 2025-02-08 11:17:37 -05:00
redpolline
c1ae5f2732 Clang fixes. 2025-02-08 11:17:37 -05:00
redpolline
89def85d0c 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-08 11:17:36 -05:00
redpolline
d5d8ced89c Support saving / loading UI Notification Position. 2025-02-08 11:17:36 -05:00
redpolline
f9b6163356 Add Settings::ui_notification_position. 2025-02-08 11:17:36 -05:00
redpolline
a6fa17ebee Use correct callback queue for AvatarImageLoaded_t 2025-02-08 11:17:36 -05:00
redpolline
9b34c9d51b Check callback registration in NOTIFY_AVATAR_IMAGE.
Make sure overlay callbacks are registered before firing callbacks for
set_profile_image.
2025-02-08 11:17:36 -05:00
redpolline
053ea64515 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-08 11:17:36 -05:00
redpolline
ba1a94ee5c 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-08 11:17:36 -05:00
redpolline
fdf5ca8e69 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-08 11:17:36 -05:00
redpolline
98444c3ead Move most functionality from the macro to template.
Have the users of the macro use common functionality.
2025-02-08 11:17:35 -05:00
redpolline
fb55203797 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-08 11:17:35 -05:00
redpolline
60c11d1745 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-08 11:17:35 -05:00
redpolline
3f4644fabe 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-08 11:17:35 -05:00
redpolline
bae54881ef Fix debug message for Steam_Utils::GetImageRGBA(). 2025-02-08 11:17:35 -05:00
redpolline
e2d3b3ecf4 Add protobuf message type Image and Friend_Avatar.
Also adds Friend_Avatar to the Common_Message list of possible
messages.
2025-02-08 11:17:35 -05:00
redpolline
b2c3d3d438 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-08 11:17:35 -05:00
redpolline
3d1fdc9392 Create GOLDBERG_CALLBACK_INTERNAL() macro.
This allows the usage of steam callbacks within the emulator itself.
2025-02-08 11:17:35 -05:00
redpolline
d91f82e408 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-08 11:17:35 -05:00
redpolline
da0c7b17c6 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-08 11:17:35 -05:00
redpolline
308cabe37f 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-08 11:17:34 -05:00
redpolline
a91405d20c 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-08 11:17:34 -05:00
redpolline
aac3c81e7a Implement ISteamUserStats::GetAchievementIcon(). 2025-02-08 11:17:33 -05:00
redpolline
bdbcb62019 Add some achievement display settings. 2025-02-08 11:17:33 -05:00
redpolline
934812ce8c Add functions for global flag settings, ...
return width and height for loaded images.
2025-02-08 11:17:33 -05:00
redpolline
65ea5d2c6c Fix memory leak in resolve_ip. 2025-02-08 11:17:33 -05:00
redpolline
9b56698858 Fix detours not attaching to all threads on startup. 2025-02-08 11:17:33 -05:00
redpolline
ab4740109d Fix compiler warnings. 2025-02-08 11:17:33 -05:00
redpolline
54115a668d Add inttypes defs to common_includes.h 2025-02-08 11:17:32 -05:00
redpolline
e217bd0a8d Add missing header include guards. 2025-02-08 11:17:27 -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
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
redpolline
0d0ec28ecb Make a better stub for Steam_RemotePlay functionality.
Note for googler's, this doesn't mean RemotePlay works / is being implemented.

Put the main stuff into its own .cpp.

Set up storage for holding descriptions. (*NOT* thread safe!)

Clears up a crash on init in SAO:FB.
2023-11-28 05:51:00 -05:00
redpolline
9cee5004d7 Fix ISteamClient class member ordering for Steam_Unified_Messages.
Some games, like SAO:FB, require a specific class member order.
2023-11-28 05:34:26 -05:00
Mr_Goldberg
475342f0d8
SDK 1.56 and 1.57 2023-05-08 22:36:51 -04:00
Mr_Goldberg
802d8bcc8f
More accurate SetLobbyData. 2022-09-06 13:30:20 -04:00
Mr_Goldberg
7e1824290a
disable_lan_only.txt can now be put inside the steam_settings folder. 2022-09-06 13:29:39 -04:00
Mr_Goldberg
647e894d62
Add prints for debugging. 2022-09-06 13:29:02 -04:00
Mr_Goldberg
c231c87312
Allow message sending on not yet connected networking sockets. 2022-09-03 04:29:08 -04:00
Mr_Goldberg
373801b3a4
Fix some UDP packet size issues 2022-09-03 04:21:08 -04:00
Mr_Goldberg
05e2c3bef0
Implement TCP_NODELAY, thanks #209 2022-09-03 04:20:03 -04:00
Mr_Goldberg
0800649d8f
Add supported_languages.txt to specify which languages are available in a game. 2022-08-13 14:40:55 -04:00
Mr_Goldberg
a4ef72cb3c
Don't create new client instance when unregistering callbacks. 2022-08-13 14:37:23 -04:00
Mr_Goldberg
0082242a6f
LAN only filtering now properly handles mapped ipv4. 2022-08-13 14:36:34 -04:00
Mr_Goldberg
3abc5976e0
Reset LastError in some functions for game devs that can't code. 2022-08-11 20:52:02 -04:00
Mr_Goldberg
0c16f1942a
Better appticket format. Thanks Nemirtingas. 2022-08-11 20:51:04 -04:00
Mr_Goldberg
c22b3cd3d3
Fix crash. 2022-08-10 03:24:53 -04:00