From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp') diff --git a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp index 51eab5aa..62ee60b1 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp @@ -17,7 +17,7 @@ UIScene_DebugSetCamera::UIScene_DebugSetCamera(int iPad, void *initData, UILayer currentPosition->player = playerNo; Minecraft *pMinecraft = Minecraft::GetInstance(); - if (pMinecraft != nullptr) + if (pMinecraft != NULL) { Vec3 *vec = pMinecraft->localplayers[playerNo]->getPos(1.0); @@ -143,7 +143,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) #ifdef _WINDOWS64 if (isDirectEditBlocking()) return; #endif - switch(static_cast(controlId)) + switch((int)controlId) { case eControl_Teleport: app.SetXuiServerAction( ProfileManager.GetPrimaryPad(), @@ -155,7 +155,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) case eControl_CamZ: case eControl_YRot: case eControl_Elevation: - m_keyboardCallbackControl = static_cast(static_cast(controlId)); + m_keyboardCallbackControl = (eControls)((int)controlId); #ifdef _WINDOWS64 if (g_KBMInput.IsKBMActive()) { @@ -173,7 +173,6 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) ui.NavigateToScene(m_iPad, eUIScene_Keyboard, &kbData, eUILayer_Fullscreen, eUIGroup_Fullscreen); } #else ->>>>>>> origin/main InputManager.RequestKeyboard(L"Enter something",L"",(DWORD)0,25,&UIScene_DebugSetCamera::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default); #endif break; @@ -182,7 +181,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId, bool selected) { - switch(static_cast(controlId)) + switch((int)controlId) { case eControl_LockPlayer: app.SetFreezePlayers(selected); @@ -192,19 +191,18 @@ void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId, bool selected) int UIScene_DebugSetCamera::KeyboardCompleteCallback(LPVOID lpParam,bool bRes) { - UIScene_DebugSetCamera *pClass=static_cast(lpParam); + UIScene_DebugSetCamera *pClass=(UIScene_DebugSetCamera *)lpParam; uint16_t pchText[2048]; ZeroMemory(pchText, 2048 * sizeof(uint16_t)); #ifdef _WINDOWS64 Win64_GetKeyboardText(pchText, 2048); #else ->>>>>>> origin/main InputManager.GetText(pchText); #endif if(pchText[0]!=0) { - wstring value = reinterpret_cast(pchText); + wstring value = (wchar_t *)pchText; double val = 0; if(!value.empty()) val = _fromString( value ); switch(pClass->m_keyboardCallbackControl) -- cgit v1.2.3