Skip to content

Commit

Permalink
Added implementations for steam_stats_ready and steam_initialised.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Sep 9, 2023
1 parent 412c013 commit 29661dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ target_link_libraries(YoYoLoader
mathneon
mpg123
curl
ssl
-Wl,--whole-archive ssl -Wl,--no-whole-archive
crypto
taihen_stub
kubridge_stub
Expand Down Expand Up @@ -122,7 +122,7 @@ target_link_libraries(YoYoLoader
SceShaccCgExt
mathneon
curl
ssl
-Wl,--whole-archive ssl -Wl,--no-whole-archive
crypto
taihen_stub
kubridge_stub
Expand Down
10 changes: 10 additions & 0 deletions loader/trophies.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ void achievements_available(retval_t *ret, void *self, void *other, int argc, re
ret->rvalue.val = trophies_available ? 1.0f : 0.0f;
}

void steam_stats_ready(retval_t *ret, void *self, void *other, int argc, retval_t *args) {
ret->rvalue.val = trophies_available ? 1.0f : 0.0f;
}

void steam_initialised(retval_t *ret, void *self, void *other, int argc, retval_t *args) {
ret->rvalue.val = trophies_available ? 1.0f : 0.0f;
}

void achievements_post(retval_t *ret, void *self, void *other, int argc, retval_t *args) {
float progress = YYGetFloat(args, 1);
if (progress == 100.0f) {
Expand All @@ -194,6 +202,8 @@ void patch_trophies() {

Function_Add("steam_set_achievement", steam_set_achievement, 1, 0);
Function_Add("steam_get_achievement", steam_get_achievement, 1, 0);
Function_Add("steam_stats_ready", steam_stats_ready, 0, 0);
Function_Add("steam_initialised", steam_initialised, 0, 0);
Function_Add("achievement_available", achievements_available, 0, 0);
Function_Add("YoYo_AchievementsAvailable", achievements_available, 0, 0);
Function_Add("achievement_post", achievements_post, 2, 0);
Expand Down

0 comments on commit 29661dd

Please sign in to comment.