diff --git a/pressure-vessel/wrap-setup.c b/pressure-vessel/wrap-setup.c index 8e1f3da16484538ebce25a34921e2a693615a4f5..d7f481941218f173cd7b188717fa775823c856bb 100644 --- a/pressure-vessel/wrap-setup.c +++ b/pressure-vessel/wrap-setup.c @@ -896,7 +896,7 @@ pv_wrap_append_preload (PvWrapContext *context, return; } - if ((flags & PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY) + if (context->options.remove_game_overlay && g_str_has_suffix (preload, "/gameoverlayrenderer.so")) { g_info ("Disabling Steam Overlay: %s", preload); diff --git a/pressure-vessel/wrap-setup.h b/pressure-vessel/wrap-setup.h index f89c1f5d9a50e4e1bf4367206067c8582b6158fb..c96393e8047a089e7de287ac705b34617aecc5b5 100644 --- a/pressure-vessel/wrap-setup.h +++ b/pressure-vessel/wrap-setup.h @@ -66,7 +66,6 @@ void pv_wrap_move_into_scope (const char *steam_app_id); * PvAppendPreloadFlags: * @PV_APPEND_PRELOAD_FLAGS_FLATPAK_SUBSANDBOX: The game will be run in * a Flatpak subsandbox - * @PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY: Disable the Steam Overlay * @PV_APPEND_PRELOAD_FLAGS_IN_UNIT_TESTS: Normalize $LIB and $PLATFORM, * for unit testing * @PV_APPEND_PRELOAD_FLAGS_ONE_ARCHITECTURE: Behave as though there is @@ -78,7 +77,6 @@ void pv_wrap_move_into_scope (const char *steam_app_id); typedef enum { PV_APPEND_PRELOAD_FLAGS_FLATPAK_SUBSANDBOX = (1 << 0), - PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY = (1 << 1), PV_APPEND_PRELOAD_FLAGS_IN_UNIT_TESTS = (1 << 2), PV_APPEND_PRELOAD_FLAGS_ONE_ARCHITECTURE = (1 << 3), PV_APPEND_PRELOAD_FLAGS_NONE = 0 diff --git a/pressure-vessel/wrap.c b/pressure-vessel/wrap.c index de465d657fc8b99487dd1986ebd410b344f99690..0e20c09971846e5727d14ef7984f6f04f7a4d824 100644 --- a/pressure-vessel/wrap.c +++ b/pressure-vessel/wrap.c @@ -820,9 +820,6 @@ main (int argc, adverb_preload_argv = g_ptr_array_new_with_free_func (g_free); - if (self->options.remove_game_overlay) - append_preload_flags |= PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY; - /* We need the LD_PRELOADs from Steam visible at the paths that were * used for them, which might be their physical rather than logical * locations. Steam doesn't generally use LD_AUDIT, but the Steam app diff --git a/tests/pressure-vessel/wrap-setup.c b/tests/pressure-vessel/wrap-setup.c index 88ec05bbee96425e53535d13e6387389247b7710..af7762be650cb258caeda413cae9139a56664241 100644 --- a/tests/pressure-vessel/wrap-setup.c +++ b/tests/pressure-vessel/wrap-setup.c @@ -1819,8 +1819,7 @@ test_remap_ld_preload_flatpak (Fixture *f, /* * In addition to testing the rare case where there's no runtime, - * this one also exercises PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY, - * which is the implementation of --remove-game-overlay. + * this one also exercises --remove-game-overlay. */ static void test_remap_ld_preload_no_runtime (Fixture *f, @@ -1833,16 +1832,15 @@ test_remap_ld_preload_no_runtime (Fixture *f, gsize i, j; gboolean expect_i386 = FALSE; + f->context->options.remove_game_overlay = TRUE; + #if defined(__i386__) || defined(__x86_64__) if (!(config->preload_flags & PV_APPEND_PRELOAD_FLAGS_ONE_ARCHITECTURE)) expect_i386 = TRUE; #endif g_assert_null (f->context->runtime); - populate_ld_preload (f, argv, - (config->preload_flags - | PV_APPEND_PRELOAD_FLAGS_REMOVE_GAME_OVERLAY), - exports); + populate_ld_preload (f, argv, config->preload_flags, exports); g_assert_cmpuint (argv->len, ==, filtered->len - 1); @@ -1855,7 +1853,7 @@ test_remap_ld_preload_no_runtime (Fixture *f, argument += strlen("--ld-preload="); /* /steam/lib/gameoverlayrenderer.so is missing because we used the - * REMOVE_GAME_OVERLAY flag */ + * equivalent of --remove-game-overlay */ if (g_str_has_suffix (expected, "/gameoverlayrenderer.so")) { /* We expect to skip only one element */