From 4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 28 Mar 2015 01:43:35 +0100 Subject: Bump OculusVR RIFT SDK to 0.5.0.1 --- LibOVR/Src/Net/OVR_RPC1.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'LibOVR/Src/Net/OVR_RPC1.cpp') diff --git a/LibOVR/Src/Net/OVR_RPC1.cpp b/LibOVR/Src/Net/OVR_RPC1.cpp index 12afb09..b6137a5 100644 --- a/LibOVR/Src/Net/OVR_RPC1.cpp +++ b/LibOVR/Src/Net/OVR_RPC1.cpp @@ -26,7 +26,7 @@ limitations under the License. #include "OVR_RPC1.h" #include "OVR_BitStream.h" -#include "../Kernel/OVR_Threads.h" // Thread::MSleep +#include "Kernel/OVR_Threads.h" // Thread::MSleep #include "OVR_MessageIDTypes.h" namespace OVR { namespace Net { namespace Plugins { @@ -54,13 +54,12 @@ RPC1::RPC1() RPC1::~RPC1() { - slotHash.Clear(); delete blockingReturnValue; } -void RPC1::RegisterSlot(OVR::String sharedIdentifier, OVR::Observer* rpcSlotObserver ) +void RPC1::RegisterSlot(OVR::String sharedIdentifier, OVR::CallbackListener* rpcSlotObserver) { - slotHash.AddObserverToSubject(sharedIdentifier, rpcSlotObserver); + slotHash.AddListener(sharedIdentifier, rpcSlotObserver); } bool RPC1::RegisterBlockingFunction(OVR::String uniqueID, RPCDelegate blockingFunction) @@ -235,18 +234,15 @@ void RPC1::OnReceive(ReceivePayload *pPayload, ListenerReceiveResult *lrrOut) OVR::String sharedIdentifier; bsIn.Read(sharedIdentifier); - Observer *o = slotHash.GetSubject(sharedIdentifier); + CallbackEmitter* o = slotHash.GetKey(sharedIdentifier); if (o) { bsIn.AlignReadToByteBoundary(); - if (o) - { - OVR::Net::BitStream serializedParameters(bsIn.GetData() + bsIn.GetReadOffset()/8, bsIn.GetNumberOfUnreadBits()/8, false); + OVR::Net::BitStream serializedParameters(bsIn.GetData() + bsIn.GetReadOffset()/8, bsIn.GetNumberOfUnreadBits()/8, false); - o->Call(&serializedParameters, pPayload); - } + o->Call(&serializedParameters, pPayload); } } } -- cgit v1.2.3