【发布时间】:2011-03-08 15:06:20
【问题描述】:
// handle alt+enter ourselves
form.KeyDown += (o, e) =>
{
if (e.Alt && e.KeyCode == Keys.Enter) {
bool Full;
Output ThisOut;
swapChain.GetFullScreenState(out Full, out ThisOut);
if (Full == true)
{
swapChain.SetFullScreenState(false, ThisOut);
}
else if (Full == false)
{
swapChain.SetFullScreenState(true, ThisOut);
}
}
// swapChain.IsFullScreen = !swapChain.IsFullScreen;
我正在使用 SlimDx 上的教程 - http://slimdx.org/tutorials/devicecreation.php 并注意到交换链没有 IsFullScreen 属性。因此,我尝试使用其他可用的方法并遇到了问题。 - 当我切换到全屏时,它会正常运行;但是,当我切换回非全屏时,我看到的只是一个不可移动的空白框。
发生了什么?为什么没有教程中的 isFullScreen 属性。设备是否在某处丢失?
【问题讨论】:
-
我想我不明白。为什么上面给出的使用 GetFullScreenState、SetFullScreenState 的方法不起作用?根据这些方法的文档,它们似乎应该可以工作。
标签: directx fullscreen slimdx directx-11