mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
[ZoomIt]React to gpo setting when run as standalone (#36975)
This commit is contained in:
@@ -7416,6 +7416,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
|
||||
if( !ShowEula( APPNAME, NULL, NULL )) return 1;
|
||||
|
||||
#ifdef __ZOOMIT_POWERTOYS__
|
||||
if (powertoys_gpo::getConfiguredZoomItEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
|
||||
{
|
||||
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Shared::Trace::ETWTrace* trace = nullptr;
|
||||
std::wstring pid = std::wstring(lpCmdLine); // The PowerToys pid is the argument to the process.
|
||||
auto mainThreadId = GetCurrentThreadId();
|
||||
@@ -7423,12 +7429,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
|
||||
{
|
||||
g_StartedByPowerToys = TRUE;
|
||||
|
||||
if (powertoys_gpo::getConfiguredZoomItEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
|
||||
{
|
||||
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
trace = new Shared::Trace::ETWTrace();
|
||||
Trace::RegisterProvider();
|
||||
trace->UpdateState(true);
|
||||
|
||||
Reference in New Issue
Block a user