mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Update Windows64_Minecraft.cpp
Fixes ALT+Enter not being persistent like F11
This commit is contained in:
parent
f1d477c1ec
commit
59a62aaaf0
|
|
@ -824,6 +824,23 @@ HRESULT InitDevice()
|
||||||
if( FAILED( hr ) )
|
if( FAILED( hr ) )
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
IDXGIDevice* dxgiDevice = NULL;
|
||||||
|
if (SUCCEEDED(g_pd3dDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice)) && dxgiDevice)
|
||||||
|
{
|
||||||
|
IDXGIAdapter* dxgiAdapter = NULL;
|
||||||
|
if (SUCCEEDED(dxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&dxgiAdapter)) && dxgiAdapter)
|
||||||
|
{
|
||||||
|
IDXGIFactory* dxgiFactory = NULL;
|
||||||
|
if (SUCCEEDED(dxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&dxgiFactory)) && dxgiFactory)
|
||||||
|
{
|
||||||
|
dxgiFactory->MakeWindowAssociation(g_hWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
dxgiFactory->Release();
|
||||||
|
}
|
||||||
|
dxgiAdapter->Release();
|
||||||
|
}
|
||||||
|
dxgiDevice->Release();
|
||||||
|
}
|
||||||
|
|
||||||
// Create a render target view
|
// Create a render target view
|
||||||
ID3D11Texture2D* pBackBuffer = NULL;
|
ID3D11Texture2D* pBackBuffer = NULL;
|
||||||
hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );
|
hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );
|
||||||
|
|
@ -1597,6 +1614,13 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Alt+Enter Toggle fullscreen
|
||||||
|
if (g_KBMInput.IsKeyPressed(VK_RETURN) &&
|
||||||
|
(g_KBMInput.IsKeyDown(VK_LMENU) || g_KBMInput.IsKeyDown(VK_RMENU)))
|
||||||
|
{
|
||||||
|
ToggleFullscreen();
|
||||||
|
}
|
||||||
|
|
||||||
// TAB opens game info menu. - Vvis :3 - Updated by detectiveren
|
// TAB opens game info menu. - Vvis :3 - Updated by detectiveren
|
||||||
if (g_KBMInput.IsKeyPressed(VK_TAB) && !ui.GetMenuDisplayed(0))
|
if (g_KBMInput.IsKeyPressed(VK_TAB) && !ui.GetMenuDisplayed(0))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue