Sandboxied Fullscreen DirectX game not turn back screen resolution after exit.

Please post your problem description here

Moderator: Barb@Invincea

Post Reply
KomeijiKuroko
Posts: 4
Joined: Tue Aug 16, 2016 7:29 am

Sandboxied Fullscreen DirectX game not turn back screen resolution after exit.

Post by KomeijiKuroko » Sat Dec 15, 2018 10:57 am

Hello, I have some DirectX games, and they run in fullscreen mode. But due to my vedio card capacity or due to game design, they can't run as high resolution as my Windows desktop. ( For example, my Windows resolution is 1920*1080, but the fullscreen game will run at 1280*720 )

So, this is the problem: When game is not Sandboxied, Windows resolution will turn back to 1920*1080 after exit. Howerver, when it run inside Sandboxie, Windows resolution will be still at 1280*720 after exit.
For a concrete instance, Red Alert 3 is one of these games. When you set game resolution mode to 1280*720 (or any another resolution less then your Windows desktop), Windows resolution will turn back after game exit (without Sandboxie), but not when it is not Sandboxied.

I know maybe you have not digital rights of Red Alert 3 ( because it not free :) )

So I write a simple DirectX appliction to simulate this situation:

Appliction and its source code has been put into attachments. It is written in pure C++ and has no any 3rd API (Windows.h and d3d11.h only).
You can compiled it directly in Visual Studio Community.

How to use:

This appliction will lead you to a 1280*720 fullscreen DirectX window and automatically exit after 10 seconds.

1. Run this appliction outside Sandboxie. Windows resolution will turn back after exit.

2. Run this appliction inside Sandboxie. After 10 seconds, program exited, but Windows resolution will be set to 1280*720, then you might feel unwell and want turn back to your default desktop resolution immediately :)

I test in Windows 10 ver 1607 (with Sandboxie 5.26 64bit) and Windows 10 ver 1809 (with Sandboxie 5.27 64bit) under resolution 1920*1080 and
1366*768. Whatever the environment, things happened in same way. No any anti-virus software installed.

I provide both appliction and source code to hope it could help the engineers to find something wrong. Thanks.

P.S.
If you uncomment CleanD3D() at line 115, things works well even in Sandboxie. But in fact you can't guarantee every DirectX game do clear D3D resources. But windows can handle this situation when program is not running in Sandboxie. So I guess Sandboxie break something. I tried to grant * to OpenClsid but it still doesn't work.
Attachments
Fullscreen_exe_with_SourceCode.zip
(82.23 KiB) Downloaded 7 times

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2981
Joined: Mon Nov 07, 2016 3:10 pm

Re: Sandboxied Fullscreen DirectX game not turn back screen resolution after exit.

Post by Barb@Invincea » Mon Dec 17, 2018 11:03 am

Hi KomeijiKuroko ,

Please see:
viewtopic.php?t=24235

Regards,
Barb.-

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests