diff options
author | moonshadow565 | 2023-12-27 21:50:38 +0100 |
---|---|---|
committer | moonshadow565 | 2023-12-27 21:50:38 +0100 |
commit | 6f12e53ef7823ae62a0c8e3f4d12505b23dcf399 (patch) | |
tree | d65c8954c620fb02c666e05c185f8bcdc5a2f080 | |
parent | 8838ef4292aa0d05eb2ef35efae954b9ea6fae47 (diff) | |
download | aur-6f12e53ef7823ae62a0c8e3f4d12505b23dcf399.tar.gz |
cleaner fix for slow start
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0005-LoL-client-slow-start-fix.patch | 22 | ||||
-rw-r--r-- | 0013-server-error-on-connect-to-zero.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 12 |
4 files changed, 34 insertions, 30 deletions
@@ -114,18 +114,18 @@ pkgbase = wine-lol-staging source = git+https://gitlab.winehq.org/wine/wine-staging.git#tag=v8.21 source = git+https://gitlab.winehq.org/wine/wine.git#tag=wine-8.21 source = 0004-LoL-broken-client-update-fix.patch - source = 0005-LoL-client-slow-start-fix.patch source = 0008-ntdll-nopguard-call_vectored_handlers.patch source = 0009-kernel32-dont-create-console-when-not-cui.patch source = 0011-ntdll-signal_set_full_context-amd64.patch source = 0012-ntdll-implement-ntcontinueex.patch + source = 0013-server-error-on-connect-to-zero.patch sha256sums = SKIP sha256sums = SKIP sha256sums = 7607a84fd357a86bc8fb59d2cf002a3e471bd8ec78ecdb844b0b77b1ae6d11a0 - sha256sums = 49dfbf7546c00958e2b426a61371eedf0119471e9998b354595d5c0ce6dab48b sha256sums = 2075ddc417ddd11954f76be753c88e04db28f0b3937e60508f178630dd5763eb sha256sums = b19443ba1e01014ab478b03ac84797df2d481432798259371d94e4ba2e7b317c sha256sums = 8dfef7fdbeb4bf503f72c2b3a15033849f67197d6d9571135369b4b0183ea213 sha256sums = 8bb15743e589f7505817309122e04af8cb99e12459a9b4ef05b14eeef10ccc83 + sha256sums = 1c58cd6efaf0c74c83b8a887fc79d3d23f427e14edd08eeef3bfc568b281caaa pkgname = wine-lol-staging diff --git a/0005-LoL-client-slow-start-fix.patch b/0005-LoL-client-slow-start-fix.patch deleted file mode 100644 index 77c905ca273a..000000000000 --- a/0005-LoL-client-slow-start-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index 3d0c2deca35..b0c03d992d4 100644 ---- a/dlls/ws2_32/socket.c -+++ b/dlls/ws2_32/socket.c -@@ -2516,6 +2516,17 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr, - - TRACE( "read %p, write %p, except %p, timeout %p\n", read_ptr, write_ptr, except_ptr, timeout ); - -+ static int is_RCS = -1; -+ if (is_RCS < 0) { -+ is_RCS = GetModuleHandleA(NULL) == GetModuleHandleA("RiotClientServices.exe"); -+ } -+ const struct timeval zero_tv = { 0, 1000 }; -+ if (is_RCS && read_ptr && write_ptr && except_ptr && timeout && timeout->tv_sec == 1 && timeout->tv_usec == 0) { -+ if (read_ptr->fd_count >= 4 && read_ptr->fd_count <= 8 && write_ptr->fd_count == 0 && except_ptr->fd_count == 1) { -+ timeout = &zero_tv; -+ } -+ } -+ - if (!(sync_event = get_sync_event())) return -1; - - if (read_ptr) poll_count += read_ptr->fd_count; diff --git a/0013-server-error-on-connect-to-zero.patch b/0013-server-error-on-connect-to-zero.patch new file mode 100644 index 000000000000..ee68329f98d3 --- /dev/null +++ b/0013-server-error-on-connect-to-zero.patch @@ -0,0 +1,26 @@ +diff --git a/server/sock.c b/server/sock.c +index 84c0d4a4931..b33d06aa706 100644 +--- a/server/sock.c ++++ b/server/sock.c +@@ -2647,6 +2647,21 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) + if (unix_addr.addr.sa_family == AF_INET && !memcmp( &unix_addr.in.sin_addr, magic_loopback_addr, 4 )) + unix_addr.in.sin_addr.s_addr = htonl( INADDR_LOOPBACK ); + ++ /* NOTE: winsock treats 0.0.0.0 address as special case error. */ ++ /* TODO: this should also work for AF_INET6, AF_IPX, AF_... */ ++ if (unix_addr.addr.sa_family == AF_INET && unix_addr.in.sin_addr.s_addr == 0 && unix_addr.in.sin_port == 0) ++ { ++ /* TODO: Microsoft docs mention that socket can not be connect-ed after this. ++ * Maybe shutdown and transition to special state for this? */ ++ sock->errors[AFD_POLL_BIT_CONNECT_ERR] = EADDRNOTAVAIL; ++ set_error( sock_get_ntstatus( EADDRNOTAVAIL ) ); ++ post_socket_event( sock, AFD_POLL_BIT_CONNECT_ERR ); ++ ++ /* NOTE: Some applications rely on this behaviour as a mechanism to abort select from another thread. */ ++ async_wake_up( &sock->poll_q, STATUS_SUCCESS ); ++ return; ++ } ++ + memcpy( &peer_addr, &unix_addr, sizeof(unix_addr) ); + ret = connect( unix_fd, &unix_addr.addr, unix_len ); + if (ret < 0 && errno == ECONNABORTED) @@ -16,21 +16,21 @@ options=('staticlibs' '!lto' '!strip') source=("git+https://gitlab.winehq.org/wine/wine-staging.git#tag=v${_winever}" "git+https://gitlab.winehq.org/wine/wine.git#tag=wine-${_winever}" "0004-LoL-broken-client-update-fix.patch" - "0005-LoL-client-slow-start-fix.patch" "0008-ntdll-nopguard-call_vectored_handlers.patch" "0009-kernel32-dont-create-console-when-not-cui.patch" "0011-ntdll-signal_set_full_context-amd64.patch" "0012-ntdll-implement-ntcontinueex.patch" + "0013-server-error-on-connect-to-zero.patch" ) sha256sums=('SKIP' 'SKIP' '7607a84fd357a86bc8fb59d2cf002a3e471bd8ec78ecdb844b0b77b1ae6d11a0' - '49dfbf7546c00958e2b426a61371eedf0119471e9998b354595d5c0ce6dab48b' '2075ddc417ddd11954f76be753c88e04db28f0b3937e60508f178630dd5763eb' 'b19443ba1e01014ab478b03ac84797df2d481432798259371d94e4ba2e7b317c' '8dfef7fdbeb4bf503f72c2b3a15033849f67197d6d9571135369b4b0183ea213' '8bb15743e589f7505817309122e04af8cb99e12459a9b4ef05b14eeef10ccc83' + '1c58cd6efaf0c74c83b8a887fc79d3d23f427e14edd08eeef3bfc568b281caaa' ) depends=( @@ -121,10 +121,6 @@ prepare() { echo 'Apply 0004-LoL-broken-client-update-fix' patch -Np1 < "${srcdir}/0004-LoL-broken-client-update-fix.patch" - # LCU Launcher, Hack for league to start in reasonable time - echo 'Apply 0005-LoL-client-slow-start-fix.patch' - patch -Np1 < "${srcdir}/0005-LoL-client-slow-start-fix.patch" - # Game, Add some nops around exception dispatch for pacman/stub.dll to be able to hook echo 'Apply 0008-ntdll-nopguard-call_vectored_handlers.patch' patch -Np1 < "${srcdir}/0008-ntdll-nopguard-call_vectored_handlers.patch" @@ -141,6 +137,10 @@ prepare() { echo 'Apply 0012-ntdll-implement-ntcontinueex.patch' patch -Np1 < "${srcdir}/0012-ntdll-implement-ntcontinueex.patch" + # RCS, LCU hang because linux allows connect(0.0.0.0). + echo 'Apply 0013-server-error-on-connect-to-zero.patch' + patch -Np1 < "${srcdir}/0013-server-error-on-connect-to-zero.patch" + # Clean up .orig files echo "Clean up .orig files" find ./ -name '*.orig' -delete |