mirror of
https://github.com/Minecraft-Community-Edition/client.git
synced 2026-05-27 11:34:33 +00:00
Merge branch 'fix-exit-button' into 'main'
Fix close button See merge request whispers-lce/client!3
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#ifdef _WINDOWS64
|
||||
#include "AchievementScreen.h"
|
||||
#include "StatsCounter.h"
|
||||
#include "Windows64_Minecraft.h"
|
||||
#endif
|
||||
#ifdef __ORBIS__
|
||||
#include <error_dialog.h>
|
||||
@@ -368,6 +369,12 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
case eControl_Exit:
|
||||
PostMessage(GetMinecraftWindowHWND(), WM_CLOSE, 0, 0);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default: __debugbreak();
|
||||
}
|
||||
|
||||
|
||||
@@ -16709,6 +16709,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|ORBIS'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64_DLCOffers.h" />
|
||||
<ClInclude Include="Windows64_Minecraft.h" />
|
||||
<ClInclude Include="WolfModel.h" />
|
||||
<ClInclude Include="WolfRenderer.h" />
|
||||
<ClInclude Include="WstringLookup.h" />
|
||||
|
||||
@@ -3658,6 +3658,9 @@
|
||||
<ClInclude Include="KeyboardMouseInput.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64_Minecraft.h">
|
||||
<Filter>Windows64\Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
|
||||
#include "Xbox/resource.h"
|
||||
|
||||
#include "Windows64_Minecraft.h"
|
||||
|
||||
HINSTANCE hMyInst;
|
||||
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
char chGlobalText[256];
|
||||
@@ -289,6 +291,11 @@ void MemSect(int sect)
|
||||
HINSTANCE g_hInst = NULL;
|
||||
HWND g_hWnd = NULL;
|
||||
|
||||
HWND GetMinecraftWindowHWND()
|
||||
{
|
||||
return g_hWnd;
|
||||
}
|
||||
|
||||
static bool g_isFullscreen = false;
|
||||
static RECT g_windowedRect = {};
|
||||
static LONG g_windowedStyle = 0;
|
||||
|
||||
3
Minecraft.Client/Windows64_Minecraft.h
Normal file
3
Minecraft.Client/Windows64_Minecraft.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#include <Windows.h>
|
||||
|
||||
HWND GetMinecraftWindowHWND();
|
||||
Reference in New Issue
Block a user