Skip to content

Commit

Permalink
Added latest upc exports
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicoala committed Jan 31, 2022
1 parent 662f9d3 commit 9902e18
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
3 changes: 3 additions & 0 deletions UplayR2Unlocker.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unlocker/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Uplay/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
12 changes: 12 additions & 0 deletions UplayR2Unlocker/LinkerExports64.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#pragma comment(linker, "/export:UPC_InstallChunksPresenceCheck=upc_r2_loader64_o.UPC_InstallChunksPresenceCheck")
// #pragma comment(linker, "/export:UPC_InstallLanguageGet=upc_r2_loader64_o.UPC_InstallLanguageGet")
#pragma comment(linker, "/export:UPC_InstallLanguageGet_Extended=upc_r2_loader64_o.UPC_InstallLanguageGet_Extended")
#pragma comment(linker, "/export:UPC_LaunchApp=upc_r2_loader64_o.UPC_LaunchApp")
#pragma comment(linker, "/export:UPC_MultiplayerInvite=upc_r2_loader64_o.UPC_MultiplayerInvite")
#pragma comment(linker, "/export:UPC_MultiplayerInviteAnswer=upc_r2_loader64_o.UPC_MultiplayerInviteAnswer")
#pragma comment(linker, "/export:UPC_MultiplayerSessionClear=upc_r2_loader64_o.UPC_MultiplayerSessionClear")
Expand Down Expand Up @@ -81,6 +82,17 @@
#pragma comment(linker, "/export:UPC_StoreProductListFree=upc_r2_loader64_o.UPC_StoreProductListFree")
#pragma comment(linker, "/export:UPC_StoreProductListGet=upc_r2_loader64_o.UPC_StoreProductListGet")
#pragma comment(linker, "/export:UPC_StoreProductsShow=upc_r2_loader64_o.UPC_StoreProductsShow")
#pragma comment(linker, "/export:UPC_StreamingCurrentUserCountryFree=upc_r2_loader64_o.UPC_StreamingCurrentUserCountryFree")
#pragma comment(linker, "/export:UPC_StreamingCurrentUserCountryGet=upc_r2_loader64_o.UPC_StreamingCurrentUserCountryGet")
#pragma comment(linker, "/export:UPC_StreamingDeviceTypeGet=upc_r2_loader64_o.UPC_StreamingDeviceTypeGet")
#pragma comment(linker, "/export:UPC_StreamingInputGamepadTypeGet=upc_r2_loader64_o.UPC_StreamingInputGamepadTypeGet")
#pragma comment(linker, "/export:UPC_StreamingInputTypeGet=upc_r2_loader64_o.UPC_StreamingInputTypeGet")
#pragma comment(linker, "/export:UPC_StreamingNetworkDelayForInputGet=upc_r2_loader64_o.UPC_StreamingNetworkDelayForInputGet")
#pragma comment(linker, "/export:UPC_StreamingNetworkDelayForVideoGet=upc_r2_loader64_o.UPC_StreamingNetworkDelayForVideoGet")
#pragma comment(linker, "/export:UPC_StreamingNetworkDelayRoundtripGet=upc_r2_loader64_o.UPC_StreamingNetworkDelayRoundtripGet")
#pragma comment(linker, "/export:UPC_StreamingResolutionFree=upc_r2_loader64_o.UPC_StreamingResolutionFree")
#pragma comment(linker, "/export:UPC_StreamingResolutionGet=upc_r2_loader64_o.UPC_StreamingResolutionGet")
#pragma comment(linker, "/export:UPC_StreamingTypeGet=upc_r2_loader64_o.UPC_StreamingTypeGet")
#pragma comment(linker, "/export:UPC_TicketGet=upc_r2_loader64_o.UPC_TicketGet")
#pragma comment(linker, "/export:UPC_TicketGet_Extended=upc_r2_loader64_o.UPC_TicketGet_Extended")
#pragma comment(linker, "/export:UPC_Uninit=upc_r2_loader64_o.UPC_Uninit")
Expand Down
8 changes: 4 additions & 4 deletions UplayR2Unlocker/UplayR2Unlocker.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEVERSION 2,1,0,0
PRODUCTVERSION 2,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "acidicoala"
VALUE "FileDescription", "Legit DLC Unlocker for Uplay R2"
VALUE "FileVersion", "2.0.0.0"
VALUE "FileVersion", "2.1.0.0"
VALUE "InternalName", "UplayR2U.dll"
VALUE "LegalCopyright", "Credit to Mr_Goldberg"
VALUE "OriginalFilename", "UplayR2U.dll"
VALUE "ProductName", "Uplay R2 Unlocker"
VALUE "ProductVersion", "2.0.0.0"
VALUE "ProductVersion", "2.1.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions UplayR2Unlocker/framework.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <codeanalysis\warnings.h>
#include <codeanalysis/warnings.h>

#include <string>
#include <filesystem>
Expand All @@ -10,7 +10,7 @@
#pragma warning(disable: ALL_CODE_ANALYSIS_WARNINGS)

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h> // Windows Header Files
#include <Windows.h> // Windows Header Files

#define SPDLOG_WCHAR_TO_UTF8_SUPPORT
#include <spdlog/spdlog.h>
Expand Down
6 changes: 3 additions & 3 deletions UplayR2Unlocker/upc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ EXPORT int UPC_Init(unsigned version, int appID) {
logger->info("{} -> version: {}, appid: {}", __func__, version, appID);

products.emplace_back(Product(appID, ProductType::App));
for (auto& dlc : config->dlcs) {
for (const auto& dlc : config->dlcs) {
products.emplace_back(Product(dlc, ProductType::DLC));
}

for (auto& item : config->items) {
for (const auto& item : config->items) {
products.emplace_back(Product(item, ProductType::Item));
}

Expand Down Expand Up @@ -133,7 +133,7 @@ EXPORT int UPC_ProductListGet(void* context, char* inOptUserIdUtf8, unsigned int
productList->length = (uint32_t)products.size();
*outProductList = productList;

auto callbackContainer = new CallbackContainer{
const auto callbackContainer = new CallbackContainer{
context,
inCallback,
inCallbackData
Expand Down
1 change: 1 addition & 0 deletions UplayR2Unlocker/upc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include "framework.h"

namespace UPC
{
Expand Down
2 changes: 1 addition & 1 deletion UplayR2Unlocker/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using std::shared_ptr;
using std::filesystem::absolute;
using std::filesystem::path;

constexpr auto VERSION = "2.0.0";
constexpr auto VERSION = "2.1.0";

// Source: Polyhook 2
template<typename T>
Expand Down

0 comments on commit 9902e18

Please sign in to comment.