Skip to content

Commit

Permalink
Enum'd launch config store variable too
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemony committed Oct 7, 2023
1 parent 5dc2450 commit 01b4dc5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/stores/Steam/app_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ struct app_record_s {
CPUType cpu_type = CPUType::Common;
Platform platforms = Platform::All;

std::wstring store = L"Steam";
app_record_s::Store store = app_record_s::Store::Unspecified;
std::wstring executable;
std::wstring executable_path;
std::wstring description;
Expand Down
2 changes: 1 addition & 1 deletion src/stores/Epic/epic_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ SKIF_Epic_GetInstalledAppIDs (std::vector <std::pair < std::string, app_record_s
app_record_s::launch_config_s lc;
lc.id = 0;
lc.valid = true;
lc.store = L"Epic";
lc.store = app_record_s::Store::Epic;
lc.executable = SK_UTF8ToWideChar(jf.at("LaunchExecutable")); // record.install_dir + L"\\" +
lc.executable_path = record.install_dir + L"\\" + lc.executable;
std::replace(lc.executable_path.begin(), lc.executable_path.end(), '/', '\\'); // Replaces all / with \
Expand Down
2 changes: 1 addition & 1 deletion src/stores/GOG/gog_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SKIF_GOG_GetInstalledAppIDs (std::vector <std::pair < std::string, app_record_s
app_record_s::launch_config_s lc;
lc.id = 0;
lc.valid = true;
lc.store = L"GOG";
lc.store = app_record_s::Store::GOG;
lc.executable = szData;
// lc.working_dir = record.install_dir;

Expand Down
4 changes: 2 additions & 2 deletions src/stores/SKIF/custom_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int SKIF_AddCustomAppID (
app_record_s::launch_config_s lc;
lc.id = 0;
lc.valid = true;
lc.store = L"Other";
lc.store = app_record_s::Store::Other;
lc.executable = exeFileName;
lc.executable_path = exe;
lc.working_dir = record.install_dir;
Expand Down Expand Up @@ -291,7 +291,7 @@ void SKIF_GetCustomAppIDs (std::vector<std::pair<std::string, app_record_s>>* ap
app_record_s::launch_config_s lc;
lc.id = 0;
lc.valid = true;
lc.store = L"Other";
lc.store = app_record_s::Store::Other;
lc.executable = szData;
lc.working_dir = record.install_dir;

Expand Down
2 changes: 1 addition & 1 deletion src/stores/Steam/app_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ app_launch_config_s::getExecutableFullPath (int32_t appid, bool validate)
{
std::wstring exec_path = L"";

if (store == L"Steam")
if (store == app_record_s::Store::Steam)
{
// EA games using link2ea:// protocol handlers to launch games does not have an executable,
// so this ensures we do not end up testing the installation folder instead (since this has
Expand Down
1 change: 1 addition & 0 deletions src/stores/Steam/vdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ skValveDataFile::getAppInfo ( uint32_t appid )
auto& id = pAppRecord->id;
auto& launch = launch_cfg.second;

launch.store = app_record_s::Store::Steam;
launch.isBlacklisted (id);

// File extension, so we can strip out non-executable ones
Expand Down
2 changes: 1 addition & 1 deletion src/stores/Xbox/xbox_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ SKIF_Xbox_GetInstalledAppIDs (std::vector <std::pair < std::string, app_record_s
app_record_s::launch_config_s lc;
lc.id = lid;
lc.valid = true;
lc.store = L"Xbox";
lc.store = app_record_s::Store::Xbox;

std::string strAppID = app.attribute("Id").value();

Expand Down

0 comments on commit 01b4dc5

Please sign in to comment.