Force blacklist re-check at certain points

Wine preloader that executed a non-blacklisted app may execute a blacklisted app,
or vice versa, and previous check applies to new app too.
pull/253/head
jackun 4 years ago
parent b098635dd4
commit 44060c2b80
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -53,7 +53,9 @@ static bool check_blacklisted() {
return blacklisted;
}
bool is_blacklisted() {
bool is_blacklisted(bool force_recheck) {
static bool blacklisted = check_blacklisted();
if (force_recheck)
blacklisted = check_blacklisted();
return blacklisted;
}

@ -1,3 +1,3 @@
#pragma once
bool is_blacklisted();
bool is_blacklisted(bool force_recheck = false);

@ -10,6 +10,7 @@
#include "file_utils.h"
#include "imgui_hud.h"
#include "notify.h"
#include "blacklist.h"
#ifdef HAVE_DBUS
#include "dbus_info.h"
@ -68,6 +69,7 @@ void imgui_init()
{
if (cfg_inited)
return;
is_blacklisted(true);
parse_overlay_config(&params, getenv("MANGOHUD_CONFIG"));
notifier.params = &params;
start_notifier(notifier);

@ -2649,9 +2649,8 @@ static VkResult overlay_CreateInstance(
VkLayerInstanceCreateInfo *chain_info =
get_instance_chain_info(pCreateInfo, VK_LAYER_LINK_INFO);
std::string engineName, engineVersion;
if (!is_blacklisted()) {
if (!is_blacklisted(true)) {
const char* pEngineName = nullptr;
if (pCreateInfo->pApplicationInfo)
pEngineName = pCreateInfo->pApplicationInfo->pEngineName;

Loading…
Cancel
Save