Commit graph

362 commits

Author SHA1 Message Date
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
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
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
8e8355c013 Add missing header include guards. 2025-02-12 09:35:22 -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
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
Mr_Goldberg
7163daa6c1
Destroy client, network sockets and other objects on shutdown. 2022-08-10 03:24:29 -04:00
Mr_Goldberg
7c419e0afe
Fix overlay crash in games that load then unload steam api dll. 2022-08-07 23:11:21 -04:00
Mr_Goldberg
5ce4ac8429
Add support for multiple languages for achievements. 2022-08-07 23:07:30 -04:00
Mr_Goldberg
0d65114ee6
Fix controller rumble code. 2022-08-07 23:06:43 -04:00
Mr_Goldberg
5234d8b0e6
Implement leaderboard scores. 2022-08-07 04:37:57 -04:00
Mr_Goldberg
ad66573a20
Fix crashes. 2022-08-05 18:45:33 -04:00
Mr_Goldberg
528120d102
Multiple achievements can now use the same stat as a trigger. 2022-08-05 18:44:49 -04:00
Mr_Goldberg
5e880cd974
Add achievements display to overlay and ability to change some settings. 2022-08-05 02:09:43 -04:00
Mr_Goldberg
c17fb0c931
Update Nemirtingas overlay to latest. 2022-08-05 02:06:42 -04:00
Mr_Goldberg
ba877b6e78
sdk 1.55 2022-08-05 01:32:20 -04:00