otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
191 stars 55 forks source link

steam api 1.60 #246

Open Detanup01 opened 2 days ago

Detanup01 commented 2 days ago

1.60 missing LOT of things for steamtimeline since no idea how would I make it since no SteamClient_GetISteamTimeline function :(

otavepto commented 2 days ago

Oh boy, looks like we're in for a treat :/ Will take a look in the next days

otavepto commented 2 days ago

For later

otavepto commented 1 day ago

I fixed some compilation problems (at least Windows builds locally) and added a basic impl for timeline stuff, it could be used later, either saving it on disk and have an external app listen to the changes like Achievement watcher, or directly used in overlay. I've also added a new param to mods.json for the new TotalFilesSize field.

I'll see if the schema downloaded by gen_emu_config has any data related to branches (name, count, description, ...) and try to create betas/branches.txt like you mentioned in the code comments. Also the new ugc functions seem to depend on branches, might look into them.

otavepto commented 1 day ago

Thank you a lot for this effort

Detanup01 commented 1 day ago

I sorry you had to implement lot of this :( Atleast I kickstarted it :D appinfo have branch data btw. Also no idea how we would make it record the time or something, I might think it save to disk when it happened and what description i guess. no idea about overlay since I dont really care about overlay and functionality with it since rarely using it.

otavepto commented 1 day ago

Hey don't apologize you did a great job adding all of that honestly, always grateful for your contributions. I'm struggling to understand this function int Steam_Apps::GetNumBetas( int *pnAvailable, int *pnPrivate )

This looks like a great sign 😄 image

What is wrong with them this time, they seem really disinterested in their own API. If you have any info or some intuition what this function might be doing let me know because I have absolutely 0 ideas.

Edit: I implemented it like this but the problem is I don't know when to set the flag EBetaBranchFlags::k_EBetaBranch_Available

if (pnAvailable) { // TODO what is this?
    *pnAvailable = 0;
    for (const auto &item : settings->branches) {
        if (item.flags & EBetaBranchFlags::k_EBetaBranch_Available) {
            *pnAvailable += 1;
        }
    }
}
if (pnPrivate) { // TODO what is this?
    *pnPrivate = 0;
    for (const auto &item : settings->branches) {
        if (item.flags & EBetaBranchFlags::k_EBetaBranch_Private) {
            *pnPrivate += 1;
        }
    }
}

return static_cast<int>(settings->branches.size());

Also what is the difference between these 2 ?

k_EBetaBranch_Selected      = 8,    // this is the currently selected branch (active)
k_EBetaBranch_Installed     = 16,   // this is the currently installed branch (mounted)
universal963 commented 16 hours ago

I've tested function "int Steam_Apps::GetNumBetas( int pnAvailable, int pnPrivate )" through real steam using appid 480 and found it very funny that if you pass first parameter with anything than nullptr the steam crashes itself. For second parameter it doesn't change the value so I have no ideas about it either. The return value is 3, just the correct count of the branches found here: https://steamdb.info/app/480/depots/

otavepto commented 3 hours ago

I guess that should be everything

@Detanup01 When you have time I'd appreciate if you review and test it.