Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion programs/belauncher/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
battleye_status = 0x9; /* Launching Game */
_write(1, &battleye_status, 1);

if (PathIsRelativeW(game_exeW))
if (PathIsRelativeW(game_exeW) || game_exeW[0] == L'\\')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be useful to add a comment about game_exeW[0] == L'\\'.

I'm not a Windows dev, but I searched around and it seems leading backslash is supposed to translate to the root of the disk we're currently in.

That implies the line game_exeW[0] == L'\\' is working around BattleEye bug, where it translates the dir incorrectly (i.e. the game that works on Windows actually wasn't supposed to work there either).

So, I think it's useful to add a comment explaining the situation, i.e. why exactly we do the game_exeW[0] == L'\\' check here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive just applied some comments to help identify that.

path_len = wcslen(path);
else
path_len = 0;
Expand Down