Commit graph

687 commits

Author SHA1 Message Date
redpolline
b8bcc81473 Implement SteamAPI_WriteMiniDump. 2025-02-08 11:17:38 -05:00
redpolline
a015cf1095 Prevent overlay crash if no achievements are defd.
Disable the "show achievements" button too.
2025-02-08 11:17:37 -05:00
redpolline
14b3c49a5d HACK: Wine DX10 and DX11 Detection.
Wine doesn't implement the NULL renderer, and tries to fallback to the
REFERENCE renderer. Which then also fails when we try to create a 1x1
DXGI_USAGE_RENDER_TARGET_OUTPUT swapchain.

Until Wine manages to get a NULL renderer working, just use the WARP
renderer instead. (Which Wine also doesn't implement and falls back to
the hardware renderer for, but at least it works properly.)
2025-02-08 11:17:37 -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
72e27588a9 Add PDB generation to release builds & LC x64.
Adds pdb generation to windows release builds. (Easier debugging.)

Adds lobby_connect x64 windows builds. (release and debug.)
2025-02-08 11:17:37 -05:00
redpolline
8919581be7 Rate limit Settings::background_monitor. 2025-02-08 11:17:37 -05:00
redpolline
f6fb664c38 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-08 11:17:37 -05:00
redpolline
c1ae5f2732 Clang fixes. 2025-02-08 11:17:37 -05:00
redpolline
cc0ffdcbdc 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-08 11:17:36 -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
9fc401a23f Add Overlay UI functions.
Too many things to list.
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
2604689181 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-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
8a9cf17c31 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-08 11:17:34 -05:00
redpolline
b037944bab Wine + Enscripten fixes for OpenGL_Hook.cpp. 2025-02-08 11:17:34 -05:00
redpolline
8c2adae67e Extra debugging log functions. 2025-02-08 11:17:33 -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
d291abb48c Add 32bit registry view editing to ColdClientLoader. 2025-02-08 11:17:31 -05:00
redpolline
599f223800 Set env:SteamAppPath in steamclient_loader. 2025-02-08 11:17:29 -05:00
redpolline
e217bd0a8d Add missing header include guards. 2025-02-08 11:17:27 -05:00
redpolline
611cf69206 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.
2025-02-08 11:14:59 -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