Premium Intel 757 Posted August 16, 2021 Premium Share Posted August 16, 2021 1 minute ago, Abel(Tiger) said: The tutorial is very old New tutorial: // PythonApplicationProcedure.cpp // After: if (m_isWindowFullScreenEnable) { __MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight); } // Just add: OnMouseMiddleButtonUp(0, 0); That's all! I guess this solution is more elegant lol Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 16, 2021 Active Member Share Posted August 16, 2021 (edited) @Abel(Tiger) To solve fix camera when minimize client I just need to add: OnMouseMiddleButtonUp(0, 0); instad of writing all the lines of code that you wrote in the past? Or you're just talking about client crash fix? Thanks for the info. Edited August 16, 2021 by ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted August 16, 2021 Author Active+ Member Share Posted August 16, 2021 (edited) The entire fix is just to add that line Edited August 16, 2021 by Abel(Tiger) 1 Link to comment Share on other sites More sharing options...
Honorable Member Tatsumaru 5258 Posted October 3, 2021 Honorable Member Share Posted October 3, 2021 (edited) On 8/16/2021 at 6:37 PM, Abel(Tiger) said: The tutorial is very old New tutorial: // PythonApplicationProcedure.cpp // After: if (m_isWindowFullScreenEnable) { __MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight); } // Just add: OnMouseMiddleButtonUp(0, 0); That's all! The old fix added a new bug. The new fix also adds the same bug. If you switch to another window with ALT+TAB while you have PPM pressed, you won't be able to move the game window, minimize and close. Edited October 3, 2021 by Tatsumaru Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted October 3, 2021 Premium Share Posted October 3, 2021 for client crash void CPythonApplication::__ResetCameraWhenMinimize() { if (m_CursorHandleMap.empty()) // FIXME return; CCameraManager& rkCmrMgr = CCameraManager::Instance(); CCamera* pkCmrCur = rkCmrMgr.GetCurrentCamera(); if (pkCmrCur) { pkCmrCur->EndDrag(); } SetCursorNum(NORMAL); if (CURSOR_MODE_HARDWARE == GetCursorMode()) { SetCursorVisible(TRUE); } } and void CPythonApplication::DestroyCursors() { for (auto itor = m_CursorHandleMap.begin(); itor != m_CursorHandleMap.end(); ++itor) DestroyCursor((HCURSOR)itor->second); m_CursorHandleMap.clear(); // FIXME } 1 Link to comment Share on other sites More sharing options...
Paszka 1 Posted March 6, 2022 Share Posted March 6, 2022 (edited) On 10/3/2021 at 5:01 AM, Tatsumaru said: The old fix added a new bug. The new fix also adds the same bug. If you switch to another window with ALT+TAB while you have PPM pressed, you won't be able to move the game window, minimize and close. That's right, you just have to do it like this if(m_isWindowFullScreenEnable) { __MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight); } SafeReleaseCapture(); UI::CWindowManager::Instance().RunMouseMiddleButtonUp(short(LOWORD(lParam)), short(HIWORD(lParam))); Edited March 6, 2022 by Paszka 1 Link to comment Share on other sites More sharing options...
Mafuyu 51 Posted March 12, 2022 Share Posted March 12, 2022 can someone post the "old" fix again so i can remove the old one? added it years ago and the TE was so smart to remove the old code so we cant remove it?? Link to comment Share on other sites More sharing options...
Management AZICKO 7343 Posted March 12, 2022 Management Share Posted March 12, 2022 1 hour ago, Mafuyu said: can someone post the "old" fix again so i can remove the old one? added it years ago and the TE was so smart to remove the old code so we cant remove it?? Old (2017) (Edit history) #PythonApplicationProcedure.cpp //Search this function: void CPythonApplication::__MinimizeFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight) { ChangeDisplaySettings(0, 0); SetWindowPos(hWnd, 0, 0, 0, dwWidth, dwHeight, SWP_SHOWWINDOW); ShowWindow(hWnd, SW_MINIMIZE); } //Add after: void CPythonApplication::__ResetCameraWhenMinimize() { CCameraManager& rkCmrMgr=CCameraManager::Instance(); CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera(); if (pkCmrCur) { pkCmrCur->EndDrag(); } SetCursorNum(NORMAL); if ( CURSOR_MODE_HARDWARE == GetCursorMode()) SetCursorVisible(TRUE); } //Search: if (m_isWindowFullScreenEnable) { __MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight); } //Replace with: if (m_isWindowFullScreenEnable) { __MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight); __ResetCameraWhenMinimize(); } else { __ResetCameraWhenMinimize(); } #PythonApplication.h //Search: void __MinimizeFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight); //Add after: void __ResetCameraWhenMinimize(); 1 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
Ymir 4 Posted September 11, 2022 Share Posted September 11, 2022 What is the final code with all the tutorial fixes? Link to comment Share on other sites More sharing options...
Recommended Posts