Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

How to fix Windows "Default Beep" for an ALT key shortcuts with other keys pressed?


ReFresh

Question

  • Premium

Hey guys,

someone got an idea how to fix "Default Beep" for ALT key shortcuts? Try to run with your character ingame with pressed ALT key, you wil get: "Beep, Beep, Beep, Beep" sound, which is really anoying and I got no idea where could be a problem.

I will be really glad, if someone got a solution for this problem and can share it with us, because it's problem of 99% clients.

Thanks for possible answers!

Sincerely,

ReFresh

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1
  • Moderator
Posted (edited)

Ok, I just tested right now with a default metin2 client and that's not a real 'beep', it's an 'Asterisk' sound from Windows and it comes from PythonApplication.cpp:

unsigned __GetWindowMode(bool windowed)
{
	if (windowed)
		return WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;

	return WS_POPUP;
}

If you remove WS_SYSMENU from the style, you won't get the sound anymore but you won't see the buttons and icon too.

B1K5QUa.png

kF72URo.png

 

UPDATE

Alright, after some debugging:

Spoiler

VJr5VHF.png
DMfpP3W.png

Here is a fast fix and should work fine, I didn't test it so well.

  • UserInterface\PythonApplicationProcedure.cpp

This is the hidden content, please

Before: https://metin2.download/video/Oy3fg6R91i9BS2L98w35mUB54hTYJOhz/.mp4 (everywhere in the client)

After: https://metin2.download/video/iNrVA5EmXXKplT3P325pTJ896q6V2p8j/.mp4

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1
  • Honorable Member
Posted (edited)
12 hours ago, VegaS™ said:

UPDATE

Alright, after some debugging:

  Reveal hidden contents

VJr5VHF.png
DMfpP3W.png

Here is a fast fix and should work fine, I didn't test it so well.

  • UserInterface\PythonApplicationProcedure.cpp

 

Hidden Content

 

LRESULT CPythonApplication::WindowProcedure(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
	if (wParam == 0xF100)
		return 1;
  
	[...]
}

 

 

I've tested it and it seems fine. Gonna test it further more.

I just prefer it like this:

pMRG2qf.png

	case WM_SYSCOMMAND:
		if (wParam == SC_KEYMENU)
			return 0;
		break;

 

Edit: I've changed the return 1L to return 0. Even (TRUE) should be fine (which is 1).

https://docs.microsoft.com/en-us/windows/win32/menurc/wm-syscommand

https://stackoverflow.com/a/4650605/7964985

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 0
  • Premium
Posted (edited)

@VegaS™It must be a game problem,  because it's not happening in Windows at all. It's happening only when game is in windowed mode. So problem must be somewhere in the source idk. I had chance to test it on one server and there wasn't this issue. So I believe it's a game problem.

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Activity

    1. 993

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    2. 1

      Looking for a good designer

    3. 0

      Cross channel friend request

    4. 2

      Where are those maps/dungeons coming from?

    5. 3

      Press F10 to close the client immediately

    6. 2

      Where are those maps/dungeons coming from?

    7. 2

      Where are those maps/dungeons coming from?

    8. 4

      Visual studio 2022 compiling issue

    9. 1

      Count players function

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.