Skip to content

Commit 5239cd5

Browse files
Merge pull request #577 from loathingKernel/develop
Various chores
2 parents 9ca3be5 + 880f199 commit 5239cd5

File tree

4 files changed

+46
-13
lines changed

4 files changed

+46
-13
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ If you don't have a GitHub account or you just want to chat, you also can contac
5656
https://discord.gg/YvmABK9YSk
5757

5858

59+
## Common issues
60+
* If you are using multiple accounts, there is a chance that at some point you will not be able to log in into your account and see something like the following.
61+
> Login failed. Decryption of EPIC launcher user information failed.
62+
63+
In that case navigate to one of the following directorories depending on your operating system and delete `user.json`
64+
65+
| OS | Path |
66+
|---------|------------------------------------|
67+
| Windows | `%USERPROFILE%\.config\legendary\` |
68+
| Linux | `$HOME/.config/legendary/` |
69+
| macOS | `$HOME/.config/legendary/` |
70+
5971

6072
## Installation
6173

rare/commands/subreaper.py

100644100755
Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
#!/usr/bin/env python3
2+
13
import logging
24
import os
35
import sys
46
from argparse import Namespace
5-
from ctypes import CDLL, c_int, c_ulong
7+
from ctypes import CDLL, c_int, c_ulong, create_string_buffer, byref
68
from ctypes.util import find_library
79
from logging import getLogger
810
from typing import List
911

1012
# Constant defined in prctl.h
1113
# See prctl(2) for more details
14+
PR_SET_NAME = 15
1215
PR_SET_CHILD_SUBREAPER = 36
1316

1417

@@ -25,22 +28,32 @@ def subreaper(args: Namespace, other: List[str]) -> int:
2528
stream=sys.stderr,
2629
)
2730

31+
logger.debug("command: %s", args)
32+
logger.debug("arguments: %s", other)
33+
2834
command: List[str] = [args.command, *other]
2935
workdir: str = args.workdir
30-
wait_status: int = 0
36+
child_status: int = 0
3137

3238
libc: str = get_libc()
3339
prctl = CDLL(libc).prctl
3440
prctl.restype = c_int
3541
prctl.argtypes = [
3642
c_int,
37-
c_ulong,
38-
c_ulong,
39-
c_ulong,
40-
c_ulong,
43+
# c_ulong,
44+
# c_ulong,
45+
# c_ulong,
46+
# c_ulong,
4147
]
48+
49+
proc_name = b"reaper"
50+
buff = create_string_buffer(len(proc_name)+1)
51+
buff.value = proc_name
52+
prctl_ret = prctl(PR_SET_NAME, byref(buff), 0, 0, 0)
53+
logger.debug("prctl PR_SET_NAME exited with status: %s", prctl_ret)
54+
4255
prctl_ret = prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0, 0)
43-
logger.debug("prctl exited with status: %s", prctl_ret)
56+
logger.debug("prctl PR_SET_CHILD_SUBREAPER exited with status: %s", prctl_ret)
4457

4558
pid = os.fork() # pylint: disable=E1101
4659
if pid == -1:
@@ -54,13 +67,20 @@ def subreaper(args: Namespace, other: List[str]) -> int:
5467

5568
while True:
5669
try:
57-
wait_pid, wait_status = os.wait() # pylint: disable=E1101
58-
logger.info("Child %s exited with wait status: %s", wait_pid, wait_status)
70+
child_pid, child_status = os.wait() # pylint: disable=E1101
71+
logger.info("Child %s exited with wait status: %s", child_pid, child_status)
5972
except ChildProcessError as e:
6073
logger.info(e)
6174
break
6275

63-
return wait_status
76+
return child_status
77+
78+
79+
if __name__ == "__main__":
80+
sep = sys.argv.index("--")
81+
argv = sys.argv[sep+1:]
82+
args = Namespace(command=argv.pop(0), workdir=os.getcwd(), debug=True)
83+
subreaper(args, argv)
6484

6585

66-
__all__ = ["subreaper"]
86+
__all__ = ["subreaper"]

rare/components/tabs/settings/widgets/proton.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def __on_proton_changed(self, index):
113113
self.tool_prefix.setEnabled(steam_tool is not None)
114114
if steam_tool:
115115
if not (compatdata_path := config.get_proton_compatdata(self.app_name, fallback="")):
116-
compatdata_path = proton_compat_dir(RareCore.instance().get_game(self.app_name).folder_name)
116+
folder_name = self.app_name if self.app_name == "default" else RareCore.instance().get_game(self.app_name).folder_name
117+
compatdata_path = proton_compat_dir(folder_name)
117118
config.adjust_proton_compatdata(self.app_name, str(compatdata_path))
118119
self.tool_prefix.setText(str(compatdata_path))
119120
else:

rare/components/tabs/store/store_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919

2020
logger = getLogger("StoreAPI")
21-
graphql_url = "https://graphql.epicgames.com/graphql"
21+
graphql_url = "https://store.epicgames.com/graphql"
2222

2323

2424
def DEBUG() -> bool:

0 commit comments

Comments
 (0)