summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2022-06-30 17:45:23 +0300
committerStelios Tsampas2022-06-30 17:45:23 +0300
commit09d960be92ffc7904ec6de672c906df769566c82 (patch)
treeda1901dd6772d19d53a6f1277ff755c723217f11
parentffdee6919df5e872f4078fde289b854254b5e8ab (diff)
downloadaur-09d960be92ffc7904ec6de672c906df769566c82.tar.gz
woops
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD4
-rw-r--r--wine-autogen_fsr_res.patch411
3 files changed, 0 insertions, 417 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 017793f7a00f..b7c12972de54 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -241,7 +241,6 @@ pkgbase = proton-ge-custom
source = https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.tar.xz
source = https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.tar.xz
source = https://github.com/madewokherd/wine-mono/releases/download/wine-mono-7.3.0/wine-mono-7.3.0-x86.tar.xz
- source = wine-autogen_fsr_res.patch
source = 0001-AUR-pkgbuild-changes.patch
source = 0001-Add-PROTON_USER_COMPAT_DATA-environment-variable.patch
sha256sums = SKIP
@@ -272,7 +271,6 @@ pkgbase = proton-ge-custom
sha256sums = 8fab46ea2110b2b0beed414e3ebb4e038a3da04900e7a28492ca3c3ccf9fea94
sha256sums = b4476706a4c3f23461da98bed34f355ff623c5d2bb2da1e2fa0c6a310bc33014
sha256sums = 60314f255031b2f4dc49f22eacfcd2b3b8b2b491120d703b4b62cc1fef0f9bdd
- sha256sums = SKIP
sha256sums = fb7d1990822a3fffb7caed3d2eee0a92d2053f5f737f8ea2ad8ed21ae7458400
sha256sums = a23a31c2879699129c86ab9a768e7ba657496d22e27d7609709802c2821e9822
diff --git a/PKGBUILD b/PKGBUILD
index 7a0dcd8c9c23..40a219bddcd6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -130,7 +130,6 @@ source=(
gst-plugins-ugly::git+https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git
https://dl.winehq.org/wine/wine-gecko/${_geckover}/wine-gecko-${_geckover}-x86{,_64}.tar.xz
https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${_monover}/wine-mono-${_monover}-x86.tar.xz
- wine-autogen_fsr_res.patch
0001-AUR-pkgbuild-changes.patch
0001-Add-PROTON_USER_COMPAT_DATA-environment-variable.patch
)
@@ -256,8 +255,6 @@ prepare() {
# Fix openldap 2.5+ detection
sed 's/-lldap_r/-lldap/' -i configure
# Adds more 16:10 resolutions for use with FSR
- # Do not report bugs to GE if you enable this, this is still being tested
- #patch -p1 -i "$srcdir"/wine-autogen_fsr_res.patch
popd
patch -p1 -i "$srcdir"/0001-AUR-pkgbuild-changes.patch
@@ -395,6 +392,5 @@ sha256sums=('SKIP'
'8fab46ea2110b2b0beed414e3ebb4e038a3da04900e7a28492ca3c3ccf9fea94'
'b4476706a4c3f23461da98bed34f355ff623c5d2bb2da1e2fa0c6a310bc33014'
'60314f255031b2f4dc49f22eacfcd2b3b8b2b491120d703b4b62cc1fef0f9bdd'
- 'SKIP'
'fb7d1990822a3fffb7caed3d2eee0a92d2053f5f737f8ea2ad8ed21ae7458400'
'a23a31c2879699129c86ab9a768e7ba657496d22e27d7609709802c2821e9822')
diff --git a/wine-autogen_fsr_res.patch b/wine-autogen_fsr_res.patch
deleted file mode 100644
index 8984303fdd39..000000000000
--- a/wine-autogen_fsr_res.patch
+++ /dev/null
@@ -1,411 +0,0 @@
-From c4c25c56fd167fc6353162ff68539162757dcc20 Mon Sep 17 00:00:00 2001
-From: Stelios Tsampas <loathingkernel@gmail.com>
-Date: Wed, 29 Jun 2022 14:33:07 +0300
-Subject: [PATCH] fshack - Generate FSR resolutions based on native aspect
- ratio
-
-The base list of resolutions remains unchanged.
-If FSR is enabled it adds FSR resolutions for that.
-If the user specifed a custom resolution, adds that to the list too.
----
- dlls/winex11.drv/fs.c | 293 +++++++++++++-----------------------------
- 1 file changed, 87 insertions(+), 206 deletions(-)
-
-diff --git a/dlls/winex11.drv/fs.c b/dlls/winex11.drv/fs.c
-index 70e6b84ffad..b8943b946ef 100644
---- a/dlls/winex11.drv/fs.c
-+++ b/dlls/winex11.drv/fs.c
-@@ -83,18 +83,18 @@ resolution list:
- {2560, 720}, // 32:9 - 'FSR 32:9 Performance'
- {3012, 847}, // 32:9 - 'FSR 32:9 Balanced'
- {3413, 960}, // 32:9 - 'FSR 32:9 Quality'
-- {3938, 1108}, // 32:9 - 'FSR 32:9 Ultra Quality'
-+ {3938, 1108}, // 32:9 - 'FSR 32:9 Ultra Quality'
-
- 4K:
-- {1920, 1080}, // 16:9 - 'FSR 2160p Performance'
-+ {1920, 1080}, // 16:9 - 'FSR 2160p Performance'
- {2259, 1270}, // 16:9 - 'FSR 2160p Balanced'
-- {2560, 1440}, // 16:9 - 'FSR 2160p Quality'
-+ {2560, 1440}, // 16:9 - 'FSR 2160p Quality'
- {2954, 1662}, // 16:9 - 'FSR 2160p Ultra Quality'
-
- Ultra-wide:
-- {1720, 720}, // 21:9 - 'FSR ultra-wide Performance'
-- {2024, 847}, // 21:9 - 'FSR ultra-wide Balanced'
-- {2293, 960}, // 21:9 - 'FSR ultra-wide Quality'
-+ {1720, 720}, // 21:9 - 'FSR ultra-wide Performance'
-+ {2024, 847}, // 21:9 - 'FSR ultra-wide Balanced'
-+ {2293, 960}, // 21:9 - 'FSR ultra-wide Quality'
- {2646, 1108}, // 21:9 - 'FSR ultra-wide Ultra Quality'
-
- 2K:
-@@ -104,7 +104,7 @@ resolution list:
- {1970, 1108}, // 16:9 - 'FSR 1440p Ultra Quality'
-
- 1080p:
-- {960, 640}, // 16:9 - 'FSR 1080p Performance'
-+ {960, 640}, // 16:9 - 'FSR 1080p Performance'
- {1129, 635}, // 16:9 - 'FSR 1080p Balanced'
- {1280, 720}, // 16:9 - 'FSR 1080p Quality'
- {1477, 831}, // 16:9 - 'FSR 1080p Ultra Quality'
-@@ -119,7 +119,7 @@ The formula for FSR resolutions is as follows:
- */
-
- /* A table of resolutions some games expect but host system may not report */
--static struct fs_monitor_size fs_monitor_sizes[] =
-+static struct fs_monitor_size fs_monitor_sizes_base[] =
- {
- {640, 480}, /* 4:3 */
- {800, 600}, /* 4:3 */
-@@ -141,117 +141,30 @@ static struct fs_monitor_size fs_monitor_sizes[] =
- {1280, 1024}, /* 5:4 */
- };
-
--/* Ultra FSR */
--static struct fs_monitor_size fsr1080_ultra[] =
-+/* Dynamically assigned FSR resolutions */
-+static struct fs_monitor_size fs_monitor_sizes_fsr[] =
- {
-- {1477, 831}, /* 16:9 - 'FSR 1080p Ultra Quality' */
-+ {0, 0}, /* FSR Performance */
-+ {0, 0}, /* FSR Balanced */
-+ {0, 0}, /* FSR Quality */
-+ {0, 0}, /* FSR Ultra Quality */
- };
-
--static struct fs_monitor_size fsr2k_ultra[] =
--{
-- {1970, 1108}, /* 16:9 - 'FSR 1440p Ultra Quality' */
--};
--
--static struct fs_monitor_size fsruw_ultra[] =
--{
-- {2646, 1108}, /* 21:9 - 'FSR ultra-wide Ultra Quality' */
--};
--
--static struct fs_monitor_size fsr4k_ultra[] =
--{
-- {2954, 1662}, /* 16:9 - 'FSR 2160p Ultra Quality' */
--};
--
--static struct fs_monitor_size fsr329_ultra[] =
--{
-- {3938, 1108}, // 32:9 - 'FSR 32:9 Ultra Quality'
--};
--
--/* Quality FSR */
--static struct fs_monitor_size fsr1080_quality[] =
--{
-- {1280, 720}, /* 16:9 - 'FSR 1080p Quality' */
--};
--
--static struct fs_monitor_size fsr2k_quality[] =
--{
-- {1706, 960}, /* 16:9 - 'FSR 1440p Quality' */
--};
--
--static struct fs_monitor_size fsruw_quality[] =
--{
-- {2293, 960}, /* 21:9 - 'FSR ultra-wide Quality' */
--};
--
--static struct fs_monitor_size fsr4k_quality[] =
--{
-- {2560, 1440}, /* 16:9 - 'FSR 2160p Quality' */
--};
--
--static struct fs_monitor_size fsr329_quality[] =
--{
-- {3413, 960}, // 32:9 - 'FSR 32:9 Quality'
--};
--
--/* Balanced FSR */
--static struct fs_monitor_size fsr1080_balanced[] =
--{
-- {1129, 635}, /* 16:9 - 'FSR 1080p Balanced' */
--};
--
--static struct fs_monitor_size fsr2k_balanced[] =
--{
-- {1506, 847}, /* 16:9 - 'FSR 1440p Balanced' */
--};
--
--static struct fs_monitor_size fsruw_balanced[] =
--{
-- {2024, 847}, /* 21:9 - 'FSR ultra-wide Balanced' */
--};
--
--static struct fs_monitor_size fsr4k_balanced[] =
--{
-- {2259, 1270}, /* 16:9 - 'FSR 2160p Balanced' */
--};
--
--static struct fs_monitor_size fsr329_balanced[] =
--{
-- {3012, 847}, // 32:9 - 'FSR 32:9 Balanced'
--};
--
--/* Performance FSR */
--static struct fs_monitor_size fsr1080_performance[] =
--{
-- {960, 640}, /* 16:9 - 'FSR 1080p Performance' */
--};
--
--static struct fs_monitor_size fsr2k_performance[] =
--{
-- {1280, 720}, /* 16:9 - 'FSR 1440p Performance' */
--};
--
--static struct fs_monitor_size fsruw_performance[] =
--{
-- {1720, 720}, /* 21:9 - 'FSR ultra-wide Performance' */
--};
--
--static struct fs_monitor_size fsr4k_performance[] =
--{
-- {1920, 1080}, /* 16:9 - 'FSR 2160p Performance' */
--};
--
--static struct fs_monitor_size fsr329_performance[] =
--{
-- {2560, 720}, // 32:9 - 'FSR 32:9 Performance'
-+static float fsr_ratios[] = {
-+ 2.0f, 1.7f, 1.5f, 1.3f,
- };
-
- static struct fs_monitor_size fsr_fake_res[] =
- {
-- {1920, 1080}, /* Custom resolution, replaced by WINE_FULLSCREEN_FSR_CUSTOM_MODE */
-+ {0, 0},
- };
-
- static struct fs_monitor_size fake_current_resolution;
-
-+struct fs_monitor_size *fs_monitor_sizes = NULL;
-+INT fs_monitor_sizes_offset = 0;
-+
-+
- /* A fake monitor for the fullscreen hack */
- struct fs_monitor
- {
-@@ -266,6 +179,9 @@ struct fs_monitor
- UINT unique_resolutions; /* Number of unique resolutions in terms of WxH */
- };
-
-+BOOL fs_hack_is_fsr(float *sharpness);
-+BOOL fs_hack_is_fake_current_res(struct fs_monitor_size*);
-+
- static void add_fs_mode(struct fs_monitor *fs_monitor, DWORD depth, DWORD width, DWORD height,
- DWORD frequency, DWORD orientation)
- {
-@@ -330,13 +246,15 @@ static void add_fs_mode(struct fs_monitor *fs_monitor, DWORD depth, DWORD width,
- static BOOL fs_monitor_add_modes(struct fs_monitor *fs_monitor)
- {
- DEVMODEW *real_modes, *real_mode, current_mode;
-- const char *fsr_flag, *fsr_mode;
- UINT real_mode_count;
- DWORD width, height;
- ULONG_PTR real_id;
- ULONG offset;
- UINT i, j;
-
-+ INT h_factor;
-+ float sharpness, real_w_ratio, h_ratio;
-+
- if (!real_settings_handler.get_id(fs_monitor->user_mode.dmDeviceName, &real_id))
- return FALSE;
-
-@@ -347,105 +265,66 @@ static BOOL fs_monitor_add_modes(struct fs_monitor *fs_monitor)
- if (!real_settings_handler.get_modes(real_id, 0, &real_modes, &real_mode_count))
- return FALSE;
-
-- if (fsr_flag = getenv("WINE_FULLSCREEN_FSR"))
-- {
-- if (fs_hack_is_fake_current_res(&fake_current_resolution))
-- {
-- /* Custom Resolution */
-- memcpy(fs_monitor_sizes+sizeof(fsr_fake_res),fsr_fake_res,sizeof(fsr_fake_res));
-- }
-- else if (fsr_mode = getenv("WINE_FULLSCREEN_FSR_MODE")) {
-- if (!strcmp(fsr_mode, "ultra")) {
-- if (current_mode.dmPelsWidth >= 1129 && current_mode.dmPelsWidth <= 1920) {
-- /* 1080p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr1080_ultra),fsr1080_ultra,sizeof(fsr1080_ultra));
-- } else if (current_mode.dmPelsWidth <= 2560) {
-- /* 1440p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr2k_ultra),fsr2k_ultra,sizeof(fsr2k_ultra));
-- } else if (current_mode.dmPelsWidth <= 3440) {
-- /* ultrawide FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsruw_ultra),fsruw_ultra,sizeof(fsruw_ultra));
-- } else if (current_mode.dmPelsWidth <= 3840) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr4k_ultra),fsr4k_ultra,sizeof(fsr4k_ultra));
-- } else if (current_mode.dmPelsWidth <= 5120) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr329_ultra),fsr329_ultra,sizeof(fsr329_ultra));
-- }
-- } else if (!strcmp(fsr_mode, "quality")) {
-- if (current_mode.dmPelsWidth >= 1129 && current_mode.dmPelsWidth <= 1920) {
-- /* 1080p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr1080_quality),fsr1080_quality,sizeof(fsr1080_quality));
-- } else if (current_mode.dmPelsWidth <= 2560) {
-- /* 1440p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr2k_quality),fsr2k_quality,sizeof(fsr2k_quality));
-- } else if (current_mode.dmPelsWidth <= 3440) {
-- /* ultrawide FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsruw_quality),fsruw_quality,sizeof(fsruw_quality));
-- } else if (current_mode.dmPelsWidth <= 3840) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr4k_quality),fsr4k_quality,sizeof(fsr4k_quality));
-- } else if (current_mode.dmPelsWidth <= 5120) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr329_quality),fsr329_quality,sizeof(fsr329_quality));
-- }
-- } else if (!strcmp(fsr_mode, "balanced")) {
-- if (current_mode.dmPelsWidth >= 1129 && current_mode.dmPelsWidth <= 1920) {
-- /* 1080p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr1080_balanced),fsr1080_balanced,sizeof(fsr1080_balanced));
-- } else if (current_mode.dmPelsWidth <= 2560) {
-- /* 1440p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr2k_balanced),fsr2k_balanced,sizeof(fsr2k_balanced));
-- } else if (current_mode.dmPelsWidth <= 3440) {
-- /* ultrawide FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsruw_balanced),fsruw_balanced,sizeof(fsruw_balanced));
-- } else if (current_mode.dmPelsWidth <= 3840) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr4k_balanced),fsr4k_balanced,sizeof(fsr4k_balanced));
-- } else if (current_mode.dmPelsWidth <= 5120) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr329_balanced),fsr329_balanced,sizeof(fsr329_balanced));
-- }
-- } else if (!strcmp(fsr_mode, "performance")) {
-- if (current_mode.dmPelsWidth >= 1129 && current_mode.dmPelsWidth <= 1920) {
-- /* 1080p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr1080_performance),fsr1080_performance,sizeof(fsr1080_performance));
-- } else if (current_mode.dmPelsWidth <= 2560) {
-- /* 1440p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr2k_performance),fsr2k_performance,sizeof(fsr2k_performance));
-- } else if (current_mode.dmPelsWidth <= 3440) {
-- /* ultrawide FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsruw_performance),fsruw_performance,sizeof(fsruw_performance));
-- } else if (current_mode.dmPelsWidth <= 3840) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr4k_performance),fsr4k_performance,sizeof(fsr4k_performance));
-- } else if (current_mode.dmPelsWidth <= 5120) {
-- /* 32:9 FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr329_performance),fsr329_performance,sizeof(fsr329_performance));
-- }
-- }
-- /* If no mode specified, default to balanced */
-- }
-- else {
-- if (current_mode.dmPelsWidth >= 1129 && current_mode.dmPelsWidth <= 1920) {
-- /* 1080p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr1080_balanced),fsr1080_balanced,sizeof(fsr1080_balanced));
-- } else if (current_mode.dmPelsWidth <= 2560) {
-- /* 1440p FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr2k_balanced),fsr2k_balanced,sizeof(fsr2k_balanced));
-- } else if (current_mode.dmPelsWidth <= 3440) {
-- /* ultrawide FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsruw_balanced),fsruw_balanced,sizeof(fsruw_balanced));
-- } else if (current_mode.dmPelsWidth <= 3840) {
-- /* 4k FSR resolutions */
-- memcpy(fs_monitor_sizes+sizeof(fsr4k_balanced),fsr4k_balanced,sizeof(fsr4k_balanced));
-+ if (fs_monitor_sizes)
-+ heap_free(fs_monitor_sizes);
-+ fs_monitor_sizes = NULL;
-+ fs_monitor_sizes_offset = 0;
-+ fs_monitor_sizes = heap_alloc(sizeof(fs_monitor_sizes_base)
-+ + sizeof(fs_monitor_sizes_fsr)
-+ + sizeof(fsr_fake_res));
-+
-+ /* Copy the default list */
-+ memcpy(fs_monitor_sizes+fs_monitor_sizes_offset, fs_monitor_sizes_base, sizeof(fs_monitor_sizes_base));
-+ fs_monitor_sizes_offset += ARRAY_SIZE(fs_monitor_sizes_base);
-+
-+ /* If FSR is enabled, generate and add FSR resolutions */
-+ if (fs_hack_is_fsr(&sharpness)) {
-+ if (current_mode.dmPelsWidth / 16.0f == current_mode.dmPelsHeight / 9.0f) {
-+ /* 16:9 resolutions */
-+ h_ratio = 9.0f;
-+ } else if ((INT)(current_mode.dmPelsWidth / 210.0f) == (INT)(current_mode.dmPelsHeight / 90.0f)) {
-+ /* 21:9 ultra-wide FSR resolutions */
-+ h_ratio = 9.0f;
-+ } else if (current_mode.dmPelsWidth / 32.0f == current_mode.dmPelsHeight / 9.0f) {
-+ /* 32:9 "duper-ultra-wide" resolutions - Also adds the base resolutions from 16:9 and 21:9 */
-+ h_ratio = 9.0f;
-+ } else if (current_mode.dmPelsWidth / 8.0f == current_mode.dmPelsHeight / 5.0f) {
-+ /* 16:10 resolutions */
-+ h_ratio = 10.0f;
-+ } else if (current_mode.dmPelsWidth / 12.0f == current_mode.dmPelsHeight / 5.0f) {
-+ /* 24:10 resolutions - Also adds the base resolutions from 16:10*/
-+ h_ratio = 10.0f;
-+ } else {
-+ /* In case of unknown ratio, naively create FSR resolutions */
-+ h_ratio = 1.0f;
-+ }
-+
-+ real_w_ratio = current_mode.dmPelsWidth/(current_mode.dmPelsHeight / h_ratio);
-+ for (i = 0; i < ARRAY_SIZE(fs_monitor_sizes_fsr); ++i) {
-+ if (h_ratio == 1.0f) {
-+ /* naive generation and hope for the best */
-+ fs_monitor_sizes_fsr[i].width = (INT)(current_mode.dmPelsWidth / fsr_ratios[i] + 0.5f);
-+ fs_monitor_sizes_fsr[i].height = (INT)(current_mode.dmPelsHeight / fsr_ratios[i] + 0.5f);
-+ } else {
-+ h_factor = (INT)(current_mode.dmPelsHeight/h_ratio / fsr_ratios[i] + 0.5f);
-+ fs_monitor_sizes_fsr[i].width = (INT)(real_w_ratio * h_factor + 0.5f);
-+ fs_monitor_sizes_fsr[i].height = (INT)(h_ratio * h_factor + 0.5f);
- }
-+ TRACE("created fsr res: %dx%d\n", fs_monitor_sizes_fsr[i].width, fs_monitor_sizes_fsr[i].height);
-+ }
-+ memcpy(fs_monitor_sizes+fs_monitor_sizes_offset, fs_monitor_sizes_fsr, sizeof(fs_monitor_sizes_fsr));
-+ fs_monitor_sizes_offset += ARRAY_SIZE(fs_monitor_sizes_fsr);
-+
-+ /* Add the custom resolution to the list */
-+ if (fs_hack_is_fake_current_res(&fake_current_resolution)) {
-+ memcpy(fs_monitor_sizes+fs_monitor_sizes_offset, fsr_fake_res, sizeof(fsr_fake_res));
-+ fs_monitor_sizes_offset += ARRAY_SIZE(fsr_fake_res);
- }
- }
--
-+
- fs_monitor->mode_count = 0;
- fs_monitor->unique_resolutions = 0;
-- fs_monitor->modes = heap_calloc(ARRAY_SIZE(fs_monitor_sizes) * DEPTH_COUNT + real_mode_count,
-+ fs_monitor->modes = heap_calloc(fs_monitor_sizes_offset * DEPTH_COUNT + real_mode_count,
- sizeof(*fs_monitor->modes));
- if (!fs_monitor->modes)
- {
-@@ -459,7 +338,7 @@ static BOOL fs_monitor_add_modes(struct fs_monitor *fs_monitor)
- current_mode.u1.s2.dmDisplayOrientation);
-
- /* Linux reports far fewer resolutions than Windows. Add modes that some games may expect. */
-- for (i = 0; i < ARRAY_SIZE(fs_monitor_sizes); ++i)
-+ for (i = 0; i < fs_monitor_sizes_offset; ++i)
- {
- if (current_mode.u1.s2.dmDisplayOrientation == DMDO_DEFAULT ||
- current_mode.u1.s2.dmDisplayOrientation == DMDO_180)
-@@ -505,15 +384,17 @@ static BOOL fs_monitor_add_modes(struct fs_monitor *fs_monitor)
-
- BOOL fs_hack_is_fake_current_res(struct fs_monitor_size* fixed_size)
- {
-+ const char *e;
-+
- fixed_size->width = 0;
- fixed_size->height = 0;
-- const char *e = getenv("WINE_FULLSCREEN_FSR_CUSTOM_MODE");
-+ e = getenv("WINE_FULLSCREEN_FSR_CUSTOM_MODE");
- if (e)
- {
- const int n = sscanf(e,"%dx%d",&(fixed_size->width),&(fixed_size->height));
- if (n==2)
- {
-- memcpy(fsr_fake_res+sizeof(fixed_size),fixed_size,sizeof(fixed_size));
-+ memcpy(fsr_fake_res, fixed_size, sizeof(*fixed_size));
- return TRUE;
- }
- }
---
-2.37.0
-