Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/proton_5.0-next' into patch-1
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
Newbytee committed Apr 14, 2020
2 parents 045c308 + 3cb13d8 commit cafefae
Show file tree
Hide file tree
Showing 99 changed files with 42,069 additions and 1,715 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/dist
/build
/dist-*
/obj-*
/syn-*

/vrclient_x64/vrclient_x64/Makefile

/.vagrant/
/vagrant_share/
2 changes: 1 addition & 1 deletion FAudio
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,12 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| <tt>nod3d10</tt> | <tt>PROTON_NO_D3D10</tt> | Disable <tt>d3d10.dll</tt> and <tt>dxgi.dll</tt>, for d3d10 games which can fall back to and run better with d3d9. |
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
| <tt>nofsync</tt> | <tt>PROTON_NO_FSYNC</tt> | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) |
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. |
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
| <tt>noforcelgadd</tt> | | Disable forcelgadd. If both this and `forcelgadd` are set, enabled wins. |
| <tt>oldglstr</tt> | <tt>PROTON_OLD_GL_STRING</tt> | Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. |
| | <tt>WINE_FULLSCREEN_INTEGER_SCALING</tt> | Enable integer scaling mode, to give sharp pixels when upscaling. |
| <tt>cmdlineappend:</tt>| | Append the string after the colon as an argument to the game command. May be specified more than once. Escape commas and backslashes with a backslash. |
| <tt>d9vk</tt> | <tt>PROTON_USE_D9VK</tt> | **Note: Obsoleted in Proton 5.0.** In older versions, use Vulkan-based DXVK instead of OpenGL-based wined3d for d3d9. |
| <tt>seccomp</tt> | <tt>PROTON_USE_SECCOMP</tt> | Enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. |

<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Vagrant.configure(2) do |config|
config.vagrant.plugins = "vagrant-sshfs"

config.vm.provider "virtualbox" do |v|
v.cpus = cpus
v.cpus = [cpus, 32].min # virtualbox limit is 32 cpus
v.memory = memory
end

Expand Down
14 changes: 7 additions & 7 deletions build/makefile_base.mak
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ redist: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))

module32: SHELL = $(CONTAINER_SHELL32)
module32:
cd $(WINE_OBJ32)/dlls/$(module) && make
+$(MAKE) -C $(WINE_OBJ32)/dlls/$(module)

module64: SHELL = $(CONTAINER_SHELL64)
module64:
cd $(WINE_OBJ64)/dlls/$(module) && make
+$(MAKE) -C $(WINE_OBJ64)/dlls/$(module)

module: module32 module64

Expand Down Expand Up @@ -750,7 +750,6 @@ GST_GOOD_MESON_ARGS := \
-Dcairo=disabled \
-Dcutter=disabled \
-Ddebugutils=disabled \
-Ddeinterlace=disabled \
-Ddtmf=disabled \
-Deffectv=disabled \
-Dequalizer=disabled \
Expand Down Expand Up @@ -1047,6 +1046,7 @@ $(LSTEAMCLIENT_CONFIGURE_FILES64): $(LSTEAMCLIENT64) $(MAKEFILE_DEP) | $(LSTEAMC
-I"../$(TOOLS_DIR64)"/include/ \
-I"../$(TOOLS_DIR64)"/include/wine/ \
-I"../$(TOOLS_DIR64)"/include/wine/windows/ \
-I"../$(WINE)"/include/ \
-L"../$(TOOLS_DIR64)"/lib64/ \
-L"../$(TOOLS_DIR64)"/lib64/wine/ \
--dll ../$(LSTEAMCLIENT64) && \
Expand All @@ -1065,6 +1065,7 @@ $(LSTEAMCLIENT_CONFIGURE_FILES32): $(LSTEAMCLIENT32) $(MAKEFILE_DEP) | $(LSTEAMC
-I"../$(TOOLS_DIR32)"/include/ \
-I"../$(TOOLS_DIR32)"/include/wine/ \
-I"../$(TOOLS_DIR32)"/include/wine/windows/ \
-I"../$(WINE)"/include/ \
-L"../$(TOOLS_DIR32)"/lib/ \
-L"../$(TOOLS_DIR32)"/lib/wine/ \
--dll ../$(LSTEAMCLIENT32) && \
Expand Down Expand Up @@ -1125,12 +1126,11 @@ $(STEAMEXE_CONFIGURE_FILES): $(STEAMEXE_SYN) $(MAKEFILE_DEP) | $(STEAMEXE_OBJ) $
-I"../$(TOOLS_DIR32)"/include/ \
-I"../$(TOOLS_DIR32)"/include/wine/ \
-I"../$(TOOLS_DIR32)"/include/wine/windows/ \
-I"../$(TOOLS_DIR32)"/include/wine/msvcrt/ \
-I"../$(SRCDIR)"/lsteamclient/steamworks_sdk_142/ \
-L"../$(TOOLS_DIR32)"/lib/ \
-L"../$(TOOLS_DIR32)"/lib/wine/ \
-L"../$(SRCDIR)"/steam_helper/ \
--guiexe ../$(STEAMEXE_SYN) && \
--guiexe --nomsvcrt ../$(STEAMEXE_SYN) && \
cp ../$(STEAMEXE_SYN)/Makefile . && \
echo >> ./Makefile 'SRCDIR := ../$(STEAMEXE_SYN)' && \
echo >> ./Makefile 'vpath % $$(SRCDIR)' && \
Expand All @@ -1148,7 +1148,7 @@ steam_configure: $(STEAMEXE_CONFIGURE_FILES)

steam: SHELL = $(CONTAINER_SHELL32)
steam: $(STEAMEXE_CONFIGURE_FILES) | $(WINE_BUILDTOOLS32) $(filter $(MAKECMDGOALS),wine64 wine32 wine)
+env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" \
+env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-std=gnu++11 -m32 -Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" \
$(MAKE) -C $(STEAMEXE_OBJ)
[ x"$(STRIP)" = x ] || $(STRIP) $(STEAMEXE_OBJ)/steam.exe.so
mkdir -pv $(DST_DIR)/lib/wine/
Expand Down Expand Up @@ -1280,7 +1280,7 @@ $(VRCLIENT32): $(VRCLIENT) $(MAKEFILE_DEP)
rm -rf ./$(VRCLIENT32)
mkdir -p $(VRCLIENT32)/vrclient
cd $(VRCLIENT32)/vrclient && \
ln -sfv ../../$(VRCLIENT)/vrclient_x64/*.{c,cpp,dat,h,spec} .
ln -sfv ../../$(VRCLIENT)/vrclient_x64/* .
mv $(VRCLIENT32)/vrclient/vrclient_x64.spec $(VRCLIENT32)/vrclient/vrclient.spec

# 64bit-configure
Expand Down
2 changes: 1 addition & 1 deletion dxvk
Submodule dxvk updated 100 files
81 changes: 75 additions & 6 deletions lsteamclient/steamclient_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "winnls.h"
#include "wine/debug.h"
#include "wine/library.h"
#include "wine/list.h"
#include "steam_defs.h"

#ifdef __linux__
Expand All @@ -18,12 +19,16 @@

#include "steamclient_private.h"

#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))

WINE_DEFAULT_DEBUG_CHANNEL(steamclient);

char g_tmppath[PATH_MAX];

static char *controller_glyphs[512]; /* at least k_EControllerActionOrigin_Count */

static CRITICAL_SECTION steamclient_cs = { NULL, -1, 0, 0, 0, 0 };

BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
Expand All @@ -38,6 +43,33 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
return TRUE;
}

void sync_environment(void)
{
static const char *steamapi_envs[] =
{
"SteamAppId",
"IgnoreChildProcesses",
};

char value[32767];

for (unsigned int i = 0; i < ARRAY_SIZE(steamapi_envs); i++)
{
if (!GetEnvironmentVariableA(steamapi_envs[i], value, ARRAY_SIZE(value)))
{
if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
{
TRACE("unsetenv(\"%s\")\n", steamapi_envs[i]);
unsetenv(steamapi_envs[i]);
}
continue;
}

TRACE("setenv(\"%s\", \"%s\", 1)\n", steamapi_envs[i], value);
setenv(steamapi_envs[i], value, 1);
}
}

/* returns the number of bytes written to dst, not including the NUL terminator */
unsigned int steamclient_unix_path_to_dos_path(bool api_result, const char *src, char *dst, uint32 dst_bytes, int is_url)
{
Expand Down Expand Up @@ -355,23 +387,58 @@ static const struct {
#include "win_constructors_table.dat"
};

struct steamclient_interface
{
struct list entry;
const char *name;
void *linux_side;
void *interface;
};

static struct list steamclient_interfaces = LIST_INIT(steamclient_interfaces);

void *create_win_interface(const char *name, void *linux_side)
{
struct steamclient_interface *e;
void *ret = NULL;
int i;

TRACE("trying to create %s\n", name);

if(!linux_side)
if (!linux_side)
return NULL;

for(i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i){
if(!strcmp(name, constructors[i].iface_version))
return constructors[i].ctor(linux_side);
EnterCriticalSection(&steamclient_cs);

LIST_FOR_EACH_ENTRY(e, &steamclient_interfaces, struct steamclient_interface, entry)
{
if (e->linux_side == linux_side && !strcmp(e->name, name))
{
ret = e->interface;
TRACE("-> %p\n", ret);
goto done;
}
}

ERR("Don't recognize interface name: %s\n", name);
for (i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i)
{
if (!strcmp(name, constructors[i].iface_version))
{
e = HeapAlloc(GetProcessHeap(), 0, sizeof(*e));
e->name = constructors[i].iface_version;
e->linux_side = linux_side;
e->interface = constructors[i].ctor(linux_side);
list_add_tail(&steamclient_interfaces, &e->entry);

ret = e->interface;
break;
}
}

return NULL;
done:
LeaveCriticalSection(&steamclient_cs);
if (!ret) ERR("Don't recognize interface name: %s\n", name);
return ret;
}

static void *steamclient_lib;
Expand All @@ -388,6 +455,8 @@ static int load_steamclient(void)
if(steamclient_lib)
return 1;

sync_environment();

#ifdef __APPLE__
if(getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH")){
snprintf(path, PATH_MAX, "%s/steamclient.dylib", getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH"));
Expand Down
Loading

0 comments on commit cafefae

Please sign in to comment.