ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.16k stars 214 forks source link

Star Citizen's launcher starts behind main game #1379

Open pquerner opened 5 months ago

pquerner commented 5 months ago

Hello!

Is it possible to filter application by name, for example by exact .exe name or otherwise?

Sometimes applications sit behind a launcher and these launchers cannot be avoided.

For example "Star Citizen". The launcher launches an OAuth login which then is saved to a local file. The real application - the game - then reads that credential file or otherwise gets told that it should look for the file and thus allows a game session to connect.

Without a filter you would also possible target the launcher - which may or may not be wanted. With a filter you'd have the tool to work around above described issue.

Thanks for reading.

kisak-valve commented 5 months ago

Hello @pquerner, this request is entirely unrelated to gamescope and not platform specific as well. You'll want to post this on the community forums at https://steamcommunity.com/discussions/forum/10/.

pquerner commented 5 months ago

Hello kisak,

I dont understand how its unrelated to this repo.

But thanks for consideration.

kisak-valve commented 5 months ago

Sorry, I misread the intent of this issue report. It should be focusing on Star Citizen's (mis-)behavior with the game's startup sequence.

pquerner commented 5 months ago

Hello,

I still don't think its correct. What can I do to clarify it more? :)

The launcher of Star Citizen does not start behind main game.

But when you run gamescope with the launcher (because thats the only way afaik how you are able to run the actual game), you would end up affecting the launcher (if you want to render it at 720p and scale up; while only the main game should've been affected) - which you probably didnt intend.

gamescope should've only work on the game - not its launcher.

ninjaquick commented 4 months ago

This can sort of be worked around by launching the game directly after launching the game using the launcher. The issue is basically the game uses a launcher and since you're gamescope .../../../../RSILauncher.exe it follows the rsi launcher and all children will be in gamescope.

when you launch the game in the launcher it will create a file called loginData.json in the game folder. StarCitizen_Launcher.exe reads this for settings. Example:

GAMEID=umu-starcitizen STORE=none umu-run '/home/daniel/Games/star-citizen/drive_c/Program Files/Roberts Space Industries/StarCitizen/LIVE/StarCitizen_Launcher.exe' -platform wayland -no_login_dialog -envtag PUB --client-login-show-dialog 0 --services-config-enabled 1 --system-trace-service-enabled 1 --system-trace-env-id pub-sc-alpha-3231-9204897 --grpc-client-endpoint-override https://pub-sc-alpha-3231-9204897.test1.cloudimperiumgames.com:443

you can get the command arguments for SC_launcher in the settings.json inside /LIVE/EasyAntiCheat/Settings.json folder

This launches the game directly, EAC doesn't error, the game logs in and you can get in game. No launcher needed.

The loginData.json file is deleted when you quit/ALT-F4 the game, so you need to kill the game or copy the file to keep it alive. The loginData stores your auth token which from my testing is not something that changes often enough to break launching the game this way.

Now the issue I'm having is the same old mouse warp issue that's plagued this game from time immemorial.

pquerner commented 4 months ago

Thats a good work around and a way I found worthy of exploring aswell but havent had the time to do myself. I didnt know the oauth tokens from loginData.json stay active. Probably its just a JWT and one can find out when they expire.

However, I wanted this issue to be not explicit about Star Citizen and therefore only gave Star Citizen as an example.

A much easier way of handling all this is by having a "dont do this .exe" list which gamescope then ignores. (Alteast thats how I imagine it)

Offtopic: mouse warping happens for me only in vulkan. X11 and directX is fine to play.