mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Disabled Alt+Enter
This commit is contained in:
parent
a30ad3d9d2
commit
962ebba6e9
5 changed files with 12 additions and 6 deletions
|
@ -47,6 +47,7 @@ namespace Beefy
|
||||||
FakeFocus = 0x0100'0000,
|
FakeFocus = 0x0100'0000,
|
||||||
ShowMinimized = 0x0200'0000,
|
ShowMinimized = 0x0200'0000,
|
||||||
ShowMaximized = 0x0400'0000,
|
ShowMaximized = 0x0400'0000,
|
||||||
|
AllowFullscreen = 0x0800'0000,
|
||||||
};
|
};
|
||||||
|
|
||||||
[AllowDuplicates]
|
[AllowDuplicates]
|
||||||
|
|
|
@ -53,6 +53,7 @@ enum
|
||||||
BFWINDOW_FAKEFOCUS = 0x1000000,
|
BFWINDOW_FAKEFOCUS = 0x1000000,
|
||||||
BFWINDOW_SHOWMINIMIZED = 0x2000000,
|
BFWINDOW_SHOWMINIMIZED = 0x2000000,
|
||||||
BFWINDOW_SHOWMAXIMIZED = 0x4000000,
|
BFWINDOW_SHOWMAXIMIZED = 0x4000000,
|
||||||
|
BFWINDOW_ALLOW_FULLSCREEN = 0x8000000
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1033,7 +1033,7 @@ void DXSetConstantData::Render(RenderDevice* renderDevice, RenderWindow* renderW
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
||||||
DXRenderWindow::DXRenderWindow(DXRenderDevice* renderDevice, HWND hWnd, bool windowed)
|
DXRenderWindow::DXRenderWindow(DXRenderDevice* renderDevice, WinBFWindow* window, bool windowed)
|
||||||
{
|
{
|
||||||
BP_ZONE("DXRenderWindow::DXRenderWindow");
|
BP_ZONE("DXRenderWindow::DXRenderWindow");
|
||||||
|
|
||||||
|
@ -1046,7 +1046,8 @@ DXRenderWindow::DXRenderWindow(DXRenderDevice* renderDevice, HWND hWnd, bool win
|
||||||
|
|
||||||
mRenderDevice = renderDevice;
|
mRenderDevice = renderDevice;
|
||||||
mDXRenderDevice = renderDevice;
|
mDXRenderDevice = renderDevice;
|
||||||
mHWnd = hWnd;
|
mWindow = window;
|
||||||
|
mHWnd = window->mHWnd;
|
||||||
|
|
||||||
Resized();
|
Resized();
|
||||||
|
|
||||||
|
@ -1120,6 +1121,9 @@ void DXRenderWindow::ReinitNative()
|
||||||
descDepth.CPUAccessFlags = 0;
|
descDepth.CPUAccessFlags = 0;
|
||||||
descDepth.MiscFlags = 0;
|
descDepth.MiscFlags = 0;
|
||||||
mDXRenderDevice->mD3DDevice->CreateTexture2D(&descDepth, NULL, &mD3DDepthBuffer);
|
mDXRenderDevice->mD3DDevice->CreateTexture2D(&descDepth, NULL, &mD3DDepthBuffer);
|
||||||
|
|
||||||
|
if ((mWindow->mFlags & BFWINDOW_ALLOW_FULLSCREEN) == 0)
|
||||||
|
mDXRenderDevice->mDXGIFactory->MakeWindowAssociation(mHWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
|
||||||
DXCHECK(mDXRenderDevice->mD3DDevice->CreateDepthStencilView(mD3DDepthBuffer, NULL, &mD3DDepthStencilView));
|
DXCHECK(mDXRenderDevice->mD3DDevice->CreateDepthStencilView(mD3DDepthBuffer, NULL, &mD3DDepthStencilView));
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
NS_BF_BEGIN;
|
NS_BF_BEGIN;
|
||||||
|
|
||||||
|
class WinBFWindow;
|
||||||
class BFApp;
|
class BFApp;
|
||||||
class DXRenderDevice;
|
class DXRenderDevice;
|
||||||
|
|
||||||
|
@ -150,7 +151,7 @@ public:
|
||||||
virtual void PhysSetAsTarget();
|
virtual void PhysSetAsTarget();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DXRenderWindow(DXRenderDevice* renderDevice, HWND hWnd, bool windowed);
|
DXRenderWindow(DXRenderDevice* renderDevice, WinBFWindow* window, bool windowed);
|
||||||
~DXRenderWindow();
|
~DXRenderWindow();
|
||||||
|
|
||||||
void ReleaseNative();
|
void ReleaseNative();
|
||||||
|
|
|
@ -118,7 +118,7 @@ WinBFWindow::WinBFWindow(BFWindow* parent, const StringImpl& title, int x, int y
|
||||||
|
|
||||||
int aWindowFlags = 0;
|
int aWindowFlags = 0;
|
||||||
bool hasDestAlpha = (windowFlags & BFWINDOW_DEST_ALPHA) != 0;
|
bool hasDestAlpha = (windowFlags & BFWINDOW_DEST_ALPHA) != 0;
|
||||||
|
|
||||||
if (windowFlags & BFWINDOW_MENU)
|
if (windowFlags & BFWINDOW_MENU)
|
||||||
{
|
{
|
||||||
WinBFMenu* aMenu = new WinBFMenu();
|
WinBFMenu* aMenu = new WinBFMenu();
|
||||||
|
@ -250,8 +250,7 @@ WinBFWindow::WinBFWindow(BFWindow* parent, const StringImpl& title, int x, int y
|
||||||
SetTimer(mHWnd, 0, 10, NULL);
|
SetTimer(mHWnd, 0, 10, NULL);
|
||||||
|
|
||||||
mIsMouseInside = false;
|
mIsMouseInside = false;
|
||||||
mRenderWindow = new DXRenderWindow((DXRenderDevice*) gBFApp->mRenderDevice, mHWnd, (windowFlags & BFWINDOW_FULLSCREEN) == 0);
|
mRenderWindow = new DXRenderWindow((DXRenderDevice*) gBFApp->mRenderDevice, this, (windowFlags & BFWINDOW_FULLSCREEN) == 0);
|
||||||
mRenderWindow->mWindow = this;
|
|
||||||
gBFApp->mRenderDevice->AddRenderWindow(mRenderWindow);
|
gBFApp->mRenderDevice->AddRenderWindow(mRenderWindow);
|
||||||
|
|
||||||
SetWindowLongPtr(mHWnd, GWLP_USERDATA, (LONG_PTR)this);
|
SetWindowLongPtr(mHWnd, GWLP_USERDATA, (LONG_PTR)this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue