mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-03 11:11:25 +00:00
Windows: Fix small atom leak.
This commit is contained in:
parent
fcf895fe1c
commit
6bf5827407
@ -98,24 +98,18 @@ void TouchInputHandler::handleTouchEvent(HWND hWnd, UINT message, WPARAM wParam,
|
||||
|
||||
// from http://msdn.microsoft.com/en-us/library/ms812373.aspx
|
||||
// disable the press and hold gesture for the given window
|
||||
void TouchInputHandler::disablePressAndHold(HWND hWnd)
|
||||
{
|
||||
void TouchInputHandler::disablePressAndHold(HWND hWnd) {
|
||||
// The atom identifier and Tablet PC atom
|
||||
ATOM atomID = 0;
|
||||
LPCTSTR tabletAtom = _T("MicrosoftTabletPenServiceProperty");
|
||||
|
||||
// Get the Tablet PC atom ID
|
||||
atomID = GlobalAddAtom(tabletAtom);
|
||||
ATOM atomID = GlobalAddAtom(tabletAtom);
|
||||
|
||||
// If getting the ID failed, return false
|
||||
if (atomID == 0)
|
||||
{
|
||||
return;
|
||||
if (atomID != 0) {
|
||||
// Try to disable press and hold gesture by setting the window property.
|
||||
SetProp(hWnd, tabletAtom, (HANDLE)1);
|
||||
}
|
||||
|
||||
// Try to disable press and hold gesture by
|
||||
// setting the window property, return the result
|
||||
SetProp(hWnd, tabletAtom, (HANDLE)1);
|
||||
|
||||
GlobalDeleteAtom(atomID);
|
||||
}
|
||||
|
||||
void TouchInputHandler::touchUp(int id, float x, float y){
|
||||
|
Loading…
Reference in New Issue
Block a user