mirror of
https://github.com/ddeverill/SteamlessController.git
synced 2026-10-22 14:42:16 -05:00
The per-game picker drew on two sources: a Start Menu shortcut walk and the installed MSIX package list. Issue #83 is a user whose app never appeared in it, asking to just point at an .exe. Two structural gaps sat behind that. Launcher-installed games were missing or wrong. Epic shortcuts a game with a .url carrying a com.epicgames.launcher:// URI, and the walk keeps only .url files pointing at Steam, so Epic games were dropped outright — Among Us was invisible on the machine this was written on. Battle.net and Ubisoft write .lnk files targeting the launcher executable with a per-game argument, and IShellLink::GetPath returns only the executable, so a whole Blizzard library collapsed into one wrongly-named "Battle.net Launcher.exe" entry. LauncherGames reads what each launcher records about itself instead: Epic's .item manifests, GOG's and Ubisoft's registry keys, Battle.net's uninstall entries. Those name an install directory rather than an executable, which is the better identity anyway and gets a fourth game-id shape, "dir:". A game folder holds its launcher, its anti-cheat service and the game itself, and which of them reaches the foreground varies by title and by moment — the same reasoning SteamAppLocator already documents for Steam, and MatchProfile resolves these by longest path prefix for the same reason. Nothing without an installer entry could be listed at all, which is the long tail the issue is really about. The picker now offers the applications with a window open right now, and a file browser, both producing an ordinary exe-path id that needed no new plumbing. The running list is the more useful of the two: it asks the user to know nothing about where a game was installed. Also moves the enumeration off the UI thread. It measured 1.4s warm and 5s cold before this change added five sources to it, and OpenRemapWindow was calling it synchronously — the window did not appear until it finished. Fixes #83
19 lines
714 B
C++
19 lines
714 B
C++
#pragma once
|
|
#include <map>
|
|
#include <string>
|
|
#include "TrackpadConfig.h"
|
|
|
|
// Per-game overrides, keyed by the game's id (the same opaque identity
|
|
// GameLibrary::InstalledGame::id produces — an exe path for most shortcuts
|
|
// and for an application the user picked by hand, a "steam://rungameid/N"
|
|
// URI for Steam games, an "aumid:..." for packaged apps, and a
|
|
// "dir:C:\path" install directory for a game found through a launcher's own
|
|
// records). A game with no entry here uses the global default profile
|
|
// instead — most users never create any of these.
|
|
namespace GameProfiles {
|
|
|
|
std::map<std::wstring, ControllerProfile> Load();
|
|
void Save(const std::map<std::wstring, ControllerProfile>& profiles);
|
|
|
|
}
|