# HG changeset patch # User hgs # Date 1273810037 -19800 # Node ID ac35e54b1f85ff9a874177607e7432b7ab695af5 # Parent cf4c5641c6dd02050599d5c1d1994117a82e552c 201019_05 diff -r cf4c5641c6dd -r ac35e54b1f85 emulator/emulatorbsp/hal/config.hcf --- a/emulator/emulatorbsp/hal/config.hcf Fri May 14 16:58:21 2010 +0300 +++ b/emulator/emulatorbsp/hal/config.hcf Fri May 14 09:37:17 2010 +0530 @@ -86,3 +86,4 @@ EPointer3DExitCloseProximityThreshold : set = 0 EDisplayMemoryHandle=GetDisplayMemoryHandle ENumCpus=GetNumCpus +EDigitiserOrientation : set = DigitiserOrientation diff -r cf4c5641c6dd -r ac35e54b1f85 emulator/emulatorbsp/inc/gui.h --- a/emulator/emulatorbsp/inc/gui.h Fri May 14 16:58:21 2010 +0300 +++ b/emulator/emulatorbsp/inc/gui.h Fri May 14 09:37:17 2010 +0530 @@ -1,4 +1,4 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -266,6 +266,7 @@ TInt iMaxScreenHeight; TInt iXYInputWidth; TInt iXYInputHeight; + TInt iXYOrientation; TInt iPhysicalScreenWidth; TInt iPhysicalScreenHeight; TInt iMaxPhysicalScreenWidth; diff -r cf4c5641c6dd -r ac35e54b1f85 emulator/emulatorbsp/specific/gui.cpp --- a/emulator/emulatorbsp/specific/gui.cpp Fri May 14 16:58:21 2010 +0300 +++ b/emulator/emulatorbsp/specific/gui.cpp Fri May 14 09:37:17 2010 +0530 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -4108,7 +4108,7 @@ return static_cast(aThis)->XYHalFunction(aFunction,a1,a2); } -TInt DMasterIni::XYHalFunction(TInt aFunction, TAny* a1, TAny* /*a2*/) +TInt DMasterIni::XYHalFunction(TInt aFunction, TAny* a1, TAny* a2) { TInt r=KErrNone; switch(aFunction) @@ -4129,6 +4129,28 @@ r=KErrNotSupported; } break; + + // a2 = TBool aSet (ETrue for setting, EFalse for retrieval) + // a1 = TDigitizerOrientation (set) + // a1 = &TDigitizerOrientation (get) + // Assume screen [0] here as this HAL function is only registered for + // screen 0 on the emulator platform. Function only called if display==0 + case EDigitiserOrientation: + if ((TBool)a2) + { + // Set the orientation attribute + // In case user thread, check it has WDD capability + if(!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EDigitiserOrientation"))) + return KErrPermissionDenied; + systemIni->iScreens[0]->iXYOrientation = (TInt)a1; + } + else + { + // Get the orientation attribute, safe copy it into user memory + kumemput32(a1, &(systemIni->iScreens[0]->iXYOrientation), sizeof(TInt)); + } + break; + default: r=KErrNotSupported; break;