Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GameCollector to v4.2.3-2 #78

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1328efd
Switch to GameCollector package for IPlatform.GetGames()
Nutzzz Feb 13, 2024
bffa0af
Use local GameCollector
Nutzzz Feb 13, 2024
b476ec4
Roll back System.Data.SQLite (see Nutzzz/GameCollector#14), update ot…
Nutzzz Feb 13, 2024
f5e8496
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Feb 13, 2024
2010948
Update GameCollector to 4.2.0.4
Nutzzz Feb 14, 2024
39a85ec
Add IconUrl from GameCollector metadata to get auto-download of Custo…
Nutzzz Feb 14, 2024
b2d5ca7
Add argument names to boolean arguments
Nutzzz Feb 15, 2024
4eca834
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Feb 16, 2024
350fa12
Update GameCollector to 4.2.0.5
Nutzzz Feb 16, 2024
dfdcd29
Don't include DLC
Nutzzz Feb 16, 2024
86948ce
Update GameCollector to 4.2.0.5
Nutzzz Feb 16, 2024
11a181c
Add Steam API key
Nutzzz Mar 5, 2024
1365059
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Mar 5, 2024
669fc2a
Use GameCollector's baseOnly parameter rather than checking for null …
Nutzzz Mar 6, 2024
c88ed61
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Mar 6, 2024
2825dba
Add IconUrl from GameCollector metadata to get auto-download of Custo…
Nutzzz Feb 14, 2024
170377c
Don't include DLC
Nutzzz Feb 16, 2024
07d1fa0
Add argument names to boolean arguments
Nutzzz Feb 15, 2024
4b3cee9
Add Steam API key
Nutzzz Mar 5, 2024
77071ec
Update GameCollector to 4.2.0.8
Nutzzz Mar 6, 2024
9c6337d
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Apr 17, 2024
3b3381e
Add Steam API key
Nutzzz Mar 5, 2024
6d5b9d9
Update GameCollector to 4.2.0.8
Nutzzz Feb 16, 2024
38f2134
Merge branch 'gamecollector' into gamecollector-wip
Nutzzz Apr 17, 2024
5d9eae2
Update dependencies
Nutzzz Jul 2, 2024
f22e03d
Try to ensure we're getting the file extension rather than a website TLD
Nutzzz Jul 2, 2024
f9a18fc
Update GameCollector to 4.2.3.2
Nutzzz Jul 2, 2024
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
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<StartupObject>DataConversionTool.Program</StartupObject>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
<FileVersion>1.4.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.326103">
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions GameLauncher_Console/GameLauncher_Console/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@
<setting name="num_steam_id" serializeAs="String">
<value>0</value>
</setting>
<setting name="text_steam_apikey" serializeAs="String">
<value></value>
</setting>
<setting name="text_oculus_username" serializeAs="String">
<value></value>
</setting>
Expand Down
6 changes: 6 additions & 0 deletions GameLauncher_Console/GameLauncher_Console/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ public struct Hotkeys
public ConsoleKey tagsCK2;
public ConsoleKey downloadCK1;
public ConsoleKey downloadCK2;
public ConsoleKey allimgCK1;
public ConsoleKey allimgCK2;
}

public struct Colours
{
public ConsoleColor bgCC;
Expand Down Expand Up @@ -180,6 +183,7 @@ public struct Colours
public const string CFG_IMGPOS = "num_selected_image_y_location_percent";
public const string CFG_COLSIZE = "num_grid_text_min_column_characters";
public const string CFG_STEAMID = "num_steam_id";
public const string CFG_STEAMAPI = "text_steam_apikey";
public const string CFG_OCULUSID = "text_oculus_username";
public const string CFG_ORIGINID = "text_ea_email";
public const string CFG_ORIGINPW = "base64_ea_password";
Expand Down Expand Up @@ -273,6 +277,8 @@ public struct Colours
public const string CFG_KEYRATEDN2 = "key_rating_down_2";
public const string CFG_KEYDLIMG1 = "key_download_image_1";
public const string CFG_KEYDLIMG2 = "key_download_image_2";
public const string CFG_KEYDLALL1 = "key_download_all_images_1";
public const string CFG_KEYDLALL2 = "key_download_all_images_2";
public const string CFG_PATHLEG = "path_legendary_exe";
public const string CFG_TXTMAINT = "text_main_menu_title";
public const string CFG_TXTCFGT = "text_settings_title";
Expand Down
33 changes: 20 additions & 13 deletions GameLauncher_Console/GameLauncher_Console/ConsoleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public CConsoleHelper(int nColumnCount, int nSpacing, int nPaging) //, ConsoleSt
/// </summary>
public enum DockSelection
{
cSel_downloadAll = -26,
cSel_Tags = -25,
cSel_raiseRating = -24,
cSel_lowerRating = -23,
Expand Down Expand Up @@ -269,14 +270,14 @@ public int DisplayCfg(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig
{
if (m_ConsoleState == ConsoleState.cState_Insert)
{
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, true, false, ref game, options.ToArray());
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: true, browse: false, ref game, options.ToArray());
if (code > -1)
CDock.m_nCurrentSelection = code;
CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection);
}
else //if (m_ConsoleState == ConsoleState.cState_Navigate)
{
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, true, false, ref game, options.ToArray());
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: true, browse: false, ref game, options.ToArray());
CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection);
if (options.Count < 2)
CDock.m_nCurrentSelection = -1;
Expand Down Expand Up @@ -412,14 +413,14 @@ public int DisplayFS(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfig.
{
if (m_ConsoleState == ConsoleState.cState_Insert)
{
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, true, ref game, options.ToArray());
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: true, ref game, options.ToArray());
if (code > -1)
CDock.m_nCurrentSelection = code;
CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection);
}
else //if (m_ConsoleState == ConsoleState.cState_Navigate)
{
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, true, ref game, options.ToArray());
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: true, ref game, options.ToArray());
CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection);
if (options.Count < 2)
CDock.m_nCurrentSelection = -1;
Expand Down Expand Up @@ -501,21 +502,21 @@ public int DisplayMenu(CConfig.ConfigVolatile cfgv, CConfig.Hotkeys keys, CConfi
Console.Clear();

DrawMenuTitle(cols);
if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, true);
else DrawInstruct(cols, false);
if (IsSelectionValid(CDock.m_nSelectedPlatform, options.Length)) DrawInstruct(cols, subMenu: true);
else DrawInstruct(cols, subMenu: false);
int nStartY = Console.CursorTop + CDock.INSTRUCT_CUSHION;
int nStopY = CDock.INPUT_BOTTOM_CUSHION + CDock.INPUT_ITEM_CUSHION;

do
{
if (m_ConsoleState == ConsoleState.cState_Insert)
{
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, false, false, ref game, options);
code = HandleInsertMenu(nStartY, nStopY, cfgv, cols, setup: false, browse: false, ref game, options);
CLogger.LogDebug("HandleInsertMenu:{0},{1}", code, CDock.m_nCurrentSelection);
}
else //if (m_ConsoleState == ConsoleState.cState_Navigate)
{
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, false, false, ref game, options);
code = HandleNavigationMenu(nStartY, nStopY, cfgv, keys, cols, setup: false, browse: false, ref game, options);
CLogger.LogDebug("HandleNavigationMenu:{0},{1}", code, CDock.m_nCurrentSelection);
}
if (code == (int)DockSelection.cSel_Exit ||
Expand Down Expand Up @@ -666,10 +667,10 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile
{
CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, CDock.m_nCurrentSelection);
if (selectedGame != null)
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeImage, CDock.locImage, imageColour);
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeImage, CDock.locImage, imageColour);
}
else
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], true, CDock.sizeImage, CDock.locImage, imageColour);
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, options[CDock.m_nCurrentSelection], options[CDock.m_nCurrentSelection], bPlatform: true, CDock.sizeImage, CDock.locImage, imageColour);
}
});
}
Expand Down Expand Up @@ -841,6 +842,9 @@ public int HandleNavigationMenu(int nStartY, int nStopY, CConfig.ConfigVolatile
else if (key == keys.scanCK1 || key == keys.scanCK2)
return (int)DockSelection.cSel_Rescan; // Rescan the registry and the 'CustomGames' folder for new games

else if (key == keys.allimgCK1 || key == keys.allimgCK2)
return (int)DockSelection.cSel_downloadAll; // Rescan the registry and the 'CustomGames' folder for new games

} while (key != keys.selectCK1 && key != keys.selectCK2);

return (int)DockSelection.cSel_Default;
Expand Down Expand Up @@ -963,6 +967,9 @@ public int HandleInsertMenu(int nStartY, int nStopY, CConfig.ConfigVolatile cfgv
else if (strInput.Equals("/icon", CDock.IGNORE_CASE))
return (int)DockSelection.cSel_Image;

else if (strInput.Equals("/allicon", CDock.IGNORE_CASE))
return (int)DockSelection.cSel_downloadAll;

else if (strInput.Equals("/sort", CDock.IGNORE_CASE))
return (int)DockSelection.cSel_Sort;

Expand Down Expand Up @@ -1082,10 +1089,10 @@ public void DrawIcon(int nY, int nItem, string strItem, ConsoleColor? iconColour
if (CDock.m_nSelectedPlatform > -1)
{
CGame selectedGame = GetPlatformGame((GamePlatform)CDock.m_nSelectedPlatform, nItem);
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, false, CDock.sizeIcon, iconPosition, iconColour);
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, selectedGame.Title, selectedGame.Icon, bPlatform: false, CDock.sizeIcon, iconPosition, iconColour);
}
else
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, true, CDock.sizeIcon, iconPosition, iconColour);
CConsoleImage.ShowImage(CDock.m_nCurrentSelection, strItem, strItem, bPlatform: true, CDock.sizeIcon, iconPosition, iconColour);
});
}

Expand Down Expand Up @@ -1440,7 +1447,7 @@ public static void MakeShortcut(string title, string path, string icon, string l
// save it
IPersistFile file = (IPersistFile)link;
if (Directory.Exists(location))
file.Save(Path.Combine(location, title + ".LNK"), false);
file.Save(Path.Combine(location, title + ".LNK"), fRemember: false);
}
catch (Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion GameLauncher_Console/GameLauncher_Console/ConsoleImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static Size GetConsoleFontSize()
}

ConsoleFontInfo cfi = new();
if (!GetCurrentConsoleFont(outHandle, false, cfi))
if (!GetCurrentConsoleFont(outHandle, bMaximumWindow: false, cfi))
{
throw new InvalidOperationException("Unable to get font information.");
}
Expand Down
Loading