From ac871bada3b75f5f2d3e42839c873140b46468b7 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Tue, 2 Jul 2024 18:52:19 +0800 Subject: [PATCH 1/6] 1.14.4 --- Sandboxie/core/drv/syscall.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Sandboxie/core/drv/syscall.c b/Sandboxie/core/drv/syscall.c index 1af7fa7e..0cc159b3 100644 --- a/Sandboxie/core/drv/syscall.c +++ b/Sandboxie/core/drv/syscall.c @@ -215,6 +215,18 @@ _FX BOOLEAN Syscall_Init_List(void) LIST disabled_hooks; Syscall_LoadHookMap(L"DisableWinNtHook", &disabled_hooks); + if (Conf_Get_Boolean(Driver_Pool, L"Improve3DGameRate", 0, FALSE)) { + PATTERN* pat = Pattern_Create(Driver_Pool, L"WaitForSingleObject", FALSE, 0); + if (pat) + List_Insert_After(&disabled_hooks, NULL, pat); + pat = Pattern_Create(Driver_Pool, L"ReleaseSemaphore", FALSE, 0); + if (pat) + List_Insert_After(&disabled_hooks, NULL, pat); + pat = Pattern_Create(Driver_Pool, L"SetEvent", FALSE, 0); + if (pat) + List_Insert_After(&disabled_hooks, NULL, pat); + pat = Pattern_Create(Driver_Pool, L"ClearEvent", FALSE, 0); + } LIST approved_syscalls; Syscall_LoadHookMap(L"ApproveWinNtSysCall", &approved_syscalls); From 8ad7bf5d2bce3fd2508d07a87c4ecbe0200f4ba6 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Tue, 2 Jul 2024 19:06:43 +0800 Subject: [PATCH 2/6] fix --- Sandboxie/core/drv/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sandboxie/core/drv/syscall.c b/Sandboxie/core/drv/syscall.c index 0cc159b3..2e245e7f 100644 --- a/Sandboxie/core/drv/syscall.c +++ b/Sandboxie/core/drv/syscall.c @@ -215,7 +215,7 @@ _FX BOOLEAN Syscall_Init_List(void) LIST disabled_hooks; Syscall_LoadHookMap(L"DisableWinNtHook", &disabled_hooks); - if (Conf_Get_Boolean(Driver_Pool, L"Improve3DGameRate", 0, FALSE)) { + if (Conf_Get_Boolean(NULL, L"Improve3DGameRate", 0, FALSE)) { PATTERN* pat = Pattern_Create(Driver_Pool, L"WaitForSingleObject", FALSE, 0); if (pat) List_Insert_After(&disabled_hooks, NULL, pat); From a0f825edb4744dbd26da3ab59b5a3d78973683a2 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Tue, 2 Jul 2024 20:00:29 +0800 Subject: [PATCH 3/6] 1.14.4 --- SandboxiePlus/SandMan/Forms/SettingsWindow.ui | 431 +++++++++--------- .../SandMan/Windows/SettingsWindow.cpp | 4 + SandboxiePlus/SandMan/Wizards/SetupWizard.cpp | 7 + SandboxiePlus/SandMan/Wizards/SetupWizard.h | 1 + 4 files changed, 229 insertions(+), 214 deletions(-) diff --git a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui index 07c9ee6b..1d8f400c 100644 --- a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui +++ b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui @@ -48,7 +48,7 @@ QTabWidget::North - 1 + 5 @@ -1951,225 +1951,228 @@ Unlike the preview channel, it does not include untested, potentially breaking, - 1 + 0 Sandboxie Config - + - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Sandbox <a href="sbie://docs/keyrootpath">registry root</a>: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - - 75 - true - true - - - - Sandbox default - - - - - - - - - - - - - Sandbox <a href="sbie://docs/filerootpath">file system root</a>: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Default sandbox: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Activate Kernel Mode Object Filtering - - - - - - - - 75 - true - true - - - - Sandboxing features - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Hook selected Win32k system calls to enable GPU acceleration (experimental) - - - - - - - Use a Sandboxie login instead of an anonymous token - - - - - - - - - - Portable root folder - - - - - - - Sandbox <a href="sbie://docs/ipcrootpath">ipc root</a>: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 23 - 16777215 - - - - ... - - - - - - - Use Windows Filtering Platform to restrict network access - - - - - - - Add "Sandboxie\All Sandboxes" group to the sandboxed token (experimental) - - - - + + + + 75 + true + true + + + + Sandbox default + + + + + + + Default sandbox: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Portable root folder + + + + + + + Sandbox <a href="sbie://docs/filerootpath">file system root</a>: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + + + + 23 + 16777215 + + + + ... + + + + + + + Sandbox <a href="sbie://docs/keyrootpath">registry root</a>: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + + + Sandbox <a href="sbie://docs/ipcrootpath">ipc root</a>: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + + + + 75 + true + true + + + + Sandboxing features + + + + + + + Qt::Horizontal + + + + 108 + 20 + + + + + + + + Use Windows Filtering Platform to restrict network access + + + + + + + Activate Kernel Mode Object Filtering + + + + + + + Hook selected Win32k system calls to enable GPU acceleration (experimental) + + + + + + + Use a Sandboxie login instead of an anonymous token + + + + + + + Add "Sandboxie\All Sandboxes" group to the sandboxed token (experimental) + + + + + + + Enhance the 3D gaming experience by releasing some system calls. + + + + + + + Qt::Horizontal + + + + 108 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 139 + + + + + + + + Qt::Horizontal + + + + 107 + 20 + + + + + + + + Qt::Horizontal + + + + 108 + 20 + + + diff --git a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp index c2f98f8e..11813784 100644 --- a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp @@ -427,6 +427,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent) connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged())); connect(ui.chkSbieLogon, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged())); connect(ui.chkSbieAll, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged())); + connect(ui.chkImproveGame, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged())); m_GeneralChanged = false; connect(ui.chkWatchConfig, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged())); // not sbie ini @@ -1011,6 +1012,7 @@ void CSettingsWindow::LoadSettings() ui.chkWin32k->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableWin32kHooks", true)); ui.chkSbieLogon->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieLogon", false)); ui.chkSbieAll->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieAllGroup", false)); + ui.chkImproveGame->setChecked(theAPI->GetGlobalSettings()->GetBool("Improve3DGameRate", false)); ui.chkAdminOnly->setChecked(theAPI->GetGlobalSettings()->GetBool("EditAdminOnly", false)); ui.chkAdminOnly->setEnabled(IsAdminUser()); @@ -1063,6 +1065,7 @@ void CSettingsWindow::LoadSettings() ui.chkWin32k->setEnabled(false); ui.chkSbieLogon->setEnabled(false); ui.chkSbieAll->setEnabled(false); + ui.chkImproveGame->setEnabled(false); ui.regRoot->setEnabled(false); ui.ipcRoot->setEnabled(false); ui.chkRamDisk->setEnabled(false); @@ -1713,6 +1716,7 @@ void CSettingsWindow::SaveSettings() WriteAdvancedCheck(ui.chkWin32k, "EnableWin32kHooks", "", "n"); WriteAdvancedCheck(ui.chkSbieLogon, "SandboxieLogon", "y", ""); WriteAdvancedCheck(ui.chkSbieAll, "SandboxieAllGroup", "y", ""); + WriteAdvancedCheck(ui.chkImproveGame, "Improve3DGameRate", "y", ""); if (m_FeaturesChanged) { m_FeaturesChanged = false; diff --git a/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp b/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp index 06f99ac3..63a13146 100644 --- a/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp +++ b/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp @@ -135,6 +135,8 @@ bool CSetupWizard::ShowWizard(int iOldLevel) { if (wizard.field("editAdminOnly").toBool()) theAPI->GetGlobalSettings()->SetText("EditAdminOnly", "y"); + if (wizard.field("improveGame").toBool()) + theAPI->GetGlobalSettings()->SetText("Improve3DGameRate", "y"); } theConf->SetValue("Options/WizardLevel", SETUP_LVL_CURRENT); @@ -530,6 +532,11 @@ CShellPage::CShellPage(QWidget *parent) layout->addWidget(m_pEditOnlyAdmin); registerField("editAdminOnly", m_pEditOnlyAdmin); + m_pImproveGame = new QCheckBox(tr("Enhance the 3D gaming experience by releasing some system calls.")); + m_pImproveGame->setChecked(false); + layout->addWidget(m_pImproveGame); + registerField("improveGame", m_pImproveGame); + setLayout(layout); } diff --git a/SandboxiePlus/SandMan/Wizards/SetupWizard.h b/SandboxiePlus/SandMan/Wizards/SetupWizard.h index b3125f24..33a40879 100644 --- a/SandboxiePlus/SandMan/Wizards/SetupWizard.h +++ b/SandboxiePlus/SandMan/Wizards/SetupWizard.h @@ -123,6 +123,7 @@ private: QCheckBox *m_pContecxtMenu; QCheckBox *m_pBrowserIcon; QCheckBox* m_pEditOnlyAdmin; + QCheckBox* m_pImproveGame; }; ////////////////////////////////////////////////////////////////////////////////////////// From 966391bb5223abfd5f758f17a68c3d4f316433a1 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Tue, 2 Jul 2024 20:07:34 +0800 Subject: [PATCH 4/6] Update Changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d12e804d..5af5463c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - added UI options for "ForceRestartAll" and "UseCreateToken" in OptionWindow. - added a optional context menu option to make folder/file forced quickly. - You can also use "Sandman.exe /add_force program_path" to do it. +- added option "Improve3DGameRate" to enchance 3D games' FPS. ### Changed - Extend "Temp Template" to make it could delete local template section From 8bdfbaa5505a20d9f899740b9c825536b6c6be02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=B1=E7=BC=96=E7=A8=8B=E7=9A=84=E5=8F=B6=E4=B8=80?= =?UTF-8?q?=E7=AC=91?= <92030377+love-code-yeyixiao@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:00:58 +0800 Subject: [PATCH 5/6] Update CHANGELOG.md Co-Authored-By: isaak654 --- CHANGELOG.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c213b45e..a8557833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.1x.x / 5.xx.x] - 2024-07-0x + +### Added +- added UI options for "ForceRestartAll" and "UseCreateToken" in OptionWindow +- added an optional context menu option to make folder/file forced quickly + - You can also use "Sandman.exe /add_force program_path" to do it +- added option "Improve3DGameRate" to enhance 3D games' FPS + + + ## [1.14.3 / 5.69.3] - 2024-07-01 ### Changed @@ -16,7 +26,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - ## [1.14.2 / 5.69.2] - 2024-06-19 ### Added @@ -34,11 +43,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - added RPC Port message filter mechanism to block unsafe RDP calls via the driver [#3930](https://github.com/sandboxie-plus/Sandboxie/issues/3930) - Usage: "RpcPortFilter=Port,ID,Label" label is optional - added "Job Object" Options page to colelct all job object related options -- added UI options for "ForceRestartAll" and "UseCreateToken" in OptionWindow. -- added a optional context menu option to make folder/file forced quickly. - - You can also use "Sandman.exe /add_force program_path" to do it. -- added option "Improve3DGameRate" to enchance 3D games' FPS. - ### Changed - Extend "Temp Template" to make it could delete local template section From 2cb0f2293b0b1ecd4ad4e14d5069ad8a7a689aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=B1=E7=BC=96=E7=A8=8B=E7=9A=84=E5=8F=B6=E4=B8=80?= =?UTF-8?q?=E7=AC=91?= <92030377+love-code-yeyixiao@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:57:58 +0800 Subject: [PATCH 6/6] Update syscall.c --- Sandboxie/core/drv/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sandboxie/core/drv/syscall.c b/Sandboxie/core/drv/syscall.c index 2e245e7f..e9700269 100644 --- a/Sandboxie/core/drv/syscall.c +++ b/Sandboxie/core/drv/syscall.c @@ -226,6 +226,8 @@ _FX BOOLEAN Syscall_Init_List(void) if (pat) List_Insert_After(&disabled_hooks, NULL, pat); pat = Pattern_Create(Driver_Pool, L"ClearEvent", FALSE, 0); + if (pat) + List_Insert_After(&disabled_hooks, NULL, pat); } LIST approved_syscalls;