Jump to content
Phishing - Beware of identity theft... ×

[EXPERIMENTAL] Game window freeze when dragging the client


Recommended Posts

  • Contributor

The game loop freezes when dragging/resizing the window. This is an attempt at fixing that.


We'll open a thread and call "Process()" from there when we receive WM_ENTERSIZEMOVE and then shut it down when receiving WM_EXITSIZEMOVE, continuing our main game loop.


There's also the option of creating a timer when entering WM_ENTERSIZEMOVE, calling "Process()" when receiving WM_TIMER and killing it when receiving WM_EXITSIZEMOVE, but there's quite a big delay till the timer starts and it's also not very reliable, so..

Note: This is HIGHLY experimental, and it might result in data races and crash the client. Even though I tested it as good as I could and tried to make sure the main thread's loop doesn't resume before ending the future, it's still a possibility for that to happen when you least expect it.




This is the hidden content, please
This is the hidden content, please

Many thanks to @limefor taking the time to test it.

Good luck!

  • Metin2 Dev 43
  • Think 2
  • Lmao 1
  • Good 7
  • Love 1
  • Love 14
Link to comment
Share on other sites

Great release, but I also want to point out that the freezing will also happen when holding right click on the bar or opening the context menu.


			return 0;

into the CPythonApplication::WindowProcedure message switch will stop the context menu from opening.

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.