Jump to content

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


Go to solution Solved by VegaS™,

Recommended Posts

  • Active+ Member

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!  😉

  • 6 months later...
  • Forum Moderator

I may be wrong, but that's a windows issue, not a metin2 one.

Spoiler

nGXhjwV.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Active+ Member

@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
  • Metin2 Dev 1

I'll be always helpful!  😉

  • Forum Moderator
  • Solution

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
  • Metin2 Dev 14
  • Good 2
  • Love 1
  • Love 4
  • Honorable Member
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
  • Metin2 Dev 1
  • Good 2
  • Love 1

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Guest
This topic is now closed to further replies.
×
×
  • 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.